On Thu, Jun 04, 2009 at 07:43:53PM +1000, Felipe Sateler wrote:
> Package: git-buildpackage
> Version: 0.4.53
> Severity: minor
> Tags: patch
> 
> 
> Automatic guessing of version by parsing package's upstream tarball name
> is wrong. It misses + and : and capital letters
Not entirely. The first regex is the name of a debian source (see
sections 5.6.7) so no uppercase here. The colon indicates epochs so I
don't think we want that one in a version number either.
However allowing for uppercase letters in the non .orig.tar.gz case make
sense as does allowing uppercase letters in version numbers. I'll add
that.
Thanks,
 -- Guido

> 
> The attached patch fixes this issue, and makes both regex use the same
> version pattern.
> 
> -- System Information:
> Debian Release: squeeze/sid
>   APT prefers unstable
>   APT policy: (500, 'unstable')
> Architecture: amd64 (x86_64)
> 
> Kernel: Linux 2.6.29-2-amd64 (SMP w/2 CPU cores)
> Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
> Shell: /bin/sh linked to /bin/bash
> 
> Versions of packages git-buildpackage depends on:
> ii  devscripts                   2.10.50     scripts to make the life of a 
> Debi
> ii  git-core                     1:1.6.3.1-1 fast, scalable, distributed 
> revisi
> ii  python                       2.5.4-2     An interactive high-level 
> object-o
> ii  python-dateutil              1.4.1-3     powerful extensions to the 
> standar
> ii  python-support               1.0.3       automated rebuilding support for 
> P
> 
> Versions of packages git-buildpackage recommends:
> ii  pristine-tar                  1.00       regenerate pristine tarballs
> 
> Versions of packages git-buildpackage suggests:
> pn  git-load-dirs                 <none>     (no description available)
> 
> -- no debconf information

> --- /usr/bin/git-import-orig  2009-05-04 02:42:13.000000000 +1000
> +++ ../git-import-orig        2009-06-04 19:42:24.000000000 +1000
> @@ -202,10 +202,11 @@
>      @archive: filename to guess to version for
>      @version_regex: additional version regex to apply, needs a 'version' 
> group
>      """
> +    version_group = r'(?P<version>[A-Za-z\d\.\~\-\+\:]+)'
>      version_filters = [ # Debian package_<version>.orig.tar.gz:
> -                        
> r'^[a-z\d\.\+\-]+_(?P<version>[a-z\d\.\~\-]+)\.orig\.tar\.(gz|bz2)',
> +                        r'^[A-Za-z\d\.\+\-]+_' + version_group + 
> '\.orig\.tar\.(gz|bz2)',
>                          # Upstream package-<version>.tar.gz:
> -                        
> r'^[a-z\d\.\+\-]+-(?P<version>[a-z\d\.]+)\.tar\.(gz|bz2)' ]
> +                        r'^[A-Za-z\d\.\+\-]+-' + version_group + 
> '\.tar\.(gz|bz2)' ]
>      if version_regex:
>          version_filters = version_regex + version_filters
>      for filter in version_filters:




-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to