Subject: Re: Bug#831521: uscan: Implement new 'nomktar' option on watch file

From: Osamu Aoki <[email-masked]>
Date: Mon, 18 Jul 2016 00:14:03 +0900

Hi,

On Sat, Jul 16, 2016 at 05:51:21PM -0400, Sergio Durigan Junior wrote:
> Package: devscripts
> Tags: patch
> 
> Hi,
> 
> Rationale: <https://lists.debian.org/debian-mentors/2016/07/msg00389.html>
> 
> Some Debian maintainers have to deal with upstream projects that do not
> offer tarballs for releases.  The modus operandi for working around this
> "issue" is to provide your own replacement for the 'uupdate' script,
> which should be responsible for manipulating the file(s) downloaded from
> upstream and prepare a "fake" tarball to be provided to 'uupdate'.
> 
> This works, but has one drawback: there is no "easy" way to suppress the
> 'mk-origtargz' program to run.  And the problem with this is that
> 'mk-origtargz' expects a compressed tarball as its input, always.
> Calling it in the situation described above leads to an error.  So, the
> user is left with some non-ideal options:
> 
> 1) Invoke 'uscan' passing '--no-symlink' as one of the parameters.  This
> has the side-effect of skipping the call to 'mk-origtargz'.  The obvious
> disadvantages are: (a) it is not obvious to the user that this option
> solves the problem described above, and (b) the user will have to
> remember to pass this option every time.
> 
> 2) Hacking the 'uupdate'-replacement script in order to invoke it by
> hand.  The obvious disadvantage is that the user won't be able to use
> 'uscan', and also will have to remember this every time.
> 
> Therefore, to fix this issue, I am proposing a new option, to be
> provided via 'opts=' in the watch file, whose purpose is to suppress the
> execution of 'mk-origtargz'.  Its effect will be similar to passing
> '--no-symlink', although the user will still be able to provide
> '--rename', for example.
> 
> Opinions?

This is certainly one way to solve your problem .... and I see some
people abused uupdate slot for this purpose.

But replacing uupdate (updating source tree from repackaged tarball and
old source tree) with a command for another purpose seems to complicate
situation.  We want to run your alternative command in place of
mk-origtargz.  How about ...  if debian/mk-mk-origtargz exists, use it
instead of mk-origtargz.

I know there are some resentments to run a script in debian/* but this
part is not executed when just scanning archive.  So situation is no
worse than uupdate situation.

Currently, mk-origtargz output is scanned to set some parameters so your
mk-origtargz may need to be written carefully.  That's the negative of
this approach but certainly this is another way to solve your problem.

By the way, can you tall me exact case you are thinking so we know we
are attacking the real problem (not just theoretical cases).

Note:

There is a question on how you call your alternative uupdate command
$cmd.  Currently, uscan invokes non-uupdate $cmd as:
 Version 4  : "$cmd --upstream-version <version>"
 Version 2,3: "$cmd --upstream-version <version> <path>"
 Version 1  : "$cmd <path> <version>"
This <path> is the full path filename of the file downloaded.

Maybe, I should also make version 4 to do the same as version 3 if $cmd
is not uupdate.  If $cmd is uupdate for version 4, it calls
 Version 4  : "uupdate --find --upstream-version <version>"
(This is because the <path> should be pointing the file in ../)

Anyway, these needs to be updated with documentation if this is
something needs to be done...

Osamu