diff options
-rwxr-xr-x | localdebpool | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/localdebpool b/localdebpool index 45ddcfc..c7f4a35 100755 --- a/localdebpool +++ b/localdebpool @@ -94,10 +94,11 @@ distsfromprvgrpdirs() { } genlist() { - dist="$1" - arch="$2" - srcdir="$3" - basedir="$4" + section="$1" + dist="$2" + arch="$3" + srcdir="$4" + basedir="$5" case "$arch" in source) destdir="$basedir/source"; @@ -111,8 +112,8 @@ genlist() { ;; esac mkdir -p "$destdir" - debugprint "genlist: \"$cmd . /dev/null pkg/\"" "2" - ( cd "$srcdir" && $cmd . /dev/null pkg/ ) > "$destdir/$file" + debugprint "genlist: \"$cmd . /dev/null pkg/$section/\"" "2" + ( cd "$srcdir" && $cmd . /dev/null pkg/$section/ ) > "$destdir/$file" if [ -s "$destdir/$file" ]; then debugprint "Finalizing list at \"$destdir/\"" "2" gzip -c "$destdir/$file" > "$destdir/$file.gz" @@ -190,7 +191,7 @@ fi # Create/update symlink farms $prvgrpdir and $pubpkgdir # -# $PRVBASE/sections/$section/$dist/$package/$pool/$buildhost +# $PRVBASE/sections/$section/$dist/$section/$package/$pool/$buildhost # $PUBBASE/pkg/$package/$pool/$buildhost # cd "$PRVBASE" && find * -type f -name HINTS -exec grep -q "^Sections:.*$batchsections_re" '{}' ';' -printf '%h\n' \ @@ -201,12 +202,12 @@ cd "$PRVBASE" && find * -type f -name HINTS -exec grep -q "^Sections:.*$batchsec shift 4 pkgsections="$(cat "$PRVBASE/$prvpkgdir/HINTS" | sectionsfromhintstream)" pkgsections="$(compactlist $pkgsections)" - subdir="$package/$pool" - mkdir -p "$PUBBASE/pkg/$subdir" - ln -sf -T "$PRVBASE/$prvpkgdir" "$PUBBASE/pkg/$subdir/$buildhost" for section in $pkgsections; do + subdir="$section/$package/$pool" + mkdir -p "$PUBBASE/pkg/$subdir" + ln -sf -T "$PRVBASE/$prvpkgdir" "$PUBBASE/pkg/$subdir/$buildhost" mkdir -p "$PRVBASE/sections/$section/$dist/$subdir" - ln -sf -T "../../../../../$prvpkgdir" "$PRVBASE/sections/$section/$dist/$subdir/$buildhost" + ln -sf -T "../../../../../../$prvpkgdir" "$PRVBASE/sections/$section/$dist/$subdir/$buildhost" done done @@ -218,13 +219,13 @@ for section in $batchsections; do dists="$(distsfromprvgrpdirs "$PRVBASE/sections/$section")" for dist in $dists; do debugprint "genlists \"\$PRVBASE/sections/$section/$dist\" -> \"\$PUBBASE/dists/$dist/$section\"" - prvgrpdir="$PRVBASE/sections/$section/$dist" + prvgrpdir="$PRVBASE/sections/$section/$dist/$section" pubpkgdir="$PUBBASE/dists/$dist/$section" archs="$(archsfromdirs "$prvgrpdir")" for arch in $archs; do - genlist "$dist" "$arch" "$prvgrpdir" "$pubpkgdir" + genlist "$section" "$dist" "$arch" "$prvgrpdir" "$pubpkgdir" done - [ -z "$archs" ] || genlist "$dist" "source" "$prvgrpdir" "$pubpkgdir" + [ -z "$archs" ] || genlist "$section" "$dist" "source" "$prvgrpdir" "$pubpkgdir" done done |