[debhelper-devel] [debhelper] 02/02: dh_installcatalogs: Check the return code of close
Niels Thykier
nthykier at moszumanska.debian.org
Sun Jun 25 10:17:47 UTC 2017
This is an automated email from the git hooks/post-receive script.
nthykier pushed a commit to branch master
in repository debhelper.
commit a4fe46d996a31bb0094e2811b5539ee77643e444
Author: Niels Thykier <niels at thykier.net>
Date: Sun Jun 25 10:17:14 2017 +0000
dh_installcatalogs: Check the return code of close
Signed-off-by: Niels Thykier <niels at thykier.net>
---
debian/changelog | 2 ++
dh_installcatalogs | 6 +++---
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index b4809ad..682a2eb 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -53,6 +53,8 @@ debhelper (10.5) UNRELEASED; urgency=medium
extention. This is more reliably for packages using dh_installman
to install manpages from the temporary install dir.
(Closes: #761024)
+ * dh_installcatalogs: Check the return code of close when generating
+ a catalog for sgml-base.
[ Iain Lane ]
* Dh_Lib: Re-add warning + exit 0 for the -i/-a shortcut that was
diff --git a/dh_installcatalogs b/dh_installcatalogs
index 7148d12..bc4f93b 100755
--- a/dh_installcatalogs
+++ b/dh_installcatalogs
@@ -102,11 +102,11 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
my $centralcat = "/etc/sgml/$package.cat";
- open(CENTRALCAT, ">", "$tmpdir$centralcat") || error("failed to write to $tmpdir$centralcat");
+ open(my $fd, ">", "$tmpdir$centralcat") || error("failed to write to $tmpdir$centralcat");
foreach my $sgmldest (@sgmlinstalled) {
- print CENTRALCAT "CATALOG " . $sgmldest . "\n";
+ print {$fd} "CATALOG " . $sgmldest . "\n";
}
- close CENTRALCAT;
+ close($fd) or error("close $tmpdir$centralcat: $!");
if (! $dh{NOSCRIPTS}) {
autotrigger($package, "activate-await", "update-sgmlcatalog");
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debhelper/debhelper.git
More information about the debhelper-devel
mailing list