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

Re: New "ctype" option in uscan



On Mon, 30 Nov 2020 10:10:54 +0100, Xavier wrote:

> I added a new feature in uscan to help uscan comparison when components
> are embedded, especially when "checksum" target is used: if "ctype"
> exists, uscan will use "version" value from package.json (JavaScript) or
> META.json (Perl) to get current component value.
> 
> For now, only "nodejs" and "perl" values are accepted.

This looks interesting, thank you.

Do I understand this correctly? For e.g. libcgi-application-plugin-authentication-perl
I would make the following change to d/watch:

#v+
--- a/debian/watch
+++ b/debian/watch
@@ -2,8 +2,8 @@ version=4

 https://metacpan.org/release/CGI-Application-Plugin-Authentication   .*/CGI-Application-Plugin-Authentication-v?@ANY_VERSION@@ARCHIVE_EXT@$ group

-opts="component=driver-cdbi" \
+opts="component=driver-cdbi,ctype=perl" \
 https://metacpan.org/release/CGI-Application-Plugin-Authentication-Driver-CDBI   .*/CGI-Application-Plugin-Authentication-Driver-CDBI-v?@ANY_VERSION@@ARCHIVE_EXT@$ checksum

-opts="component=driver-dbic" \
+opts="component=driver-dbic,ctype=perl" \
 https://metacpan.org/release/CGI-Application-Plugin-Authentication-Driver-DBIC   .*/CGI-Application-Plugin-Authentication-Driver-DBIC-v?@ANY_VERSION@@ARCHIVE_EXT@$ checksum


#v-

and (for the last part) uscan says:

driver-cdbi has META.json, driver-dbic doesn't, and uscan says:

uscan info: opts: component=driver-cdbi,ctype=perl
uscan info: line: https://metacpan.org/release/CGI-Application-Plugin-Authentication-Driver-CDBI   .*/CGI-Application-Plugin-Authentication-Driver-CDB                                                                                                                           I-v?(?:[-_]?(\d[\-+\.:\~\da-zA-Z]*))(?i)(?:\.(?:tar\.xz|tar\.bz2|tar\.gz|zip|tgz|tbz|txz))$ checksum
uscan info: Parsing component=driver-cdbi
uscan info: Parsing ctype=perl
uscan info: line: https://metacpan.org/release/CGI-Application-Plugin-Authentication-Driver-CDBI   .*/CGI-Application-Plugin-Authentication-Driver-CDB                                                                                                                           I-v?(?:[-_]?(\d[\-+\.:\~\da-zA-Z]*))(?i)(?:\.(?:tar\.xz|tar\.bz2|tar\.gz|zip|tgz|tbz|txz))$ checksum
uscan info: Found version 0.03 for component driver-cdbi
uscan info: Last orig.tar.* tarball version (from debian/changelog): 0.03
uscan info: Last orig.tar.* tarball version (dversionmangled): 0.03
uscan info: Requesting URL:
   https://metacpan.org/release/CGI-Application-Plugin-Authentication-Driver-CDBI
