r39277 - in /trunk/dh-make-perl: debian/changelog debian/control lib/Debian/AptContents.pm t/AptContents.t

carnil-guest at users.alioth.debian.org carnil-guest at users.alioth.debian.org
Fri Jul 3 19:17:30 UTC 2009


Author: carnil-guest
Date: Fri Jul  3 19:17:24 2009
New Revision: 39277

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=39277
Log:
* Add myself to Uploaders 
* Correct test in t/AptContents.t for file: schema.
* Further improve gregoa's change and follow now that was apt-file is doing.
  (See #535017). 

Modified:
    trunk/dh-make-perl/debian/changelog
    trunk/dh-make-perl/debian/control
    trunk/dh-make-perl/lib/Debian/AptContents.pm
    trunk/dh-make-perl/t/AptContents.t

Modified: trunk/dh-make-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/dh-make-perl/debian/changelog?rev=39277&op=diff
==============================================================================
--- trunk/dh-make-perl/debian/changelog (original)
+++ trunk/dh-make-perl/debian/changelog Fri Jul  3 19:17:24 2009
@@ -11,7 +11,13 @@
     file:/ URIs, add a test. Thanks to Raphael Geissert for the bug report
     (closes: #535017).
 
- -- Nathan Handler <nhandler at ubuntu.com>  Wed, 17 Jun 2009 13:24:08 +0000
+  [ Salvatore Bonaccorso ]
+  * Add myself to Uploaders 
+  * Correct test in t/AptContents.t for file: schema.
+  * Further improve gregoa's change and follow now that was apt-file is doing.
+    (See #535017). 
+
+ -- Salvatore Bonaccorso <salvatore.bonaccorso at gmail.com>  Fri, 03 Jul 2009 21:16:42 +0200
 
 dh-make-perl (0.56) unstable; urgency=low
 

Modified: trunk/dh-make-perl/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/dh-make-perl/debian/control?rev=39277&op=diff
==============================================================================
--- trunk/dh-make-perl/debian/control (original)
+++ trunk/dh-make-perl/debian/control Fri Jul  3 19:17:24 2009
@@ -29,7 +29,8 @@
  Christopher Sacca <csacca at thecsl.org>,
  Damyan Ivanov <dmn at debian.org>, gregor herrmann <gregoa at debian.org>,
  Oliver Gorwits <oliver.gorwits at oucs.ox.ac.uk>,
- Ryan Niebur <ryanryan52 at gmail.com>, Nathan Handler <nhandler at ubuntu.com>
+ Ryan Niebur <ryanryan52 at gmail.com>, Nathan Handler <nhandler at ubuntu.com>,
+ Salvatore Bonaccorso <salvatore.bonaccorso at gmail.com>
 Standards-Version: 3.8.2
 Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/dh-make-perl/
 Vcs-Browser: http://svn.debian.org/viewsvn/pkg-perl/trunk/dh-make-perl/

Modified: trunk/dh-make-perl/lib/Debian/AptContents.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/dh-make-perl/lib/Debian/AptContents.pm?rev=39277&op=diff
==============================================================================
--- trunk/dh-make-perl/lib/Debian/AptContents.pm (original)
+++ trunk/dh-make-perl/lib/Debian/AptContents.pm Fri Jul  3 19:17:24 2009
@@ -147,26 +147,15 @@
 sub repo_source_to_contents_path {
     my ( $self, $source ) = @_;
 
-    my ( $schema, $proto, $host, $port, $dir, $dist, $components ) = $source =~ m{
-        ^
-        (\S+)           # deb or deb-src
-        \s+
-        ([^:\s]+)       # ftp/http/file/cdrom
-        ://?            # file:/ http:// ftp://
-        ([^:/\s]+)      # host name or path
-        (?:
-            :(\d+)      # optional port number
+    my ( $schema, $uri, $dist, @extra ) = split /\s+/, $source;
+    my ( $proto, $host, $port, $dir ) = $uri =~ m{
+	^
+        (?:([^:/?\#]+):)?                      # proto
+        (?://
+        	([^:/?\#]*)                     # host
+                (?::(\d+))?                     # port
         )?
-        (?:
-            /
-            (\S*)       # path on server (or local)
-        )?
-        \s+
-        (\S+)           # distribution
-        (?:
-            \s+
-            (.+)        # components
-        )?
+        ([^?\s\#]*)                             # path
     }x;
 
     unless ( defined $schema ) {
@@ -184,12 +173,14 @@
         }
     }
 
+    $host ||= '';   # set empty string if $host is undef
     $dir ||= '';    # deb http://there sid main
 
         s{/$}{} for( $host, $dir, $dist );  # remove trailing /
+	s{^/}{} for( $host, $dir, $dist );  # remove initial /
         s{/}{_}g for( $host, $dir, $dist ); # replace remaining /
 
-    return join( "_", $host, $dir||(), "dists", $dist );
+    return ( $host . "_" . join( "_", $dir||(), "dists", $dist ) );
 }
 
 =item get_contents_files

Modified: trunk/dh-make-perl/t/AptContents.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/dh-make-perl/t/AptContents.t?rev=39277&op=diff
==============================================================================
--- trunk/dh-make-perl/t/AptContents.t (original)
+++ trunk/dh-make-perl/t/AptContents.t Fri Jul  3 19:17:24 2009
@@ -75,7 +75,7 @@
 is(
     $apt_contents->repo_source_to_contents_path(
         'deb file:/home/jason/debian stable main contrib non-free'),
-    'home_jason_debian_dists_stable',
+    '_home_jason_debian_dists_stable',
     'source line conversion 6',
 );
 




More information about the Pkg-perl-cvs-commits mailing list