Bug#791918: devscripts: [wnpp-check] Ability to query for exact package name

Balasankar C balasankarc at autistici.org
Thu Jul 9 14:36:52 UTC 2015


Package: devscripts
Version: 2.15.5
Severity: wishlist
Tags: patch

Dear Maintainer,

Currently, wnpp-check does a regex match on package names which returns true if
the searched text is found somewhere in the list of packages with ITP/RFP.
Example : `wnpp-check ruby-grape` will return true with an RFP filed on
ruby-grape-entity.
This is because of the use of grep in wnpp-check.

However, there are scenarios where we want wnpp-check to return true only if the
exact package name that we search for is found. That is, `wnpp-check ruby-grape`
should return false. One of such scenario I am facing is when I am checking
which all dependencies of gitlab are packaged. As part of it, I take a list of dependencies
and do wnpp-check on them. Based on the result, I generate a progressbar [1].
However, this gives false positives as explained above.

The attached patch is one way to fix the issue. By adding a --exact/-e option
to tackle this scenario. Please use it if it meets the coding standards or be kind
enough to add such an option.

-- System Information:
Debian Release: stretch/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 4.0.0-2-686-pae (SMP w/4 CPU cores)
Locale: LANG=ml_IN, LC_CTYPE=ml_IN (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages devscripts depends on:
ii  dpkg-dev     1.18.1
ii  libc6        2.19-18
ii  perl         5.20.2-6
ii  python3      3.4.3-4
pn  python3:any  <none>

Versions of packages devscripts recommends:
ii  at                          3.1.16-1
ii  curl                        7.43.0-1
ii  dctrl-tools                 2.24-1
ii  debian-keyring              2015.06.19
ii  dput                        0.9.6.4
ii  equivs                      2.0.9
ii  fakeroot                    1.20.2-1
ii  file                        1:5.22+15-2
ii  gnupg                       1.4.19-3
ii  libdistro-info-perl         0.14
ii  libencode-locale-perl       1.03-1
ii  libjson-perl                2.90-1
ii  liblwp-protocol-https-perl  6.06-2
ii  libsoap-lite-perl           1.11-1
ii  liburi-perl                 1.64-1
ii  libwww-perl                 6.13-1
ii  lintian                     2.5.32
ii  man-db                      2.7.0.2-5
ii  patch                       2.7.5-1
ii  patchutils                  0.3.4-1
ii  python3-debian              0.1.27
ii  python3-magic               1:5.22+15-2
ii  sensible-utils              0.0.9
ii  strace                      4.10-2
ii  unzip                       6.0-17
ii  wdiff                       1.2.2-1
ii  wget                        1.16.3-3
ii  xz-utils                    5.1.1alpha+20120614-2.1

Versions of packages devscripts suggests:
ii  bsd-mailx [mailx]            8.1.2-0.20150408cvs-1
ii  build-essential              11.7
pn  cvs-buildpackage             <none>
pn  debbindiff                   <none>
pn  devscripts-el                <none>
ii  gnuplot                      4.6.6-2
ii  gpgv                         1.4.19-3
ii  libauthen-sasl-perl          2.1600-1
ii  libfile-desktopentry-perl    0.12-1
ii  libnet-smtp-ssl-perl         1.01-3
pn  libterm-size-perl            <none>
ii  libtimedate-perl             2.3000-2
pn  libyaml-syck-perl            <none>
pn  mutt                         <none>
ii  openssh-client [ssh-client]  1:6.7p1-6
ii  svn-buildpackage             0.8.5+nmu1
ii  w3m                          0.5.3-22

-- no debconf information
-------------- next part --------------
13d12
< PACKAGES="$@"
16a16,23
> if [ "x$1" = "x--exact" -o "x$1" = "x-e" ]; then
>     shift
>     PACKAGES="$@"
>     EXACT=1
> else
>     PACKAGES="$@"
>     EXACT=0
> fi
75c82,86
<     grep $pkg $WNPP_PACKAGES && FOUND=1
---
>     if [ $EXACT = 1 ]; then
>         grep " $pkg$" $WNPP_PACKAGES && FOUND=1
>     else
>         grep $pkg $WNPP_PACKAGES && FOUND=1
>     fi


More information about the devscripts-devel mailing list