mirror of
https://gitlab.archlinux.org/archlinux/devtools.git
synced 2025-09-14 02:16:18 +02:00
Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
d4546c59ce | ||
![]() |
d6866e0544 | ||
![]() |
8edad22616 | ||
![]() |
f20435643f | ||
![]() |
8d99df602d |
2
Makefile
2
Makefile
@@ -1,4 +1,4 @@
|
|||||||
V=20191130
|
V=20191212
|
||||||
|
|
||||||
PREFIX = /usr/local
|
PREFIX = /usr/local
|
||||||
MANDIR = $(PREFIX)/share/man
|
MANDIR = $(PREFIX)/share/man
|
||||||
|
@@ -142,7 +142,7 @@ find_cached_package() {
|
|||||||
for dir in "${searchdirs[@]}"; do
|
for dir in "${searchdirs[@]}"; do
|
||||||
[[ -d $dir ]] || continue
|
[[ -d $dir ]] || continue
|
||||||
|
|
||||||
for pkg in "$dir"/*.pkg.tar?(.?z); do
|
for pkg in "$dir"/*.pkg.tar?(.!(sig|*.*)); do
|
||||||
[[ -f $pkg ]] || continue
|
[[ -f $pkg ]] || continue
|
||||||
|
|
||||||
# avoid adding duplicates of the same inode
|
# avoid adding duplicates of the same inode
|
||||||
@@ -152,7 +152,7 @@ find_cached_package() {
|
|||||||
|
|
||||||
# split apart package filename into parts
|
# split apart package filename into parts
|
||||||
pkgbasename=${pkg##*/}
|
pkgbasename=${pkg##*/}
|
||||||
pkgbasename=${pkgbasename%.pkg.tar?(.?z)}
|
pkgbasename=${pkgbasename%.pkg.tar*}
|
||||||
|
|
||||||
arch=${pkgbasename##*-}
|
arch=${pkgbasename##*-}
|
||||||
pkgbasename=${pkgbasename%-"$arch"}
|
pkgbasename=${pkgbasename%-"$arch"}
|
||||||
|
@@ -387,17 +387,28 @@ if (( ret != 0 )); then
|
|||||||
else
|
else
|
||||||
if (( run_checkpkg )); then
|
if (( run_checkpkg )); then
|
||||||
msg "Running checkpkg"
|
msg "Running checkpkg"
|
||||||
remotepkgs=($(pacman -Syddp --logfile /dev/null "${pkgnames[@]}"|grep '://'))
|
|
||||||
|
# sync off-site databases for up-to-date queries
|
||||||
|
trap 'rm -rf $dbpath; cleanup' EXIT INT TERM QUIT
|
||||||
|
dbpath=$(mktemp -d --tmpdir makechrootpkg-database.XXXXXXXXXX)
|
||||||
|
mkdir -p "$dbpath"
|
||||||
|
pacman -Sy --dbpath "$dbpath" --logfile /dev/null
|
||||||
|
|
||||||
|
# query current package locations
|
||||||
|
remotepkgs=($(pacman -Sddp --dbpath "$dbpath" --logfile /dev/null "${pkgnames[@]}"))
|
||||||
if (( $? )); then
|
if (( $? )); then
|
||||||
warning "Skipped checkpkg due to missing repo packages"
|
warning "Skipped checkpkg due to missing repo packages"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
for remotepkg in ${remotepkgs[@]}; do
|
|
||||||
|
# download package files if any non-local location exists
|
||||||
|
for remotepkg in "${remotepkgs[@]}"; do
|
||||||
[[ $remotepkg == file://* ]] && continue
|
[[ $remotepkg == file://* ]] && continue
|
||||||
msg2 "Downloading current versions"
|
msg2 "Downloading current versions"
|
||||||
pacman --noconfirm -Swdd --logfile /dev/null "${pkgnames[@]}"
|
pacman --noconfirm -Swdd --dbpath "$dbpath" --logfile /dev/null "${pkgnames[@]}"
|
||||||
break
|
break
|
||||||
done
|
done
|
||||||
|
|
||||||
msg2 "Checking packages"
|
msg2 "Checking packages"
|
||||||
sudo -u "$makepkg_user" checkpkg --rmdir --warn
|
sudo -u "$makepkg_user" checkpkg --rmdir --warn
|
||||||
fi
|
fi
|
||||||
|
@@ -116,4 +116,6 @@ if (( ${#files[@]} )); then
|
|||||||
printf '%s\n' '' '-> copying files...'
|
printf '%s\n' '' '-> copying files...'
|
||||||
load_makepkg_config
|
load_makepkg_config
|
||||||
scp "${files[@]/#/$server:}" "${PKGDEST:-${PWD}}/"
|
scp "${files[@]/#/$server:}" "${PKGDEST:-${PWD}}/"
|
||||||
|
else
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
Reference in New Issue
Block a user