mkimage-profiles/features.in/repo/rootfs/image-scripts.d/01-genbasedir-rootfs
Anton Midyukov 3dfe3f9328 repo: rename variable ROOTFS_MAIN to REPO_MAIN
This variable blocks the enable of online repositories and activates
the enable of RPMS.main repository in iso or rootfs.
The old name was misleading.
2022-02-02 16:36:07 +07:00

36 lines
696 B
Bash
Executable File

#!/bin/sh -eu
[ -n "$GLOBAL_REPO_MAIN" ] || exit 0
mv /ALTLinux /srv/ALT
PREFIX=/srv/ALT
cd "$PREFIX"
COMPS="$(find -mindepth 1 -maxdepth 1 -type d -name 'RPMS.*' -printf '%f\n' |
sed 's/^RPMS\.//')"
[ -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
genbasedir \
--topdir="/" \
--no-oldhashfile \
--partial \
--xz \
--bz2 \
--create \
--notautomatic=false \
$PREFIX $COMPS
### drop this when genbasedir is fixed (--no-uncompressed)
for c in $COMPS; do rm -f base/{pkg,src}list.$c; done
apt-get update