uscan info: Matching pattern:
   (?:(?:https://metacpan.org)?\/release\/)?.*/CGI-Application-Plugin-Authentication-Driver-CDBI-v?(?:[-_]?(\d[\-+\.:\~\da-zA-Z]*))(?i)(?:\.(?:tar\.xz                                                                                                                           |tar\.bz2|tar\.gz|zip|tgz|tbz|txz))$
uscan info: Found the following matching hrefs on the web page (newest first):
   https://cpan.metacpan.org/authors/id/A/AD/ADOPTME/CGI-Application-Plugin-Authentication-Driver-CDBI-0.03.tar.gz (0.03) index=0.03-1 
   https://cpan.metacpan.org/authors/id/A/AD/ADOPTME/CGI-Application-Plugin-Authentication-Driver-CDBI-0.03.tar.gz (0.03) index=0.03-1 
uscan info: Looking at $base = https://metacpan.org/release/CGI-Application-Plugin-Authentication-Driver-CDBI with
    $filepattern = .*/CGI-Application-Plugin-Authentication-Driver-CDBI-v?(?:[-_]?(\d[\-+\.:\~\da-zA-Z]*))(?i)(?:\.(?:tar\.xz|tar\.bz2|tar\.gz|zip|tgz                                                                                                                           |tbz|txz))$ found
    $newfile     = https://cpan.metacpan.org/authors/id/A/AD/ADOPTME/CGI-Application-Plugin-Authentication-Driver-CDBI-0.03.tar.gz
    $newversion  = 0.03
    $lastversion = 0.03
uscan info: Matching target for downloadurlmangle: https://cpan.metacpan.org/authors/id/A/AD/ADOPTME/CGI-Application-Plugin-Authentication-Driver-CDBI                                                                                                                           -0.03.tar.gz
uscan info: Upstream URL(+tag) to download is identified as    https://cpan.metacpan.org/authors/id/A/AD/ADOPTME/CGI-Application-Plugin-Authentication                                                                                                                           -Driver-CDBI-0.03.tar.gz
uscan info: Filename (filenamemangled) for downloaded file: CGI-Application-Plugin-Authentication-Driver-CDBI-0.03.tar.gz
uscan info: Newest version of driver-cdbi on remote site is 0.03, local version is 0.03
uscan info:  => Package is up to date from:
             => https://cpan.metacpan.org/authors/id/A/AD/ADOPTME/CGI-Application-Plugin-Authentication-Driver-CDBI-0.03.tar.gz


uscan info: opts: component=driver-dbic,ctype=perl
uscan info: line: https://metacpan.org/release/CGI-Application-Plugin-Authentication-Driver-DBIC   .*/CGI-Application-Plugin-Authentication-Driver-DBI                                                                                                                           C-v?(?:[-_]?(\d[\-+\.:\~\da-zA-Z]*))(?i)(?:\.(?:tar\.xz|tar\.bz2|tar\.gz|zip|tgz|tbz|txz))$ checksum
uscan info: Parsing component=driver-dbic
uscan info: Parsing ctype=perl
uscan info: line: https://metacpan.org/release/CGI-Application-Plugin-Authentication-Driver-DBIC   .*/CGI-Application-Plugin-Authentication-Driver-DBI                                                                                                                           C-v?(?:[-_]?(\d[\-+\.:\~\da-zA-Z]*))(?i)(?:\.(?:tar\.xz|tar\.bz2|tar\.gz|zip|tgz|tbz|txz))$ checksum
uscan warn: Unable to read driver-dbic/META.json, skipping current version
uscan info: Last orig.tar.* tarball version (from debian/changelog): 0.23
uscan info: Last orig.tar.* tarball version (dversionmangled): 0.23
uscan info: Requesting URL:
   https://metacpan.org/release/CGI-Application-Plugin-Authentication-Driver-DBIC
uscan info: Matching pattern:
   (?:(?:https://metacpan.org)?\/release\/)?.*/CGI-Application-Plugin-Authentication-Driver-DBIC-v?(?:[-_]?(\d[\-+\.:\~\da-zA-Z]*))(?i)(?:\.(?:tar\.xz                                                                                                                           |tar\.bz2|tar\.gz|zip|tgz|tbz|txz))$
uscan info: Found the following matching hrefs on the web page (newest first):
   https://cpan.metacpan.org/authors/id/J/JA/JALDHAR/CGI-Application-Plugin-Authentication-Driver-DBIC-0.02.tar.gz (0.02) index=0.02-1 
   https://cpan.metacpan.org/authors/id/J/JA/JALDHAR/CGI-Application-Plugin-Authentication-Driver-DBIC-0.02.tar.gz (0.02) index=0.02-1 
uscan info: Looking at $base = https://metacpan.org/release/CGI-Application-Plugin-Authentication-Driver-DBIC with
    $filepattern = .*/CGI-Application-Plugin-Authentication-Driver-DBIC-v?(?:[-_]?(\d[\-+\.:\~\da-zA-Z]*))(?i)(?:\.(?:tar\.xz|tar\.bz2|tar\.gz|zip|tgz                                                                                                                           |tbz|txz))$ found
    $newfile     = https://cpan.metacpan.org/authors/id/J/JA/JALDHAR/CGI-Application-Plugin-Authentication-Driver-DBIC-0.02.tar.gz
    $newversion  = 0.02
    $lastversion = 0.23
uscan info: Matching target for downloadurlmangle: https://cpan.metacpan.org/authors/id/J/JA/JALDHAR/CGI-Application-Plugin-Authentication-Driver-DBIC                                                                                                                           -0.02.tar.gz
uscan info: Upstream URL(+tag) to download is identified as    https://cpan.metacpan.org/authors/id/J/JA/JALDHAR/CGI-Application-Plugin-Authentication                                                                                                                           -Driver-DBIC-0.02.tar.gz
uscan info: Filename (filenamemangled) for downloaded file: CGI-Application-Plugin-Authentication-Driver-DBIC-0.02.tar.gz
uscan info: Newest version of driver-dbic on remote site is 0.02, local version is 0.23
uscan info:  => Only older package available from:
             => https://cpan.metacpan.org/authors/id/J/JA/JALDHAR/CGI-Application-Plugin-Authentication-Driver-DBIC-0.02.tar.gz
uscan warn: Checksum ref: 0.03+~0.02
uscan info: Scan finished




Cheers,
gregor

-- 
 .''`.  https://info.comodo.priv.at -- Debian Developer https://www.debian.org
 : :' : OpenPGP fingerprint D1E1 316E 93A7 60A8 104D  85FA BB3A 6801 8649 AA06
 `. `'  Member VIBE!AT & SPI Inc. -- Supporter Free Software Foundation Europe
   `-   NP: Led Zeppelin: White Summer Black Mountain

Attachment: signature.asc
Description: Digital Signature


Reply to: