Update koschei-refresh-group to work with both repo layouts

This commit is contained in:
Michael Simacek 2016-06-06 12:27:36 +02:00
parent 4387e0530a
commit 485d58a1f9

View file

@ -4,8 +4,8 @@ if [ "$#" -lt 2 ]; then
exit 1 exit 1
fi fi
set -e set -e
repodata=`find /var/cache/koschei/repodata/ -maxdepth 1 -type d -name 'primary-f*' | sort -nr | head -n1` repodata=`find /var/cache/koschei/repodata/ -path '*/primary-f*' -name repomd.xml | sort -nr | head -n1`
repoid=`basename $repodata` repoid=`grep -o 'primary-[^/]*' <<< "$repodata"`
group=$1 group=$1
shift shift
dnf repoquery --repofrompath "$repoid,$repodata/x86_64" --disablerepo \* --enablerepo "$repoid" --repoid "$repoid" --srpm --qf '%{name}' "$@" | koschei-admin edit-group "$group" --content-from-file - --append dnf repoquery --repofrompath "$repoid,$repodata" --disablerepo \* --enablerepo "$repoid" --repoid "$repoid" --srpm --qf '%{name}' "$@" | koschei-admin edit-group "$group" --content-from-file - --append