Hi Hugh, Thanks for replying!
Hugh McMaster <[email protected]> writes: > Hi Xiyue, > > Thanks for the bug report. > > On 12/11/2025 5:51 am, Xiyue Deng wrote: >> Latest uscan gives wrong result when d/watch tracks HEAD of a remote >> repository. >> >>> * What exactly did you do (or not do) that was effective (or >>> ineffective)? >> As an example of emacs-dart-mode, both the v4 and v5 d/watch that tracks >> HEAD gives the wrong result. >> >> v4: >> ,---- >> | version=4 >> | opts="mode=git, pgpmode=none, pretty=1.0.7+git%cd.%h" \ >> | https://github.com/emacsorphanage/dart-mode \ >> | HEAD debian uupdate >> `---- >> >> v5: >> ,---- >> | Version: 5 >> | >> | Source: https://github.com/emacsorphanage/dart-mode >> | Matching-Pattern: HEAD >> | Mode: git >> | Pgp-Mode: none >> | Pretty: 1.0.7+git%cd.%h >> `---- > > uscan converts version 4 watch files to version 5, so seeing the same > behaviour is expected. > >> The following is from the output of `uscan --report-status`: >> ,---- >> | $ uscan --report-status >> | uscan info: Scan watch files in . >> | uscan info: Check debian/watch and debian/changelog in . >> | uscan info: package="emacs-dart-mode" >> version="1.0.7+git20250811.edb45cb-1" (as >> | seen in debian/changelog) >> | uscan info: package="emacs-dart-mode" version="1.0.7+git20250811.edb45cb" >> (no ep >> | och/revision) >> | uscan info: ./debian/changelog sets package="emacs-dart-mode" >> version="1.0.7+git >> | 20250811.edb45cb" >> | uscan info: Process watch file at: debian/watch >> | package = emacs-dart-mode >> | version = 1.0.7+git20250811.edb45cb >> | pkg_dir = . >> | uscan info: Parsing gitpretty: 1.0.7+git%cd.%h >> | uscan info: Parsing mode: git >> | uscan info: Parsing pgpmode: none >> | uscan info: Last orig.tar.* tarball version (from debian/changelog): >> 1.0.7+git20 >> | 250811.edb45cb >> | uscan info: Last orig.tar.* tarball version (dversionmangled): >> 1.0.7+git20250811 >> | .edb45cb >> | uscan warn: Using upstreamvcs remote origin > > I see you are using the new git upstream repository mode introduced in > 2.25.23. This mode operates on cloned repositories and only fetches new > commits. > > Previously, this mode only supported tagged repositories. > >> | uscan info: Looking at $base = >> https://github.com/emacsorphanage/dart-mod >> | e with >> | $filepattern = HEAD found >> | $newfile = HEAD >> | $mangled_newversion = 1.0.7+git20251110.ca232ba >> | $newversion = 1.0.7+git20251110.ca232ba >> | $lastversion = 1.0.7+git20250811.edb45cb >> | uscan info: Upstream URL(+tag) to download is identified as >> https://github.co >> | m/emacsorphanage/dart-mode HEAD >> | uscan info: Filename (filenamemangled) for downloaded file: >> emacs-dart-mode-1.0. >> | 7+git20251110.ca232ba.tar.xz >> | Newest version of emacs-dart-mode on remote site is >> 1.0.7+git20251110.ca232ba, l >> | ocal version is 1.0.7+git20250811.edb45cb >> | => Newer package available from: >> | => https://github.com/emacsorphanage/dart-mode HEAD >> | uscan info: Scan finished >> `---- >> >> Note that it reports the newversion as `1.0.7+git20251110.ca232ba', but >> the actual latest commit of upstreamvcs happened on `Tue Nov 4 21:43:39 >> 2025 -0800', and the latest commit hash should be 22288d0, so the >> correct version string should be `1.0.7+git20251105.22288d0'. And as a >> matter of fact, the qa.debian.org page reports the correct version >> string[1], suggesting that some previous version of uscan was working >> correctly. >> >>> * What was the outcome of this action? >> On closer inspect, `ca232ba' is actually the latest commit of my >> debian/latest branch on Salsa. So it looks like when tracking HEAD, >> uscan is using my `debian/latest' branch instead of the remote branch >> for getting the latest commit time and hash. > Interesting. Can you please post (or link to) the output of `git remote > --verbose show` and `uscan -vv`? Sure, please check the output below: ,---- | $ git remote --verbose show | debian [email protected]:emacsen-team/emacs-dart-mode.git (fetch) | debian [email protected]:emacsen-team/emacs-dart-mode.git (push) | dgit | manphiz-upstreamvcs [email protected]:manphiz/dart-mode.git (fetch) | manphiz-upstreamvcs [email protected]:manphiz/dart-mode.git (push) | upstreamvcs https://github.com/emacsorphanage/dart-mode (fetch) | upstreamvcs https://github.com/emacsorphanage/dart-mode (push) `---- ,---- | $ uscan -vv | uscan info: Scan watch files in . | uscan debug: Found ./debian | uscan info: Check debian/watch and debian/changelog in . | uscan info: package="emacs-dart-mode" version="1.0.7+git20251105.22288d0-1" (as seen in debian/changelog) | uscan info: package="emacs-dart-mode" version="1.0.7+git20251105.22288d0" (no epoch/revision) | uscan info: ./debian/changelog sets package="emacs-dart-mode" version="1.0.7+git20251105.22288d0" | uscan info: Process watch file at: debian/watch | package = emacs-dart-mode | version = 1.0.7+git20251105.22288d0 | pkg_dir = . | uscan debug: parse options: << ==EOF== | Source: https://github.com/emacsorphanage/dart-mode | Matching-Pattern: HEAD | Mode: git | Pgp-Mode: none | Pretty: 1.0.7+git%cd.%h | ==EOF== | uscan info: Parsing gitpretty: 1.0.7+git%cd.%h | uscan info: Parsing mode: git | uscan info: Parsing pgpmode: none | uscan debug: $self->{'pgpmode'}=none, $self->{'pgpsigurlmangle'}=undef | uscan info: Last orig.tar.* tarball version (from debian/changelog): 1.0.7+git20251105.22288d0 | uscan info: Last orig.tar.* tarball version (dversionmangled): 1.0.7+git20251105.22288d0 | uscan debug: watch file has: | $base = https://github.com/emacsorphanage/dart-mode | $filepattern = HEAD | $lastversion = 1.0.7+git20251105.22288d0 | $action = | mode = git | pgpmode = none | versionmode = newer | $site = https://github.com/emacsorphanage/dart-mode | $basedir = | uscan debug: line: search() | uscan warn: Using upstreamvcs remote origin [Devscripts::Uscan::Modes::Git: 32] | uscan debug: git log -1 --date=format-local:%Y%m%d --no-show-signature --pretty=1.0.7+git%cd.%h | uscan info: Looking at $base = https://github.com/emacsorphanage/dart-mode with | $filepattern = HEAD found | $newfile = HEAD | $mangled_newversion = 1.0.7+git20251111.aa23632 | $newversion = 1.0.7+git20251111.aa23632 | $lastversion = 1.0.7+git20251105.22288d0 | uscan debug: line: get_upstream_url() | uscan info: Upstream URL(+tag) to download is identified as https://github.com/emacsorphanage/dart-mode HEAD | uscan debug: line: get_newfile_base() | uscan info: Filename (filenamemangled) for downloaded file: emacs-dart-mode-1.0.7+git20251111.aa23632.tar.xz | uscan debug: line: cmp_versions() | Newest version of emacs-dart-mode on remote site is 1.0.7+git20251111.aa23632, local version is 1.0.7+git20251105.22288d0 | => Newer package available from: | => https://github.com/emacsorphanage/dart-mode HEAD | uscan debug: line: download_file_and_sig() | uscan info: Downloading upstream package: dart-mode HEAD | uscan debug: Execute: git archive --format=tar --prefix=emacs-dart-mode-1.0.7+git20251111.aa23632/ --output=/home/manphiz/Projects/debian-packaging/emacs-dart-mode-1.0.7+git20251111.aa23632.tar HEAD... | uscan debug: Execute: xz emacs-dart-mode-1.0.7+git20251111.aa23632.tar... | uscan debug: Execute: rm -fr emacs-dart-mode-temporary.3878.git... | uscan info: Successfully downloaded upstream package: dart-mode HEAD | uscan info: Missing OpenPGP signature. | uscan info: New orig.tar.* tarball version (oversionmangled): 1.0.7+git20251111.aa23632 | uscan debug: line: mkorigtargz() | uscan info: Launch mk-origtargz with options: | --package emacs-dart-mode --version 1.0.7+git20251111.aa23632 --compression default --directory .. --copyright-file debian/copyright ../emacs-dart-mode-1.0.7+git20251111.aa23632.tar.xz | Successfully symlinked ../emacs-dart-mode-1.0.7+git20251111.aa23632.tar.xz to ../emacs-dart-mode_1.0.7+git20251111.aa23632.orig.tar.xz. | uscan info: New orig.tar.* tarball version (after mk-origtargz): 1.0.7+git20251111.aa23632 | uscan debug: Keep git repo (../emacs-dart-mode-temporary.3878.git) | uscan info: Scan finished `---- >>> * What outcome did you expect instead? >>> >> Restoring the previous correct behavior would be great. >> >> As this would generate the wrong version string and potentially wrong >> packaging, I'm setting the severity as important. >> >> [1] https://qa.debian.org/cgi-bin/watch?pkg=emacs-dart-mode > > Debian QA shows the correct version if we were to clone the repository, > and it matches what uscan generates when cloning. The issue is specific > to the upstream repository mode. > Ack. I have also updated to the devscripts backports version 2.25.22~bpo13+1 on my Trixie system which has support for version 5 format, and the result is correct. ,---- | ... | uscan info: Looking at $base = https://github.com/emacsorphanage/dart-mode with | $filepattern = HEAD found | $newfile = HEAD | $mangled_newversion = 1.0.7+git20251105.22288d0 | $newversion = 1.0.7+git20251105.22288d0 | $lastversion = 1.0.7+git20251105.22288d0 | ... `---- I then tried to manually bi-sect from the devscripts repo to find the possible commit, and to my surprise, even when using the latest version on Trixie, I still got the correct result! I then tried on my unstable system and went back to version 2.25.22, and I still got the wrong result there! So it looks like the actual place that is causing issue is outside of devscripts? Any pointer for possible dependency that may cause this that I should check? > Hugh -- Regards, Xiyue Deng
signature.asc
Description: PGP signature

