From 3d695c1ead2baf39462050d134def100fdb00c7f Mon Sep 17 00:00:00 2001 From: antux18 Date: Tue, 9 Jul 2024 18:45:25 +0200 Subject: [PATCH] Added support for RPM and Pacman. --- ecg.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ecg.py b/ecg.py index 02c5e98..3927425 100755 --- a/ecg.py +++ b/ecg.py @@ -18,7 +18,7 @@ HEREPATH = pathlib.Path(__file__).parent.absolute() PKGLISTS = "./pkglists/" # Commands to list installed packages along with their versions depending on the packages manager: -pkgmgr_cmd = {"dpkg":"dpkg -l | awk 'NR>5 {print $2 \",\" $3}'", "pip":"pip freeze | sed 's/==/,/g'", "conda":"/root/.conda/bin/conda list"} +pkgmgr_cmd = {"dpkg":"dpkg -l | awk 'NR>5 {print $2 \",\" $3}'", "rpm":"rpm -qa --queryformat '%\{NAME\},%\{VERSION\}\\n'", "pacman":"pacman -Q | sed 's/ /,/g'", "pip":"pip freeze | sed 's/==/,/g'", "conda":"/root/.conda/bin/conda list"} import logging logging.basicConfig(format='%(levelname)s: %(message)s', level=logging.INFO) @@ -27,7 +27,7 @@ def download_sources(config): url = config["artifact_url"] logging.info(f"Downloading sources from {url}") temp_dir = tempfile.TemporaryDirectory() - req = requests.get(url) # FIXME: Pretty dangerous, but temporary + req = requests.get(url) if config["type"] == "zip": artefact = zipfile.ZipFile(io.BytesIO(req.content)) elif config["type"] == "tgz":