dereference array foreignarchs before iterating

This commit is contained in:
Johannes 'josch' Schauer 2018-11-02 17:24:28 +01:00
parent cb44551009
commit 7948894159
Signed by untrusted user: josch
GPG key ID: F2CBA5C78FBD83E1

View file

@ -624,7 +624,7 @@ sub setup {
if (scalar @{$options->{foreignarchs}} > 0) {
open my $fh, '>', "$options->{root}/var/lib/dpkg/arch" or die "cannot open /var/lib/dpkg/arch: $!";
print $fh "$options->{nativearch}\n";
foreach my $arch ($options->{foreignarchs}) {
foreach my $arch (@{$options->{foreignarchs}}) {
print $fh "$arch\n";
}
close $fh;