diff --git a/build-apt-repo.sh b/build-apt-repo.sh index 97d6636..a252fff 100755 --- a/build-apt-repo.sh +++ b/build-apt-repo.sh @@ -185,8 +185,12 @@ recover_interrupted_apt_publication() { else mv -- "$backup" "$destination" fi - done < <(find "$APT_DIR/dists" "$APT_DIR/pool" -depth \ - -name '.*.previous.*' -print0 2>/dev/null) + done < <( + find "$APT_DIR" -maxdepth 1 -type f \ + -name '.xcat-dep.asc.previous.*' -print0 2>/dev/null + find "$APT_DIR/dists" "$APT_DIR/pool" -depth \ + -name '.*.previous.*' -print0 2>/dev/null + ) find "$APT_DIR" -maxdepth 1 -type d -name '.xcat-apt.*' \ -exec rm -rf -- {} + find "$APT_DIR" -type f \ diff --git a/mockbuild-all.pl b/mockbuild-all.pl index 276491b..331577f 100755 --- a/mockbuild-all.pl +++ b/mockbuild-all.pl @@ -68,6 +68,9 @@ my $force_unlock = 0; my @HELD_LOCKS; my $LOCK_OWNER_PID; my ($COMMON_STAGE, $COMMON_DESTINATION, $COMMON_BACKUP); +for my $sig (qw(INT TERM HUP)) { + $SIG{$sig} = sub { exit 1; }; +} GetOptions( 'repo-root=s' => \$repo_root, @@ -1395,9 +1398,6 @@ END { _restore_common_repository(); _release_locks_if_owner(); } -for my $sig (qw(INT TERM HUP)) { - $SIG{$sig} = sub { exit 1; }; -} sub read_os_release { my ($path) = @_;