Le 25/03/2020 à 11:31, Jérémy Lal a écrit : > > > Le mer. 25 mars 2020 à 10:39, Xavier <y...@debian.org > <mailto:y...@debian.org>> a écrit : > > Le 25/03/2020 à 10:32, Xavier a écrit : > > Le 25/03/2020 à 10:26, Xavier a écrit : > >> Le 25/03/2020 à 09:37, Xavier a écrit : > >>> Le 04/03/2020 à 18:52, Mattia Rizzolo a écrit : > >>>> On Wed, Mar 04, 2020 at 11:06:00PM +0530, Pirate Praveen wrote: > >>>>> That is not correct. Xavier (yadd) proposed 3 solutions > already. Hope he will share the relevant proposals. > >>>> > >>>> Yes, the current one was proposed by him, as well as the one I > linked > >>>> below… > >>>> I'm actually defending his work here :P > >>> > >>> Hi and thanks ;-) > >>> > >>> In next devscripts MR 178, I'm going to propose a complement to > >>> "checksum" option to reduce long version: > >>> * new line option: ctype which gives the type of component > (nodejs for > >>> now) > >>> * if this ctype exists, uscan reads package.json to find current > >>> component version > >>> > >>> Tested with success with node-mongodb (both checksum and ctype), > package > >>> is up to date but a component changed. Current version is > >>> 3.5.5+~cs11.12.18-1, uscan detects change: > >>> > >>> $ uscan --report > >>> uscan: Newest version of bson on remote site is 1.1.4, local > version > >>> is 1.1.3 > >>> uscan.pl <http://uscan.pl>: => Newer package available from > >>> https://registry.npmjs.org/bson/-/bson-1.1.4.tgz > >>> > >>> Part of DEHS output (checksum changed well): > >>> > >>> <package>node-mongodb</package> > >>> <debian-uversion>3.5.5+~cs11.12.18</debian-uversion> > >>> > <debian-mangled-uversion>3.5.5+~cs11.12.18</debian-mangled-uversion> > >>> <upstream-version>3.5.5+~cs11.12.19</upstream-version> > >>> > >>> > >> > >> And for acorn, last version becomes 7.1.1+~cs12.20.3+ds-1 ;-) > > > > ctype permits to download current version as well (not "ignore" > without > > ctype): > > > > ~/acorn $ uscan --report --download-current-version --dehs > > [...] > > <debian-uversion>6.2.1+ds</debian-uversion> > > <debian-mangled-uversion>6.2.1</debian-mangled-uversion> > > <upstream-version>6.2.1+~cs11.24.3</upstream-version> > > > > <upstream-url>https://github.com/acornjs/acorn/archive/6.2.1.tar.gz</upstream-url> > > <decoded-checksum> > > > > 0.4.0+~4.0.0+~1.0.0+~5.0.1+~1.7.0+~0.1.1+~0.3.1+~0.2.0+~0.1.0+~0.3.0+~0.3.0 > > </decoded-checksum> > > [...] > > and a download works (and fix +ds) and then debian version is > 6.2.1+ds+~cs11.24.3 which is > to current version, this permits > migration: > > ~/acorn $ uscan --download-current-version > mv ../acorn_6.2.1+ds.orig.tar.xz to > ../acorn_6.2.1+ds+~cs11.24.3.orig.tar.xz > mv ../acorn_0.4.0+ds.orig-node-acorn-bigint.tar.xz to > ../acorn_6.2.1+ds+~cs11.24.3.orig-node-acorn-bigint.tar.xz > mv ../acorn_4.0.0+really4.0.0+ds.orig-node-acorn-dynamic-import.tar.xz > to ../acorn_6.2.1+ds+~cs11.24.3.orig-node-acorn-dynamic-import.tar.xz > mv ../acorn_1.0.0+ds.orig-node-acorn-import-meta.tar.xz to > ../acorn_6.2.1+ds+~cs11.24.3.orig-node-acorn-import-meta.tar.xz > mv ../acorn_5.0.1+ds.orig-node-acorn-jsx.tar.xz to > ../acorn_6.2.1+ds+~cs11.24.3.orig-node-acorn-jsx.tar.xz > mv ../acorn_1.7.0+ds.orig-node-acorn-node.tar.xz to > ../acorn_6.2.1+ds+~cs11.24.3.orig-node-acorn-node.tar.xz > mv ../acorn_0.1.1+ds.orig-node-acorn-private-class-elements.tar.xz to > ../acorn_6.2.1+ds+~cs11.24.3.orig-node-acorn-private-class-elements.tar.xz > mv ../acorn_0.3.1+ds.orig-node-acorn-class-fields.tar.xz to > ../acorn_6.2.1+ds+~cs11.24.3.orig-node-acorn-class-fields.tar.xz > mv ../acorn_0.2.0+ds.orig-node-acorn-static-class-features.tar.xz to > ../acorn_6.2.1+ds+~cs11.24.3.orig-node-acorn-static-class-features.tar.xz > mv ../acorn_0.1.0+ds.orig-node-acorn-export-ns-from.tar.xz to > ../acorn_6.2.1+ds+~cs11.24.3.orig-node-acorn-export-ns-from.tar.xz > mv ../acorn_0.3.0+ds.orig-node-acorn-numeric-separator.tar.xz to > ../acorn_6.2.1+ds+~cs11.24.3.orig-node-acorn-numeric-separator.tar.xz > mv ../acorn_0.3.0+ds.orig-node-acorn-private-methods.tar.xz to > ../acorn_6.2.1+ds+~cs11.24.3.orig-node-acorn-private-methods.tar.xz > > > 👍 > Could you tell how acorn > 6.2.1+ds+0.4.0+~4.0.0+~1.0.0+~5.0.1+~1.7.0+~0.1.1+~0.3.1+~0.2.0+~0.1.0+~0.3.0+~0.3.0 > becomes 6.2.1+ds+~cs11.24.3 : how 11.24.3 is built ?
The "checksum" feature adds the digits separately: 0 . 4 . 0 + 4 . 0 . 0 + 1 . 0 . 0 + 5 . 0 . 1 + 1 . 7 . 0 + 0 . 1 . 1 + 0 . 3 . 1 + 0 . 2 . 0 + 0 . 1 . 0 + 0 . 3 . 0 + 0 . 3 . 0 -------------------------------- = 4+1+5+1 . 4+7+1+3+2+1+3+3 . 1+1+1 = 11 . 24 . 3 => +~cs11.24.3 Then each component change is detected and increase checksum