repology-openmamba.py: switch from ignore to a more generic update-conf.json file to parse with ignore and more information

This commit is contained in:
Silvan Calarco 2024-02-08 17:08:30 +01:00
parent 9d218a005a
commit ea5c285270
2 changed files with 10 additions and 6 deletions

View File

@ -28,7 +28,7 @@ echo -e "\n=== distdb: ==="
grep -i $checkpkg ${LOCAL_REPS_BASE_DIR}/base/distdb
echo -e "\n=== legacy: ==="
grep -i $checkpkg ${LOCAL_REPS_BASE_DIR}/base/legacy
for repo in base devel-makedist devel-autodist devel-misc; do
for repo in base devel-makedist devel-autodist devel-misc devel-future; do
echo -e "\n=== ${repo}: ==="
ls ${LOCAL_REPS_BASE_DIR}/${repo}/SRPMS.base/*$checkpkg* 2>/dev/null
ls ${LOCAL_REPS_BASE_DIR}/${repo}/RPMS.*/*$checkpkg* 2>/dev/null

View File

@ -1,18 +1,22 @@
#!/usr/bin/python3
#
# repology-openmamba.py - find upstream packages updates from repology.org
# Copyright (c) 2021 by Silvan Calarco <silvan.calarco@mambasoft.it>
# Copyright (c) 2021-2024 by Silvan Calarco <silvan.calarco@mambasoft.it>
#
import json, urllib.request, time, sys
import json
import rpm
import sys
import time
import urllib.request
with open("/var/ftp/pub/openmamba/devel/legacy") as f:
with open("/var/ftp/pub/openmamba/base/legacy") as f:
legacy_packages = f.read().splitlines()
with open("/var/ftp/pub/openmamba/devel/ignore") as f:
with open("/var/ftp/pub/openmamba/base/updates-conf.json") as f:
data = json.loads(f.read())
ignored_packages = data["repology"]
ignored_packages = data["repology"]["ignore"]
from_package = ""
last_from_package = "NONE"