Package: devscripts
Version: 2.17.12ubuntu1
Followup-For: Bug #840943

Dear maintainer team,

I encountered the following bug when I using uscan with
pgpmode=next/previous. I also came across this bug which seems to
be fixed in the devscripts version I'm running, but I stumbled into
antoher, may related, error. So I did not open a new one.


My debian/watch file contains  the following:

  version=4

  opts="pgpmode=next" \
    https://0xacab.org/riseuplabs/trees/wikis/home \
    (?:.*/)trees-@ANY_VERSION@\.tar\.gz

  opts="pgpmode=previous" \
    https://0xacab.org/riseuplabs/trees/wikis/home \
    (?:.*/)trees-@ANY_VERSION@@SIGNATURE_EXT@ \
    previous


If my changelog contains the same version as the upstream version uscan
works correct and I run uscan via:  uscan --verbose --report --download

I get the info my package is uptodate, but obtaining the signature
"fails". I get the warning: "Use of uninitialized value $lastversion in
concatenation (.) or string at /usr/bin/uscan line 2749, <WATCH> line
12." I would expect that uscan should also fetch the signature or skipping
that step, but the warning is quite confusing.


------------------------------------------------

uscan output:

uscan info: uscan (version 2.17.12ubuntu1) See uscan(1) for help
uscan info: Scan watch files in .
uscan info: Check debian/watch and debian/changelog in .
uscan info: package="trees" version="2.1.0-1" (as seen in debian/changelog)
uscan info: package="trees" version="2.1.0" (no epoch/revision)
uscan info: ./debian/changelog sets package="trees" version="2.1.0"
uscan info: Process ./debian/watch (package=trees version=2.1.0)
uscan info: Found upstream signing keyring: debian/upstream/signing-key.asc
uscan info: opts: pgpmode=next
uscan info: line: https://0xacab.org/riseuplabs/trees/wikis/home 
(?:.*/)trees[-_]?(\d[\-+\.:\~\da-zA-Z]*)\.tar\.gz
uscan info: Parsing pgpmode=next
uscan info: line: https://0xacab.org/riseuplabs/trees/wikis/home 
(?:.*/)trees[-_]?(\d[\-+\.:\~\da-zA-Z]*)\.tar\.gz
uscan info: Last orig.tar.* tarball version (from debian/changelog): 2.1.0
uscan info: Last orig.tar.* tarball version (dversionmangled): 2.1.0
uscan info: Requesting URL:
   https://0xacab.org/riseuplabs/trees/wikis/home
uscan info: Matching pattern:
   
