mkimage-profiles/features.in/repo/scripts.d/01-genbasedir
Michael Shigorin ae7139f8b6 initial repo feature
We've got some parts of it in build-distro feature,
and some went to dev feature for no real reason.

But a bare installer might go without package base,
and LiveCDs other than live-builder might find local
repository useful given aufs2 root overlay.

Now the overall scheme is more straightforward:
- a distro:
  + asks that a package repo be included
  + cares to further add the packages to it
- a repo feature:
  + pulls in sub/main for it to happen
  + provides genbasedir script to create repo metadata
  + supplements live feature with repo configuration
2011-11-19 11:45:59 +02:00

29 lines
703 B
Bash
Executable File

#!/bin/sh -efu
PREFIX=ALTLinux
cd "$WORKDIR/$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
genbasedir \
--topdir="$WORKDIR" \
--no-oldhashfile \
--partial \
--xz \
--bz2 \
--create \
--notautomatic=false \
${INFO_ARCH:+--architecture="$INFO_ARCH"} \
${INFO_NAME:+--archive="$INFO_NAME"} \
${INFO_VERSION:+--version="$INFO_VERSION"} \
${INFO_ORIGIN:+--origin="$INFO_ORIGIN"} \
${INFO_LABEL:+--label="$INFO_LABEL"} \
$PREFIX $COMPS
### drop this when genbasedir is fixed (--no-uncompressed)
for c in $COMPS; do rm -f base/{pkg,src}list.$c; done