[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Discussion of uscan enhancement 1 (Was: uscan enhancement take 3: script hook)



Le Wed, Sep 05, 2012 at 01:17:47AM +0200, Nicolas Boulenguez a écrit :
> 
> - "foo" should match "foo", even if a directory.
> but do not correct
> - "foo" should not match "bar/foo", even if a file.
> - "foo/" should never match, even if "foo" is a directory.
> 
> DEP5 does not distinguish files from directories, or whether paths
> contain a slash. Why should you do these tests in your code? I suggest
> the following patch.

Hello everybody,

the machine-readable format does not mention trailing slashes at the end
of directory names, and refers to the -path test of the GNU find command,
which will fail with trailing slashes.

Also, out of the 1,129 machine-readable files version 1.0 present in
the packages-metadata archive (http://wiki.debian.org/UpstreamMetadata),
only four have a trailing slash after a directory name:

$ for file in $(grep http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ */*.copyright -H | cut -f 1 -d ':' ) ; do grep-dctrl --eregex -FFiles -sFiles '/$' < $file 2> /dev/null && echo $file; done
Files: modules/nginx-dav-ext-module/
n/nginx.copyright
Files: signpost-core/src/main/java/com/
o/oauth-signpost.copyright
Files: game/LuaUI/
s/spring.copyright
Files: lib/yard/rubygems/backports/
y/yard.copyright

(No Files field matched '/ ')

Andreas, I think that you can consider such entries a bug and output a warning
when finding them, or rejecting the whole file as invalid.

If this is unclear in the current specification, it can be clarified in the
next revision.

Have a nice day,

-- 
Charles Plessy
Tsurumi, Kanagawa, Japan


Reply to: