[libconfig-model-dpkg-perl] 01/02: Revert "Copyright update: can replace old directory entries"
dod at debian.org
dod at debian.org
Thu Jun 25 19:41:03 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 1088eb1e973bbc48470791984c421e5dfdbaa67a
Author: Dominique Dumont <dod at debian.org>
Date: Thu Jun 18 19:09:03 2015 +0200
Revert "Copyright update: can replace old directory entries"
This reverts commit 7295ea5d9c0a54d1494b30f450c9ced43e539d70.
---
lib/Config/Model/Dpkg/Copyright.pm | 4 ++--
lib/Dpkg/Copyright/Scanner.pm | 10 ++--------
2 files changed, 4 insertions(+), 10 deletions(-)
diff --git a/lib/Config/Model/Dpkg/Copyright.pm b/lib/Config/Model/Dpkg/Copyright.pm
index a074329..b663792 100644
--- a/lib/Config/Model/Dpkg/Copyright.pm
+++ b/lib/Config/Model/Dpkg/Copyright.pm
@@ -95,7 +95,7 @@ sub update ($self, %args) {
# * %old_split_files contains paths no longer present. Useful to trace deleted files
# implode files entries with same data index
- __squash(\%new_split_files, \%old_split_files) ;
+ __squash(\%new_split_files) ;
# pack files by copyright id
my @packed = __pack_files(\%new_split_files);
@@ -168,7 +168,7 @@ sub update ($self, %args) {
# warn about old files
foreach my $old_path (sort keys %old_split_files) {
- # put back data matching an existing dir (data may be redundant or obsolete though)
+ # put back data matching an existing dir
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} );
diff --git a/lib/Dpkg/Copyright/Scanner.pm b/lib/Dpkg/Copyright/Scanner.pm
index 85c162b..14b458d 100644
--- a/lib/Dpkg/Copyright/Scanner.pm
+++ b/lib/Dpkg/Copyright/Scanner.pm
@@ -339,7 +339,7 @@ sub __coalesce_copyright_years($entries, $owners) {
# $h is a tree of hash matching the directory structure. Each leaf is a
# copyright id.
-sub __squash ($h, $old_dirs = {}, $path = [] ) {
+sub __squash ($h) {
my %count ;
# count the number of times each (c) info is used in this directory.
@@ -349,7 +349,7 @@ sub __squash ($h, $old_dirs = {}, $path = [] ) {
if (ref($item)) {
# squash may return a plain id, or a hash with '*' => id ,
# or a non squashable hash
- $h->{$name} = __squash($item, $old_dirs, [ $path->@*, $name ]);
+ $h->{$name} = __squash($item);
}
my $id = (ref($item) and defined $item->{'*'}) ? $item->{'*'} : $item ;
@@ -390,12 +390,6 @@ sub __squash ($h, $old_dirs = {}, $path = [] ) {
# here's the '*' file representing the most used (c) info
$h->{'*'} //= $max_id if defined $max_id;
- # delete current directory entry
- my $dir_path = join('/', $path->@*,'*');
- if ($old_dirs->{$dir_path}) {
- say "Removing old entry $dir_path";
- delete $old_dirs->{$dir_path};
- }
return $h;
}
--
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