Compare commits

...

2 Commits

Author SHA1 Message Date
John McQuah c04e9cf3e8 pkgmeek: explicitly choose the compression mode for the created package
(workaround for buggy pkginfo -f)
2023-07-19 14:38:36 -04:00
John McQuah 9e3c7e2c49 prt-auf: fix function signatures 2023-07-19 14:35:15 -04:00
2 changed files with 9 additions and 3 deletions

View File

@ -9,7 +9,8 @@
main() {
######################## main routine ################################
local pkg_dir src_dir work _local_ here url u pkg_utd f DIR TARGET
local errDL=0; local errUZ=0; local BSDTAR="/usr/bin/bsdtar -a --format=gnutar"
local errDL=0; local errUZ=0; local BSDTAR="/usr/bin/bsdtar --format=gnutar"
declare -A ZFLAG=([xz]="-J" [bz2]="-j" [gz]="-z" [lz4]="--lz4" [zstd]="--zstd")
parse_options "$@"
# Exit early if refreshing an existing sha256 manifest was requested
@ -131,7 +132,7 @@ if [ "$pkg_utd" = 0 ] || [[ "$PKGMK_FORCE $PKGMK_EXTRACT_ONLY" =~ yes ]]; then
here="${_local_[u]}"
case "$here" in
*.tar|*.tar.gz|*.tar.Z|*.tgz|*.tar.bz2|*.tbz2|*.tar.xz|*.txz|*.tar.lzma|*.tar.lz|*.7z|*.zip|*.rpm)
bsdtar -p -o --no-xattrs -C src -xf "$here" || errUZ+=1 ;;
bsdtar -p -o -C src -xf "$here" || errUZ+=1 ;;
*)
cp -r -L "$here" src/ ;;
esac
@ -171,7 +172,11 @@ if [ "$pkg_utd" = 0 ] || [[ "$PKGMK_FORCE $PKGMK_EXTRACT_ONLY" =~ yes ]]; then
done } < <(find pkg -type l -path "*/man/man*/*" -printf '%f!%h\n')
# Create the archive
BSDTAR+=" ${ZFLAG[$PKGMK_COMPRESSION_MODE]}"
[ $UID = 0 ] || BSDTAR+=" --uid 0 --gid 0"
[ -w "$pkg_dir$package" ] || rm -f "$pkg_dir$package" 2>/dev/null \
|| { error "$pkg_dir$package not writable.";
cleanup_work; exit "$E_BUILD"; }
if (cd pkg; $BSDTAR -cf "$pkg_dir$package" -- *); then
info "Package creation successful."
else

View File

@ -686,7 +686,8 @@ sub port_diff { # find differences between the pkgdb and the repo
return $retval if ($dtype ne "sysup");
# proceed with the sysup operation
return up_inst(@outfile);
my @results = up_inst(@outfile);
return $retval, @results;
}
sub deporder { # returns a sorted list of packages required.