mirror of
https://gitlab.archlinux.org/archlinux/devtools.git
synced 2025-09-15 02:46:19 +02:00
Compare commits
8 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
74d7a70915 | ||
![]() |
5eacb475cd | ||
![]() |
bcda211dd8 | ||
![]() |
d4546c59ce | ||
![]() |
d6866e0544 | ||
![]() |
8edad22616 | ||
![]() |
f20435643f | ||
![]() |
8d99df602d |
2
Makefile
2
Makefile
@@ -1,4 +1,4 @@
|
|||||||
V=20191130
|
V=20191227
|
||||||
|
|
||||||
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
|
||||||
|
@@ -132,7 +132,7 @@ DBGSRCDIR="/usr/src/debug"
|
|||||||
COMPRESSGZ=(gzip -c -f -n)
|
COMPRESSGZ=(gzip -c -f -n)
|
||||||
COMPRESSBZ2=(bzip2 -c -f)
|
COMPRESSBZ2=(bzip2 -c -f)
|
||||||
COMPRESSXZ=(xz -c -z -)
|
COMPRESSXZ=(xz -c -z -)
|
||||||
COMPRESSZST=(zstd -c -z -q -)
|
COMPRESSZST=(zstd -c -T0 --ultra -20 -)
|
||||||
COMPRESSLRZ=(lrzip -q)
|
COMPRESSLRZ=(lrzip -q)
|
||||||
COMPRESSLZO=(lzop -q)
|
COMPRESSLZO=(lzop -q)
|
||||||
COMPRESSZ=(compress -c -f)
|
COMPRESSZ=(compress -c -f)
|
||||||
@@ -143,7 +143,7 @@ COMPRESSLZ=(lzip -c -f)
|
|||||||
# EXTENSION DEFAULTS
|
# EXTENSION DEFAULTS
|
||||||
#########################################################################
|
#########################################################################
|
||||||
#
|
#
|
||||||
PKGEXT='.pkg.tar.xz'
|
PKGEXT='.pkg.tar.zst'
|
||||||
SRCEXT='.src.tar.gz'
|
SRCEXT='.src.tar.gz'
|
||||||
|
|
||||||
# vim: set ft=sh ts=2 sw=2 et:
|
# vim: set ft=sh ts=2 sw=2 et:
|
||||||
|
@@ -59,7 +59,7 @@ get_pkgfile() {
|
|||||||
local pkgname=${pkgfilebase%-*-*-*}
|
local pkgname=${pkgfilebase%-*-*-*}
|
||||||
local pkgfile ext
|
local pkgfile ext
|
||||||
|
|
||||||
for ext in .xz .zstd ''; do
|
for ext in .xz .zst ''; do
|
||||||
pkgfile=${pkgfilebase}.pkg.tar${ext}
|
pkgfile=${pkgfilebase}.pkg.tar${ext}
|
||||||
|
|
||||||
for c in "${cache_dirs[@]}"; do
|
for c in "${cache_dirs[@]}"; do
|
||||||
|
@@ -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