GithubHelp home page GithubHelp logo

rpm_solv's Introduction

rpm_solv

The aim of this script is to pre-calculate rpms’ dependencies for a third party system. It can be useful to :

  • create a versionlock that is actually aware of dependencies.
  • create/anlyse advisories’ dependencies
  • calculate the size for a specific update

This script is heavily based on libsolv’s pysolv. Thus I kept the original BSD license.

https://github.com/openSUSE/libsolv/blob/master/examples/pysolv

Requirements:

  • python3
  • python3-solv (libsolv python binding)

usage

# list curl dependencies
./rpm_solv.py curl-7.65.3-2.fc30
cat ./data.json

# Solve all ppc64le’s patches for fedora 29
./rpm_solv.py \
    --repodir ./repos/ \
    --basearch ppc64le \
    --releasever 29 \
    --weak \
    'patch:*'

# Solve 'patch:*' from the 'updates' repository
./rpm_solv.py \ 
    'repo:updates:patch:*' \
    '*' \
    --weak

# exclude fedora repo from selection
./rpm_solv.py \
    "repo:fedora:selection:subtract:*" \
    "bash" --weak 

# exclude all .x86_64 package from BaseOS repo
# "repo:BaseOS:selection:subtract:*.x86_64"
# then exclude bash>4.4.19-7.el8
# finally, request bash package resolution
./rpm_solv.py --repodir ./repos/  \
    "repo:BaseOS:selection:subtract:*.x86_64" \
    "selection:subtract:bash>4.4.19-7.el8" \
    "repo:BaseOS:bash" --weak

# the selection filter only affect the pakages query
# it does not change the packages solver set 
# in other words 
# even if you manually exculde a package 
# from the selection. the excluded package
# might be present in the final resutl 
# because of dependecies

# To modify the job solving process 
# you may change jobs flags 
# by using action delimited 
# by a comma character
# "job:essential,forcebest:bash"
# https://github.com/openSUSE/libsolv/blob/master/doc/libsolv-bindings.txt#the-job-class
./rpm_solv.py --repodir ./repos/  \
    "job:essential,forcebest:bash" 

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.