(?:(?:https://0xacab.org)?\/riseuplabs\/trees\/wikis\/home)?(?:.*/)trees[-_]?(\d[\-+\.:\~\da-zA-Z]*)\.tar\.gz
uscan info: Found the following matching hrefs on the web page (newest first):
   
/riseuplabs/trees/uploads/18187f218746d6eb9593a2ade2512e84/trees-2.1.0.tar.gz 
(2.1.0) index=2.1.0-1
uscan info: Matching target for downloadurlmangle: 
https://0xacab.org/riseuplabs/trees/uploads/18187f218746d6eb9593a2ade2512e84/trees-2.1.0.tar.gz
uscan info: Upstream URL (downloadurlmangled):
   
https://0xacab.org/riseuplabs/trees/uploads/18187f218746d6eb9593a2ade2512e84/trees-2.1.0.tar.gz
uscan info: Newest upstream tarball version selected for download 
(uversionmangled): 2.1.0
uscan info: Download filename (filenamemangled): trees-2.1.0.tar.gz
uscan info: Newest version of trees on remote site is 2.1.0, local version is 
2.1.0
uscan info:    => Package is up to date for from
      
https://0xacab.org/riseuplabs/trees/uploads/18187f218746d6eb9593a2ade2512e84/trees-2.1.0.tar.gz
uscan info: opts: pgpmode=previous
uscan info: line: https://0xacab.org/riseuplabs/trees/wikis/home 
(?:.*/)trees[-_]?(\d[\-+\.:\~\da-zA-Z]*)(?i)\.(?:tar\.xz|tar\.bz2|tar\.gz|zip)\.(?:asc|pgp|gpg|sig|sign)
 previous
uscan info: Parsing pgpmode=previous
uscan info: line: https://0xacab.org/riseuplabs/trees/wikis/home 
(?:.*/)trees[-_]?(\d[\-+\.:\~\da-zA-Z]*)(?i)\.(?:tar\.xz|tar\.bz2|tar\.gz|zip)\.(?:asc|pgp|gpg|sig|sign)
 previous
Use of uninitialized value $lastversion in concatenation (.) or string at 
/usr/bin/uscan line 2749, <WATCH> line 12.
uscan info: Previous version downloaded:
uscan warn: Unable to set versionmode=prev for the line without 
opts=pgpmode=prev
  in debian/watch, skipping:
  https://0xacab.org/riseuplabs/trees/wikis/home 
(?:.*/)trees[-_]?(\d[\-+\.:\~\da-zA-Z]*)(?i)\.(?:tar\.xz|tar\.bz2|tar\.gz|zip)\.(?:asc|pgp|gpg|sig|sign)
 previous
uscan info: Scan finished

------------------------------------------------

If my changelog file contains a version below the current release
version, and I run uscan via: uscan --verbose --report --download
everything works as expected.

------------------------------------------------

Sample Output:

uscan info: uscan (version 2.17.12ubuntu1) See uscan(1) for help
uscan info: Scan watch files in .
uscan info: Check debian/watch and debian/changelog in .
uscan info: package="trees" version="2.0.0-1" (as seen in debian/changelog)
uscan info: package="trees" version="2.0.0" (no epoch/revision)
uscan info: ./debian/changelog sets package="trees" version="2.0.0"
uscan info: Process ./debian/watch (package=trees version=2.0.0)
uscan info: Found upstream signing keyring: debian/upstream/signing-key.asc
uscan info: opts: pgpmode=next
uscan info: line: https://0xacab.org/riseuplabs/trees/wikis/home 
(?:.*/)trees[-_]?(\d[\-+\.:\~\da-zA-Z]*)\.tar\.gz
uscan info: Parsing pgpmode=next
uscan info: line: https://0xacab.org/riseuplabs/trees/wikis/home 
(?:.*/)trees[-_]?(\d[\-+\.:\~\da-zA-Z]*)\.tar\.gz
uscan info: Last orig.tar.* tarball version (from debian/changelog): 2.0.0
uscan info: Last orig.tar.* tarball version (dversionmangled): 2.0.0
uscan info: Requesting URL:
   https://0xacab.org/riseuplabs/trees/wikis/home
uscan info: Matching pattern:
   
(?:(?:https://0xacab.org)?\/riseuplabs\/trees\/wikis\/home)?(?:.*/)trees[-_]?(\d[\-+\.:\~\da-zA-Z]*)\.tar\.gz
uscan info: Found the following matching hrefs on the web page (newest first):
   
/riseuplabs/trees/uploads/18187f218746d6eb9593a2ade2512e84/trees-2.1.0.tar.gz 
(2.1.0) index=2.1.0-1
uscan info: Matching target for downloadurlmangle: 
https://0xacab.org/riseuplabs/trees/uploads/18187f218746d6eb9593a2ade2512e84/trees-2.1.0.tar.gz
uscan info: Upstream URL (downloadurlmangled):
   
https://0xacab.org/riseuplabs/trees/uploads/18187f218746d6eb9593a2ade2512e84/trees-2.1.0.tar.gz
uscan info: Newest upstream tarball version selected for download 
(uversionmangled): 2.1.0
uscan info: Download filename (filenamemangled): trees-2.1.0.tar.gz
uscan: Newest version of trees on remote site is 2.1.0, local version is 2.0.0
uscan:    => Newer package available from
      
https://0xacab.org/riseuplabs/trees/uploads/18187f218746d6eb9593a2ade2512e84/trees-2.1.0.tar.gz
uscan info: Not downloading, using existing file: trees-2.1.0.tar.gz
uscan info: Defer checking OpenPGP signature to the next watch line
uscan info: previous_newfile_base = trees-2.1.0.tar.gz
uscan info: previous_sigfile_base = trees-2.1.0.tar.gz
uscan info: previous_newversion = 2.1.0
uscan info: previous_download_available = 1
uscan info: New orig.tar.* tarball version (oversionmangled): 2.1.0
uscan info: Read the next watch line (pgpmode=next)
uscan info: opts: pgpmode=previous
uscan info: line: https://0xacab.org/riseuplabs/trees/wikis/home 
(?:.*/)trees[-_]?(\d[\-+\.:\~\da-zA-Z]*)(?i)\.(?:tar\.xz|tar\.bz2|tar\.gz|zip)\.(?:asc|pgp|gpg|sig|sign)
 previous
uscan info: Parsing pgpmode=previous
uscan info: line: https://0xacab.org/riseuplabs/trees/wikis/home 
(?:.*/)trees[-_]?(\d[\-+\.:\~\da-zA-Z]*)(?i)\.(?:tar\.xz|tar\.bz2|tar\.gz|zip)\.(?:asc|pgp|gpg|sig|sign)
 previous
uscan info: Previous version downloaded: 2.1.0
uscan info: Download the signature file with the previous tarball's version: 
2.1.0
uscan info: Requesting URL:
   https://0xacab.org/riseuplabs/trees/wikis/home
uscan info: Matching pattern:
   
(?:(?:https://0xacab.org)?\/riseuplabs\/trees\/wikis\/home)?(?:.*/)trees[-_]?(\d[\-+\.:\~\da-zA-Z]*)(?i)\.(?:tar\.xz|tar\.bz2|tar\.gz|zip)\.(?:asc|pgp|gpg|sig|sign)
uscan info: Found the following matching hrefs on the web page (newest first):
   
/riseuplabs/trees/uploads/67fe89df9f89492b5d76691859282cea/trees-2.1.0.tar.gz.asc
 (2.1.0) index=2.1.0-1 matched with the download version
uscan info: Matching target for downloadurlmangle: 
https://0xacab.org/riseuplabs/trees/uploads/67fe89df9f89492b5d76691859282cea/trees-2.1.0.tar.gz.asc
uscan info: Upstream URL (downloadurlmangled):
   
https://0xacab.org/riseuplabs/trees/uploads/67fe89df9f89492b5d76691859282cea/trees-2.1.0.tar.gz.asc
uscan info: Newest upstream tarball version selected for download 
(uversionmangled): 2.1.0
uscan info: Download filename (filenamemangled): trees-2.1.0.tar.gz.asc
uscan: Newest version of trees on remote site is 2.1.0, specified download 
version is 2.1.0
uscan info: Downloading OpenPGP signature from
   
https://0xacab.org/riseuplabs/trees/uploads/67fe89df9f89492b5d76691859282cea/trees-2.1.0.tar.gz.asc
 (pgpmode=previous)
   as trees-2.1.0.tar.gz.asc
uscan info: Requesting URL:
   
https://0xacab.org/riseuplabs/trees/uploads/67fe89df9f89492b5d76691859282cea/trees-2.1.0.tar.gz.asc
uscan info: Use trees-2.1.0.tar.gz as upstream package (pgpmode=previous)
uscan info: Verifying OpenPGP signature trees-2.1.0.tar.gz.asc for 
trees-2.1.0.tar.gz
gpgv: Signature made Di 10 Apr 2018 18:10:11 CEST
gpgv:                using RSA key 4E0791268F7C67EABE88F1B03043E2B7139A768E
gpgv: Good signature from "Riseup Treasurer <treasu...@riseup.net>"
gpgv:                 aka "Riseup Networks <collect...@riseup.net>"
uscan info: SKIP generation of orig.tar.* and running of script/uupdate (--safe)
uscan info: Scan finished

------------------------------------------------

I'm not sure if that behaviour is intended. Thank you!

Reply via email to