Created
October 17, 2013 07:41
-
-
Save bessarabov/7020726 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git show aa2facfcf73dbe7cbcdaa83a26049785943d963b|cat | |
commit aa2facfcf73dbe7cbcdaa83a26049785943d963b | |
Author: Lasse Makholm <[email protected]> | |
Date: Thu Jan 10 15:44:44 2013 +0100 | |
Fix repo_source_to_contents_paths() to also work on Ubuntu | |
Make sure to generate paths both with and without components to | |
be compatible with both old and new apt-file versions. See: | |
https://bugs.launchpad.net/ubuntu/+source/dh-make-perl/+bug/1034881 | |
LP: #1034881 | |
diff --git a/lib/Debian/AptContents.pm b/lib/Debian/AptContents.pm | |
index 8e1f887..bab2765 100644 | |
--- a/lib/Debian/AptContents.pm | |
+++ b/lib/Debian/AptContents.pm | |
@@ -196,8 +196,13 @@ sub repo_source_to_contents_paths { | |
s{^/}{} for ( $host, $dir, $dist ); # remove initial / | |
s{/}{_}g for ( $host, $dir, $dist ); # replace remaining / | |
+ # Make sure to generate paths both with and without components to | |
+ # be compatible with both old and new apt-file versions. See: | |
+ # https://bugs.launchpad.net/ubuntu/+source/dh-make-perl/+bug/1034881 | |
+ push(@components, ''); | |
+ | |
return map | |
- { $host . "_" . join( "_", $dir || (), "dists", $dist, $_ ) } | |
+ { $host . "_" . join( "_", grep( { defined and length } $dir, "dists", $dist, $_ ) ) } | |
@components; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment