summaryrefslogtreecommitdiff
path: root/scripts/Dpkg
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/Dpkg')
-rw-r--r--scripts/Dpkg/Arch.pm18
1 files changed, 6 insertions, 12 deletions
diff --git a/scripts/Dpkg/Arch.pm b/scripts/Dpkg/Arch.pm
index 7d3529429..fe0e75a0c 100644
--- a/scripts/Dpkg/Arch.pm
+++ b/scripts/Dpkg/Arch.pm
@@ -194,20 +194,14 @@ sub abitable_load()
local $_;
local $/ = "\n";
- # Because the abitable is only for override information, do not fail if
- # it does not exist, as that will only mean the other tables do not have
- # an entry needing to be overridden. This way we do not require a newer
- # dpkg by libdpkg-perl.
- if (open my $abitable_fh, '<', "$Dpkg::DATADIR/abitable") {
- while (<$abitable_fh>) {
- if (m/^(?!\#)(\S+)\s+(\S+)/) {
- $abibits{$1} = $2;
- }
+ open my $abitable_fh, '<', "$Dpkg::DATADIR/abitable"
+ or syserr(g_('cannot open %s'), 'abitable');
+ while (<$abitable_fh>) {
+ if (m/^(?!\#)(\S+)\s+(\S+)/) {
+ $abibits{$1} = $2;
}
- close $abitable_fh;
- } elsif ($! != ENOENT) {
- syserr(g_('cannot open %s'), 'abitable');
}
+ close $abitable_fh;
$abitable_loaded = 1;
}