From d40bd182b73fb694cf92d36bd8fec9e4296744bf Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 17 Jan 2019 10:07:29 +0100 Subject: EL8 stuff --- mkrepo | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'mkrepo') diff --git a/mkrepo b/mkrepo index aa0f86c..a222a68 100755 --- a/mkrepo +++ b/mkrepo @@ -33,25 +33,26 @@ if [ ${1:-check} != nocheck ]; then fi fi -echo "+ Nettoyage des anciens ($old)" +if [ ${2:-clean} != noclean ]; then + echo "+ Nettoyage des anciens ($old)" -# 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) + # 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 [ -z "$LST" ] -then echo OK. -else mv $LST /data/rpms/old/ + if [ -z "$LST" ] + then echo OK. + else mv $LST /data/rpms/old/ + fi fi cache=/home/rpmbuild/site/rpms/.createrepocache/$nom mkdir -p $cache check=sha256 -if [ "$dis" == "fedora" -a "$ver" -ge 99 ]; then - # See: https://bugzilla.redhat.com/show_bug.cgi?id=1577747 - echo "+ Nettoyage" - rm -rf repodata +#if [ "$dis" == "fedora" -a "$ver" -ge 99 ]; then +if true; then + cleanoldmeta repodata echo "+ Génération repodata (createrepo_c, $check)" createrepo_c --workers 4 \ --cachedir $cache \ -- cgit