#3 Do not require absolute path to installation
Merged 2 years ago by asamalik. Opened 2 years ago by zbyszek.
minimization/ zbyszek/rpm-showme no-absolute-path  into  master

file modified
+10 -3
@@ -9,7 +9,14 @@ 

  # For more information on the license, see LICENSE.

  # For more information on free software, see <https://www.gnu.org/philosophy/free-sw.en.html>.

  

- import dnf, json, subprocess, tempfile, argparse, jinja2

+ import argparse

+ import json

+ import os

+ import subprocess

+ import tempfile

+ 

+ import dnf

+ import jinja2

  

  

  # === Data Structures ===
@@ -166,7 +173,7 @@ 

      base = dnf.Base()

      if releasever:

          base.conf.substitutions['releasever'] = releasever

-     base.conf.installroot = root

+     base.conf.installroot = os.path.abspath(root)

      base.fill_sack(load_available_repos=False)

      query = base.sack.query()

      installed = list(query.installed())
@@ -611,7 +618,7 @@ 

  

      # Usage:

      #

-     # $ showme feora:30 graph

+     # $ showme fedora:30 graph

      # $ showme / graph

  

      parser = argparse.ArgumentParser(description="Dependency visualisation of an RPM-based installation (a system, an image, etc.)", formatter_class=argparse.RawTextHelpFormatter)

no initial comment

Pull-Request has been merged by asamalik

2 years ago
Metadata