Bug#831521: Custom repacking

Osamu Aoki osamu at debian.org
Mon Aug 28 14:12:56 UTC 2017


Hi,

On Sun, Aug 27, 2017 at 05:24:43PM -0400, Sergio Durigan Junior wrote:
> Anyway, I took the liberty and implemented the following mostly-untested
> patch to uscan which uses your idea and executes debian/mk-origtargz (if
> it exists and is executable) instead of the system's mk-origtargz.

Thanks 
 
> diff --git a/scripts/uscan.pl b/scripts/uscan.pl
> index f871daf2..49a7acb2 100755
> --- a/scripts/uscan.pl
> +++ b/scripts/uscan.pl
> @@ -60,8 +60,9 @@ than the last upstream version.
>  =item * B<uscan> saves the downloaded tarball to the parent B<../> directory:
>  I<< ../<upkg>-<uversion>.tar.gz >>
>  
> -=item * B<uscan> invokes B<mk-origtargz> to create the source tarball: I<<
> -../<spkg>_<oversion>.orig.tar.gz >>
> +=item * B<uscan> invokes B<mk-origtargz> to create the source tarball:
> +I<< ../<spkg>_<oversion>.orig.tar.gz >> (if F<debian/mk-origtargz>
> +exists and is executable, then execute it instead).
>  
>  =over
>  
> @@ -706,7 +707,8 @@ doesn't work.
>  
>  B<uscan> invokes B<mk-origtargz> to create the source tarball properly named
>  for the source package with B<.orig.> (or B<< .orig-<component>. >> for the
> -secondary tarballs) in its filename.
> +secondary tarballs) in its filename.  If F<debian/mk-origtargz> exists and is
> +executable, then B<uscan> invokes it instead.
>  
>  =over
>  
> @@ -3764,7 +3766,15 @@ EOF
>      my $path = "$destdir/$newfile_base";
>      my $target = $newfile_base;
>      unless ($symlink eq "no") {
> -	my @cmd = ("mk-origtargz");
> +	my @cmd = ();
> +	if (-x 'debian/mk-origtargz') {
> +	    # If the user has specified a personalized 'mk-origtargz'
> +	    # under debian/, we use it instead of the system script.
> +	    push @cmd "debian/mk-origtargz";
> +	    uscan_verbose "Using debian/mk-origtargz instead of mk-origtargz\n";
> +	} else {
> +	    push @cmd "mk-origtargz";
> +	}
>  	push @cmd, "--package", $pkg;
>  	push @cmd, "--version", $common_mangled_newversion;
>  	push @cmd, '--repack-suffix', $options{repacksuffix} if defined $options{repacksuffix};

Yes, this is what I am talking about.  Maybe, we should add
F<debian/uupdate> in the same way. 

Adding these features are easy but let's go slow.  Once we add any
features, we can't remove them easily.  Let's wait and check if there
are no objection or second thought.

Regards,

Osamu



More information about the devscripts-devel mailing list