summaryrefslogtreecommitdiff
path: root/localdebpool
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2016-04-15 22:52:41 +0200
committerJonas Smedegaard <dr@jones.dk>2016-04-15 22:52:41 +0200
commit199aaedd8f9eabf4ce0cdb500b52d6a486bed8cd (patch)
tree5b9d9ffebcc1f853efc4551fff567a9caee4bc50 /localdebpool
parentbc81ee0f9086f7bcbd9172a2d03fe9bf24690265 (diff)
Tidy: Refactor out single-used pkginfofromprvpkgdir().
Diffstat (limited to 'localdebpool')
-rwxr-xr-xlocaldebpool16
1 files changed, 4 insertions, 12 deletions
diff --git a/localdebpool b/localdebpool
index 9fcc168..6c00243 100755
--- a/localdebpool
+++ b/localdebpool
@@ -30,15 +30,6 @@ sectionsfromhintstream() {
perl -ne 's/^Sections:\W*// && do { s/\W*,\W*/\n/g; s/\W*$/\n/; print; }'
}
-pkginfofromprvpkgdir() {
- package="$(basename "$1")"
- pool="$(dirname "$1" | sed 's,.*/pool-\([^/]\+\)/\?.*,\1,; s,-all$,,')"
- dist="$(echo "$pool" | sed 's,[^a-z].*$,,')"
- buildhost="$(dirname "$@" | sed 's,^\([^/]\+\)/pool-.*,\1,')"
-
- echo "$package $pool $dist $buildhost"
-}
-
archsfromdirs() {
archs="$( \
find "$@" -type l -exec find '{}'/ -type f -name '*.deb' ';' \
@@ -213,9 +204,10 @@ find "$PUBBASE" -empty -delete
cd "$PRVBASE" && find * -type f -name HINTS -exec grep -Pq "^Sections:.*$batchsections_re" '{}' ';' -printf '%h\n' \
| while read prvpkgdir; do
debugprint "prvpkgdir: \"$prvpkgdir\""
- set -- $(pkginfofromprvpkgdir "$prvpkgdir")
- package="$1" pool="$2" dist="$3" buildhost="$4"
- shift 4
+ package="$(basename "$prvpkgdir")"
+ pool="$(dirname "$prvpkgdir" | sed 's,.*/pool-\([^/]\+\)/\?.*,\1,; s,-all$,,')"
+ dist="$(echo "$pool" | sed 's,[^a-z].*$,,')"
+ buildhost="$(dirname "$prvpkgdir" | sed 's,^\([^/]\+\)/pool-.*,\1,')"
pkgsections="$(sectionsfromhintstream < "$PRVBASE/$prvpkgdir/HINTS")"
pkgsections="$(compactlist $pkgsections)"
for section in $pkgsections; do