From 7ac16136fa7df1b87dd31332966409a28f860ad3 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 23 Nov 2020 09:55:07 +0100 Subject: switch from "dnf repomanage" to a home brew script --- mkrepo | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'mkrepo') diff --git a/mkrepo b/mkrepo index 72b1088..0dc9002 100755 --- a/mkrepo +++ b/mkrepo @@ -8,16 +8,19 @@ then dis=enterprise ver=8 old=2 + dst=/data/rpms/old elif [ "$nom" = "SRPMS" ] then dis=fedora ver=33 old=8 + dst=/data/rpms/SRPMS.remi else dis=${nom%%/*} ver=${nom#$dis/} ver=${ver%%/*} old=2 + dst=/data/rpms/old fi if [ ${1:-check} != nocheck ]; then @@ -55,14 +58,16 @@ fi if [ ${2:-clean} != noclean ]; then echo "+ Nettoyage des anciens ($old)" + cleanoldrpm $old $dst + + # https://bugzilla.redhat.com/show_bug.cgi?id=1899852 - repomanage is broken, reports not existing packages # use old deprecated yum command see https://bugzilla.redhat.com/1537981 #dnf repomanage --old --keep=$old . | tee $TMP - repomanage --old --keep=$old . 2>/dev/null | tee $TMP - LST=$(cat $TMP) - - if [ -n "$LST" ] - then mv $LST /data/rpms/old/ - fi + #repomanage --old --keep=$old . --setopt=metadata_expire=1 2>/dev/null | tee $TMP + #LST=$(cat $TMP) + #if [ -n "$LST" ] + #then mv $LST /data/rpms/old/ + #fi fi cache=/home/rpmbuild/site/rpms/.createrepocache/$nom -- cgit