summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/abslibre-tools/librestage15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/abslibre-tools/librestage b/src/abslibre-tools/librestage
index 02bc0d0..c12688b 100755
--- a/src/abslibre-tools/librestage
+++ b/src/abslibre-tools/librestage
@@ -74,9 +74,12 @@ main() {
load_PKGBUILD
# Now for the main routine.
- staged=false
+ local staged=false
slock 8 "${WORKDIR}/staging.lock" \
'Waiting for a shared lock on the staging directory'
+
+ # Look for makepkg output
+ local CARCH _pkgname pkgfile
for CARCH in "${ARCHES[@]}" any; do
for _pkgname in "${pkgname[@]}" "${pkgname[@]/%/-debug}"; do
if ! pkgfile=$(find_cached_package "$_pkgname" "$(get_full_version "$_pkgname")" "$CARCH"); then
@@ -85,6 +88,11 @@ main() {
msg 'Found package: %s' "${pkgfile##*/}"
+ # This little check is from devtools:commitpkg
+ if grep -q "packager = Unknown Packager" <(bsdtar -xOqf "$pkgfile" .PKGINFO); then
+ die "PACKAGER wes not set when building package"
+ fi
+
xbs release "$repo" "$CARCH"
mkdir -p "${WORKDIR}/staging/${repo}"
if cp "$pkgfile" "${WORKDIR}/staging/${repo}/${pkgfile##*/}"; then
@@ -97,6 +105,9 @@ main() {
done
done
+ # Look for librefetch output
+ local netfile mirror path
+ local srcurl srcname srcpath
for netfile in "${source[@]}"; do
for mirror in "${MIRRORS[@]}"; do
srcurl=${netfile#*::}
@@ -116,7 +127,7 @@ main() {
done
if [[ -n "$srcpath" ]]; then
msg "Found generated source file: %s" "$srcname"
- dest="${WORKDIR}/staging/other/${srcurl##"$mirror"}"
+ local dest="${WORKDIR}/staging/other/${srcurl##"$mirror"}"
mkdir -p -- "${dest%/*}"
if cp "$srcpath" "$dest"; then
msg2 "%s staged on [%s]" "$srcname" other