Hi Matthijs! On Tue, May 12, 2020 at 03:22:01PM +0200, Matthijs Kooijman wrote: > Turns out there was a bug with the directory checking. I submitted a fix > here: > > https://salsa.debian.org/debian/devscripts/-/merge_requests/193 > > That MR also has a small change to the manpage that makes it a bit more > explicit that uscan works recursively by default.
Thank you for this, I've now merged it. > I still think that the current default might not be ideal. However, I do > see the usecase of running uscan over a collection of debian package at > the same time. Also, I personally hate changing long-standing defaults. > Maybe the default could be changed to only scan the current directory > *if* it is a debian source tree, and default to recursive scanning if > not? That would support both the "Run on a single package" and "Run on a > collection of packages" usecases neatly? That's too surprising. Changing behaviour that way just due to the surrounding files is too unexpected for me. Regardless, I'd accept an MR that would implement: > More specifically, I would suggest: > - Adding a `--no-recursive` option, which will always check only the > current dir (and probably produce an error if no valid package and > watchfile can be found). This might be implemented as an alias for > `--watchfile debian/watch` maybe. this, and > - Adding a `--recursive` option, which ensures that recursive operation > happens, even when the current directory is a valid source tree. This > is what is the current default operation. this, and > - Specifying more than one of `--recursive`, `--no-recursive` and > `--watchfile` is an error. this. > - When none of `--recursive`, `--no-recursive` and `--watchfile` is > specified, the default is to use `--no-recursive` when the current > directory is a source tree, and `--recursive` otherwise. Don't do this, instead leave the default --recursive on. Also perhaps add a relevant config item that would switch the default locally, so that one can set, e.g., USCAN_RECURSIVE=no in their ~/.devscripts and have it re-enabled with --recursive as needed. > One open question is what constitutes a "source tree" exactly for the > purpose of the default operation. The simplest (and most conservative) > is "Whenever a debian/ subdirectory exists", the most extensive is > probably "When a debian/changelog exists and can be parsed and > debian/watch exists". [ -f debian/changelog -a -f debian/watch ] should do IMHO. Without parsing, it would just fail a few moments later anyway. Thank you again for your contribution! :) -- regards, Mattia Rizzolo GPG Key: 66AE 2B4A FCCF 3F52 DA18 4D18 4B04 3FCD B944 4540 .''`. More about me: https://mapreri.org : :' : Launchpad user: https://launchpad.net/~mapreri `. `'` Debian QA page: https://qa.debian.org/developer.php?login=mattia `-
signature.asc
Description: PGP signature