Use format string for shell printf
Fixes: sh: 1: printf: usage: printf format [arg ...] due to Dir::Etc::trusted no longer being a thing since apt 2.9.24.
This commit is contained in:
parent
b1ba7dab3d
commit
9366f1fee7
1 changed files with 5 additions and 5 deletions
10
mmdebstrap
10
mmdebstrap
|
@ -5548,9 +5548,9 @@ sub main() {
|
||||||
# obtain the correct defaults for the keyring locations that apt knows
|
# obtain the correct defaults for the keyring locations that apt knows
|
||||||
# about
|
# about
|
||||||
my $apttrusted
|
my $apttrusted
|
||||||
= `eval \$(apt-config shell v Dir::Etc::trusted/f); printf \$v`;
|
= `eval \$(apt-config shell v Dir::Etc::trusted/f); printf %s \$v`;
|
||||||
my $apttrustedparts
|
my $apttrustedparts
|
||||||
= `eval \$(apt-config shell v Dir::Etc::trustedparts/d); printf \$v`;
|
= `eval \$(apt-config shell v Dir::Etc::trustedparts/d); printf %s \$v`;
|
||||||
|
|
||||||
chomp(my $hostarch = `dpkg --print-architecture`);
|
chomp(my $hostarch = `dpkg --print-architecture`);
|
||||||
my $options = {
|
my $options = {
|
||||||
|
@ -5871,7 +5871,7 @@ sub main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# setting PATH for chroot, ldconfig, start-stop-daemon...
|
# setting PATH for chroot, ldconfig, start-stop-daemon...
|
||||||
my $defaultpath = `eval \$(apt-config shell v DPkg::Path); printf \$v`;
|
my $defaultpath = `eval \$(apt-config shell v DPkg::Path); printf %s \$v`;
|
||||||
if (length $ENV{PATH}) {
|
if (length $ENV{PATH}) {
|
||||||
## no critic (Variables::RequireLocalizedPunctuationVars)
|
## no critic (Variables::RequireLocalizedPunctuationVars)
|
||||||
$ENV{PATH} = "$ENV{PATH}:$defaultpath";
|
$ENV{PATH} = "$ENV{PATH}:$defaultpath";
|
||||||
|
@ -8462,8 +8462,8 @@ its core, what B<mmdebstrap> does can be put into a 14 line shell script:
|
||||||
Apt::Architecture "$(dpkg --print-architecture)";
|
Apt::Architecture "$(dpkg --print-architecture)";
|
||||||
Apt::Architectures "$(dpkg --print-architecture)";
|
Apt::Architectures "$(dpkg --print-architecture)";
|
||||||
Dir "$(cd "$2" && pwd)";
|
Dir "$(cd "$2" && pwd)";
|
||||||
Dir::Etc::Trusted "$(eval "$(apt-config shell v Dir::Etc::Trusted/f)"; printf "$v")";
|
Dir::Etc::Trusted "$(eval "$(apt-config shell v Dir::Etc::Trusted/f)"; printf %s "$v")";
|
||||||
Dir::Etc::TrustedParts "$(eval "$(apt-config shell v Dir::Etc::TrustedParts/d)"; printf "$v")";
|
Dir::Etc::TrustedParts "$(eval "$(apt-config shell v Dir::Etc::TrustedParts/d)"; printf %s "$v")";
|
||||||
END
|
END
|
||||||
echo "deb http://deb.debian.org/debian/ $1 main" > "$2/etc/apt/sources.list"
|
echo "deb http://deb.debian.org/debian/ $1 main" > "$2/etc/apt/sources.list"
|
||||||
APT_CONFIG="$2/apt.conf" apt-get update
|
APT_CONFIG="$2/apt.conf" apt-get update
|
||||||
|
|
Loading…
Reference in a new issue