Hi,
On Sat, May 17, 2014 at 06:07:59PM +0200, Maximiliano Curia wrote:
> Package: git-buildpackage
> Version: 0.6.13
> Severity: normal
> Tags: patch
> 
> Hi,
> 
> The current behavior in import-orig is to create an orig symlink in ../ even 
> if
> the user configures tarball-dir. The attached patch adds the argument
> --tarball-dir so the user can override the symlink location.

Thanks for your patch but why would I want to create the symlink in
tarball-dir. gbp buildpackage will then create the symlink in ../
anyways so dpkg-source etc see the correct tarball.
  -- Guido

> 
> Please consider applying this patch.
> 
> I added the option to import_group, if you would prefer for it to be in a
> different group, please let me know.
> 
> Thanks
> -- System Information:
> Debian Release: jessie/sid
>   APT prefers unstable
>   APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental')
> Architecture: amd64 (x86_64)
> Foreign Architectures: i386
> 
> Kernel: Linux 3.14-1-amd64 (SMP w/4 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.14.2
> ii  git                   1:2.0.0~rc2-1
> ii  man-db                2.6.7.1-1
> ii  python                2.7.6-1
> ii  python-dateutil       1.5+dfsg-1
> ii  python-pkg-resources  3.4.4-1
> 
> Versions of packages git-buildpackage recommends:
> ii  cowbuilder    0.73
> ii  pristine-tar  1.31
> 
> Versions of packages git-buildpackage suggests:
> ii  python-notify  0.1.1-3
> ii  unzip          6.0-12
> 
> -- no debconf information
> 
> -- debsums errors found:
> debsums: changed file /usr/share/pyshared/gbp/scripts/import_orig.py (from 
> git-buildpackage package)

> >From 3cc6d09dca0eb6f05eca5c09165e34d7d0a3a090 Mon Sep 17 00:00:00 2001
> From: Maximiliano Curia <m...@gnuservers.com.ar>
> Date: Sat, 17 May 2014 17:51:40 +0200
> Subject: [PATCH] Create orig symlink in the user specified tarball-dir
> 
> ---
>  gbp/scripts/import_orig.py | 11 ++++++++---
>  1 file changed, 8 insertions(+), 3 deletions(-)
> 
> diff --git a/gbp/scripts/import_orig.py b/gbp/scripts/import_orig.py
> index 542896e..7fc917d 100644
> --- a/gbp/scripts/import_orig.py
> +++ b/gbp/scripts/import_orig.py
> @@ -34,7 +34,7 @@ from gbp.scripts.common.import_orig import 
> (OrigUpstreamSource, cleanup_tmp_tree
>                                              repack_source, is_link_target)
>  
>  
> -def prepare_pristine_tar(archive, pkg, version):
> +def prepare_pristine_tar(archive, pkg, version, tarball_dir):
>      """
>      Prepare the upstream source for pristine tar import.
>  
> @@ -59,7 +59,9 @@ def prepare_pristine_tar(archive, pkg, version):
>      if ext in ['.tgz', '.tbz2', '.tlz', '.txz' ]:
>          ext = ".%s" % ext[2:]
>  
> -    link = "../%s_%s.orig.tar%s" % (pkg, version, ext)
> +    link_dir = tarball_dir or '..'
> +
> +    link = "%s/%s_%s.orig.tar%s" % (link_dir, pkg, version, ext)
>  
>      if os.path.basename(archive) != os.path.basename(link):
>          try:
> @@ -224,6 +226,8 @@ def build_parser(name):
>                        dest="filter_pristine_tar")
>      import_group.add_config_file_option(option_name="import-msg",
>                        dest="import_msg")
> +    import_group.add_config_file_option(option_name="tarball-dir", 
> dest="tarball_dir", type="path",
> +                      help="location to look for external tarballs")
>      import_group.add_boolean_config_file_option(option_name="symlink-orig",
>                                                  dest="symlink_orig")
>      cmd_group.add_config_file_option(option_name="postimport", 
> dest="postimport")
> @@ -306,7 +310,8 @@ def main(argv):
>  
>          (pristine_orig, linked) = prepare_pristine_tar(source.path,
>                                                         sourcepackage,
> -                                                       version)
> +                                                       version,
> +                                                       options.tarball_dir)
>  
>          # Don't mess up our repo with git metadata from an upstream tarball
>          try:
> -- 
> 2.0.0.rc2
> 


-- 
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