[libconfig-model-dpkg-perl] 24/33: Scanner: split file paths later
dod at debian.org
dod at debian.org
Mon Mar 30 17:41:43 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 43ffc3dfdec4f05bf6186f7fdd200b4dd5f306aa
Author: Dominique Dumont <dod at debian.org>
Date: Sat Mar 28 12:26:53 2015 +0100
Scanner: split file paths later
---
lib/Dpkg/Copyright/Scanner.pm | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/lib/Dpkg/Copyright/Scanner.pm b/lib/Dpkg/Copyright/Scanner.pm
index dc0f005..8ecc141 100644
--- a/lib/Dpkg/Copyright/Scanner.pm
+++ b/lib/Dpkg/Copyright/Scanner.pm
@@ -112,9 +112,7 @@ sub scan_files ( %args ) {
$c = __pack_copyright($c);
- my $a = $copyrights{$c}{$l} //= $id++;
- # split file path and fill recursive hash, leaf is id
- __create_tree_leaf_from_paths ($files,$f,$a);
+ $files->{$f} = $copyrights{$c}{$l} //= $id++;
}
my @copyrights_by_id ;
@@ -131,11 +129,17 @@ sub scan_files ( %args ) {
# replace the old ids with news ids
__swap_merged_ids($files, $merged_c_info);
+ # split file path and fill recursive hash, leaf is id
+ my $split_files = {};
+ foreach my $path (keys %$files) {
+ __create_tree_leaf_from_paths ($split_files,$path,$files->{$path});
+ }
+
# regroup %files hash: all leaves have same id -> wild card
- my $squashed = __squash($files);
+ __squash($split_files);
# pack files by copyright id
- my @packed = __pack_files($files);
+ my @packed = __pack_files($split_files);
my @copyright_data;
--
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