[libconfig-model-dpkg-perl] 26/33: Copyright update: use Path::Tiny to check if dir entry still exists
dod at debian.org
dod at debian.org
Mon Mar 30 17:41:44 UTC 2015
This is an automated email from the git hooks/post-receive script.
dod pushed a commit to branch master
in repository libconfig-model-dpkg-perl.
commit 79d4896af69085141890c8d37cef65153b331ea6
Author: Dominique Dumont <dod at debian.org>
Date: Sat Mar 28 16:25:49 2015 +0100
Copyright update: use Path::Tiny to check if dir entry still exists
---
lib/Config/Model/Dpkg/Copyright.pm | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/lib/Config/Model/Dpkg/Copyright.pm b/lib/Config/Model/Dpkg/Copyright.pm
index d25bf37..7517785 100644
--- a/lib/Config/Model/Dpkg/Copyright.pm
+++ b/lib/Config/Model/Dpkg/Copyright.pm
@@ -136,10 +136,12 @@ sub update ($self, %args) {
$files_obj->fetch_with_id($deb_path)->load_data( $debian_paths{$deb_path} );
}
+ my $current_dir = $args{from_dir} || path('.');
+
# warn about old files
foreach my $old_path (sort keys %old_split_files) {
# put back data matching an existing dir
- if ($old_path eq '*' or ($old_path =~ m!(.*)/\*$! and -d $1)) {
+ if ($old_path eq '*' or ($old_path =~ m!(.*)/\*$! and $current_dir->is_dir($1))) {
say "Note: preserving entry '$old_path'";
$files_obj->fetch_with_id($old_path)->load_data( $old_split_files{$old_path} );
}
@@ -149,7 +151,6 @@ sub update ($self, %args) {
}
# read a debian/fix.scanned.copyright file to patch scanned data
- my $current_dir = $args{from_dir} || path('.');
my $debian = $current_dir->child('debian'); # may be missing in test environment
if ($debian->is_dir) {
$debian->children(qr/fix\.scanned\.copyright$/);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libconfig-model-dpkg-perl.git
More information about the Pkg-perl-cvs-commits
mailing list