Bug#796986: uscan: repacksuffix does not ajust version passed to uupdate

Osamu Aoki osamu at debian.org
Thu Aug 27 09:14:33 UTC 2015


Hi,

On Wed, Aug 26, 2015 at 10:07:28PM -0400, James McCoy wrote:
> On Thu, Aug 27, 2015 at 12:00:50AM +0900, Osamu Aoki wrote:
...
> > +    if (defined $options{'repacksuffix'}) {
> > +	# assume it was repacked (if wasn't, remove opts=repacksuffix in watchfile)
> 
> There shouldn't be a need to assume.  $repack is set if a repack was
> requested, so an adjustment should be moved into the previous if block
> (which is what calls mk-origtargz).

That is what I initially thought ... but not quite so.

The --repack-suffix produces conditional repack/rename results without
--repack.

There is a case where repack happens without explicit --repack option.

See following parts in the mk-origtargz source:

| =item B<-S>, B<--repack-suffix> I<suffix>
| 
| If the file has to be modified, because of B<Files-Excluded>, append I<suffix> to the upstream version.
| 
...
| if ($is_tarfile and not $repack) {
|     # If we are not explicitly repacking, but need to generate a file
|     # (usually due to Files-Excluded), then we want to use the original
|     # compression scheme.
|     $compression = compression_guess_from_file ($upstream);
...
| # Actually do the unpack, remove, pack cycle
| if ($do_repack || $deletecount) {
|     decompress_archive($upstream_tar, $destfiletar);
...
|     # Symlink no longer makes sense
|     $mode = "repack";
|     $upstream_tar = $destfile;
...

$mode usually starts as symlink.  But upon seeing Files-excludes
($deletecount), it becomes repack after repacking the tarball.  This is
conditional on if Files-Excluded still applied to the upstream source.

Actually, this behavior of --repack-suffix is not suitable to support
multiple upstream tarballs in some case.

If main tarball has Files-Excluded, we can use --repack-suffix and happy.

But is secondary tarball does not have Files-Excluded-like thing, we
should make symlink while adding suffix without repack.  I am adding
--suffix option to my development version of mk-origtargz to support
such case.

So 2 choices for opts=suffix and opts=repacksuffix in watchfile allow us
to check if Files-Excluded is still valid or not; and support multiple
tarballs.

Anyway, I am not really a perl user.  Reading this source was a bit of
task :-) "sub safe_replace($$)" in uscan.pl is impressiveand very useful
code in some sense which I am not inclined to change anything in it.
Too complicated for me.  But I am thinking to use it to do the
pagenmangle.

Osamu



More information about the devscripts-devel mailing list