Code Monkey home page Code Monkey logo

whatpkgs's Introduction

whatpkgs

The whatpkgs python module is an interface to the DNF API to perform complicated lookups on package dependencies.

This tool must be executed from the root of the git checkout in order for it to properly locate the frozen repository data.

Setup

This tool has been tested on Fedora 24 and 25. It requires the following pre-requisites (which includes DNF 2.0):

dnf install fedora-repos-rawhide
dnf update dnf --enablerepo=rawhide
dnf install python3-click python3-colorama

How to run:

Get the source RPM for one or more packages

Usage: whatpkgs.py getsourcerpm [OPTIONS] [PKGNAMES]...

  Look up the SRPMs from which these binary RPMs were generated.

  This list will be displayed deduplicated and sorted.

Options:
  --full-name / --no-full-name
  --system / --no-system        If --system is specified, use the 'fedora',
                                'updates', 'source' and 'updates-source'
                                repositories from the local system
                                configuration. Otherwise, use the static data
                                from the sampledata directory.
  --help                        Show this message and exit.

Get the recursive list of all runtime dependencis for one or more packages

Usage: whatpkgs.py neededby [OPTIONS] [PKGNAMES]...

  Look up the dependencies for each specified package and display them in a
  human-parseable format.

Options:
  --hint TEXT                     Specify a package to be selected when more
                                  than one package could satisfy a
                                  dependency.
                                  This option may be specified multiple times.
                                  For example, it is recommended to use
                                  --hint=glibc-minimal-langpack
  --recommends / --no-recommends
  --merge / --no-merge
  --full-name / --no-full-name
  --pick-first / --no-pick-first  If multiple packages could satisfy a
                                  dependency and no --hint package will
                                  fulfill the requirement, automatically
                                  select one from the list.

                                  Note: this result
                                  may differ between runs depending upon how
                                  the list is
                                  sorted. It is recommended to use
                                  --hint instead, where practical.
  --system / --no-system          If --system is specified, use the 'fedora',
                                  'updates', 'source' and 'updates-source'
                                  repositories from the local system
                                  configuration. Otherwise, use the static
                                  data from the sampledata directory.
  --help                          Show this message and exit.

Get the list of packages required to self-host for one or more packages

"Self-hosting" in this context means "all of the packages necessary to be able to build all the packages listed on the command line, plus recursively any packages required to build those BuildRequires as well.

Usage: whatpkgs.py neededtoselfhost [OPTIONS] [PKGNAMES]...

  Look up the build dependencies for each specified package and all of their
  dependencies, recursively and display them in a human-parseable format.

Options:
  --hint TEXT                     Specify a package to be selected when more
                                  than one package could satisfy a
                                  dependency.
                                  This option may be specified multiple times.
                                  For example, it is recommended to use
                                  --hint=glibc-minimal-langpack

                                  For build
                                  dependencies, the default is to exclude
                                  Recommends: from the
                                  dependencies of the
                                  BuildRequires.
  --recommends / --no-recommends
  --merge / --no-merge
  --full-name / --no-full-name
  --sources / --no-sources
  --pick-first / --no-pick-first  If multiple packages could satisfy a
                                  dependency and no --hint package will
                                  fulfill the requirement, automatically
                                  select one from the list.

                                  Note: this result
                                  may differ between runs depending upon how
                                  the list is
                                  sorted. It is recommended to use
                                  --hint instead, where practical.
  --system / --no-system          If --system is specified, use the 'fedora',
                                  'updates', 'source' and 'updates-source'
                                  repositories from the local system
                                  configuration. Otherwise, use the static
                                  data from the sampledata directory.
  --help                          Show this message and exit.

whatpkgs's People

Contributors

sgallagher avatar contyk avatar ralphbean avatar

Watchers

 avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.