Rename all RPMs to canonical names before genbasedir

This commit is contained in:
Anton V. Boyarshinov 2020-10-23 10:52:48 +03:00 committed by Anton Midyukov
parent f33644ed3b
commit 3d4ba22330

View File

@ -1,4 +1,4 @@
#!/bin/sh -efu
#!/bin/sh -eu
PREFIX=ALTLinux
cd "$WORKDIR/$PREFIX"
@ -9,6 +9,12 @@ COMPS="$(find -mindepth 1 -maxdepth 1 -type d -name 'RPMS.*' -printf '%f\n' |
[ -z "$GLOBAL_VERBOSE" ] || echo "** COMPS=$COMPS" >&2
[ -n "$COMPS" ] || exit 1
for comp in $COMPS; do
for f in RPMS.$comp/*rpm; do
[ "$f" = "RPMS.$comp/$(rpm -qp $f).rpm" ] || mv $f RPMS.$comp/$(rpm -qp $f).rpm
done
done
# NB: bz2 still needed for apt-cdrom add to work
genbasedir \
--topdir="$WORKDIR" \