summaryrefslogtreecommitdiff
path: root/localdebpool
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2008-03-17 00:44:57 +0000
committerJonas Smedegaard <dr@jones.dk>2008-03-17 00:44:57 +0000
commit16524ccde0e4950de011b6c2f3293b3198fa4085 (patch)
tree0ae074d896a3d7a250f27ba2e88777f552005cd5 /localdebpool
parent150891cbd141c6e942515e0e2361e34530ef69a5 (diff)
Fix handling same package in multiple sections on same server.
Diffstat (limited to 'localdebpool')
-rwxr-xr-xlocaldebpool29
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