[Reproducible-commits] [dpkg] 17/61: Dpkg::Source::Package::V2: Do not warn when removing an empty subdirectory
Jérémy Bobbio
lunar at moszumanska.debian.org
Mon Sep 21 09:56:05 UTC 2015
This is an automated email from the git hooks/post-receive script.
lunar pushed a commit to branch pu/reproducible_builds
in repository dpkg.
commit 98b4330b2cde21512a87a751553b48e2b83e5b55
Author: Guillem Jover <guillem at debian.org>
Date: Mon Aug 31 05:07:18 2015 +0200
Dpkg::Source::Package::V2: Do not warn when removing an empty subdirectory
When extracting a source package, do not warn if the pathname to remove
is an empty directory, just silently remove it, as it might be part of
a git repository, as a submodule for example.
Closes: #796671
---
debian/changelog | 2 ++
scripts/Dpkg/Source/Package/V2.pm | 4 ++++
2 files changed, 6 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index a37cd29..ddbba64 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -16,6 +16,8 @@ dpkg (1.18.3) UNRELEASED; urgency=low
- Only warn on invalid week days instead of aborting in
Dpkg::Changelog::Entry::Debian. Regression introduced in dpkg 1.18.2.
Reported by Jakub Wilk <jwilk at debian.org>.
+ - Do not warn when removing an empty subdirectory on source package
+ extraction in Dpkg::Source::Package::V2. Closes: #796671
* Test suite:
- Get the reference build flags from dpkg-buildflags.pl, instead of
hardcoding them, which might not match depending on the architecture.
diff --git a/scripts/Dpkg/Source/Package/V2.pm b/scripts/Dpkg/Source/Package/V2.pm
index 99fab9c..58244b2 100644
--- a/scripts/Dpkg/Source/Package/V2.pm
+++ b/scripts/Dpkg/Source/Package/V2.pm
@@ -172,6 +172,10 @@ sub do_extract {
foreach my $subdir (sort keys %addonfile) {
my $file = $addonfile{$subdir};
info(g_('unpacking %s'), $file);
+
+ # If the pathname is an empty directory, just silently remove it, as
+ # it might be part of a git repository, as a submodule for example.
+ rmdir "$newdirectory/$subdir";
if (-e "$newdirectory/$subdir") {
warning(g_("required removal of '%s' installed by original tarball"),
$subdir);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/dpkg.git
More information about the Reproducible-commits
mailing list