Files
ports/sysutils/debootstrap/files/patch-functions
T
Gleb Popov 0a768dc03d sysutils/debootstrap: Fix dependency after gnupg update
Approved by:	portmgr (fixit blanket)
2026-06-27 16:52:44 +03:00

55 lines
2.4 KiB
Plaintext

--- functions.orig 2026-03-26 22:58:30 UTC
+++ functions
@@ -1045,7 +1045,7 @@ extract_dpkg_deb_data () {
extract_dpkg_deb_data () {
local pkg="$1"
- dpkg-deb --fsys-tarfile "$pkg" | tar $EXTRACT_DEB_TAR_OPTIONS -xf - || error 1 FILEEXIST "Tried to extract package, but tar failed. Exit..."
+ dpkg-deb --fsys-tarfile "$pkg" | gtar $EXTRACT_DEB_TAR_OPTIONS -xf - || error 1 FILEEXIST "Tried to extract package, but tar failed. Exit..."
}
# Raw .deb extractors
@@ -1065,7 +1065,7 @@ extract_ar_deb_field () {
if in_path $cat_cmd; then
ar -p "$pkg" "$tarball" | $cat_cmd |
- tar -O -xf - control ./control 2>/dev/null |
+ gtar -O -xf - control ./control 2>/dev/null |
grep -i "^$field:" | sed -e 's/[^:]*: *//' | head -n 1
else
error 1 UNPACKCMDUNVL "Extracting %s requires the %s command, which is not available" "$pkg" "$cat_cmd"
@@ -1087,7 +1087,7 @@ extract_ar_deb_data () {
esac
if in_path "$cat_cmd"; then
- ar -p "$pkg" "$tarball" | "$cat_cmd" | tar $EXTRACT_DEB_TAR_OPTIONS -xf -
+ ar -p "$pkg" "$tarball" | "$cat_cmd" | gtar $EXTRACT_DEB_TAR_OPTIONS -xf -
else
error 1 UNPACKCMDUNVL "Extracting %s requires the %s command, which is not available" "$pkg" "$cat_cmd"
fi
@@ -1696,7 +1696,7 @@ while (read STDIN, $x, 1) {
}' "$@"
elif [ "$1" = "GETDEPS" ]; then
local pkgdest="$2"; shift; shift
-LC_ALL=C grep "$gropt" '^$|^Package:|^Depends:|^Pre-Depends:' "${pkgdest}" | perl -e '
+LC_ALL=C pcre2grep '^$|^Package:|^Depends:|^Pre-Depends:' "${pkgdest}" | perl -e '
%seen = map { $_ => 1 } @ARGV;
while (<STDIN>) {
if (/^Package: (.*)$/) {
@@ -1724,13 +1724,13 @@ while (<STDIN>) {
local m="$2"
local p="$3"
shift; shift; shift
- LC_ALL=C grep "$gropt" '^$|^Architecture:|^Filename:|^MD5sum:|^Package:|^Priority:|^SHA256:|^Size:|^Version:|^Depends:|^Pre-Depends:' "$p" | pkgdetails_field 1 Package: "$m" "$@"
+ LC_ALL=C pcre2grep '^$|^Architecture:|^Filename:|^MD5sum:|^Package:|^Priority:|^SHA256:|^Size:|^Version:|^Depends:|^Pre-Depends:' "$p" | pkgdetails_field 1 Package: "$m" "$@"
elif [ "$1" = "FIELD" ]; then
local f="$2"
local m="$3"
local p="$4"
shift; shift; shift; shift
- LC_ALL=C grep "$gropt" '^$|^Package:|^Priority:|^Essential:' "$p" | pkgdetails_field 0 "$f" "$m" "$@"
+ LC_ALL=C pcre2grep '^$|^Package:|^Priority:|^Essential:' "$p" | pkgdetails_field 0 "$f" "$m" "$@"
elif [ "$1" = "STANZAS" ]; then
local pkgdest="$2"; shift; shift
perl -e '