Package: dgit
Version: 10.0
Severity: normal

I'm using git-buildpackage (gbp pq) as my maintainer workflow, with
a patches-unapplied maintainer view, and doing uploads with dgit.
I'm not using dgit's sbuild/debuild integration, because I have my own
build tool (vectis) which does the build in a VM and runs QA tools like
autopkgtest and piuparts on it, and in any case I don't want to upload
until I have tested the exact version I plan to upload, which sometimes
involves a logout/login, a reboot, or extended testing; so my input to
dgit is a git checkout and a sourceful changes file from a previous run
of my build tool, which dgit will helpfully confirm to be identical to
stop me from making mistakes.

Normally, for source-only uploads, I do this:

    dgit push-source -C ~/tmp/build-area/foo_latest/*_source.changes

and that works quite smoothly: dgit automatically updates the
dgit-intern/quilt-cache ref by importing my patch series with gbp pq,
does a pseudo-merge to mark the new version as a fast-forward from the
old version, does the upload and push, and leaves me in my maintainer view
ready to do a `gbp push` to salsa:

> $ dgit push-source -C .../*_source.changes
> Format `3.0 (quilt)', need to check/update patch stack
> canonical suite name for unstable is sid
> dgit: split brain (separate dgit view) may be needed (--quilt=unapplied).
> examining quilt state (multiple patches, unapplied mode)
> dgit: base trees orig=83dbd628ffbf55c54139 o+d/p=7aca0c8974f6e8fd9465
> dgit: quilt differences: src:  == orig ##     gitignores:  == orig ==
> dgit: quilt differences:      HEAD ## o+d/p               HEAD == o+d/p
> dgit view: creating patches-applied version using gbp pq
> dgit view: created (commit id 559577a17b9ce2f8c5309f5e116d627f68a191ce)
> last upload to archive: specified git info (debian)
> using existing gnome-shell-extension-top-icons-plus_27.orig.tar.gz
> dgit: split brain (separate dgit view) may be needed (--quilt=unapplied).
> dgit view: found cached (commit id 559577a17b9ce2f8c5309f5e116d627f68a191ce)
> Checking that HEAD includes all changes in archive...
> Declaring that HEAD includes all changes in 27-7...
> Made pseudo-merge of 27-7 into dgit view.
> checking that gnome-shell-extension-top-icons-plus_27-8.dsc corresponds to 
> HEAD
> ...
> Successfully uploaded packages.
> dgit ok: pushed and uploaded 27-8

However, when I'm doing an upload to NEW, I need to upload a full
changes file with source and some combination of binaries from
architectures amd64, i386 and/or all, which in my case is the result of
merging individual builds' changes files with mergechanges(1):

    dgit push-built -C ~/tmp/build-area/foo_latest/*_source+binary.changes --new

and that currently fails:

> $ dgit push-built -C .../*_source+binary.changes --new
> Format `3.0 (quilt)', need to check/update patch stack
> canonical suite name for unstable is sid
> no version available from the archive
> dgit: split brain (separate dgit view) may be needed (--quilt=unapplied).
>
> dgit: error: --quilt=unapplied but no cached dgit view:
> dgit:  perhaps HEAD changed since dgit build[-source] ?
> ! Push failed, while preparing your push.
> ! You can retry the push, after fixing the problem, if you like.

Workaround: first do something like

    dgit push-source -C .../*_source.changes --dry-run

which in this case detects that I'm going to upload to NEW, and fails with
"package appears to be new in this suite; if this is intentional, use --new",
but not until after it has had the side-effect of updating
dgit-intern/quilt-cache to the content I need to be able to repeat the
push-built command successfully.

Would it be possible to make push-built do the same automatic fixup as
push-source?

Thanks,
    smcv

-- System Information:
Debian Release: bookworm/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'stable-security'), (500, 
'oldstable-debug'), (500, 'oldoldstable'), (500, 'buildd-unstable'), (500, 
'unstable'), (500, 'testing'), (500, 'stable'), (500, 'oldstable'), (1, 
'experimental-debug'), (1, 'buildd-experimental'), (1, 'experimental')
merged-usr: no
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.19.0-1-amd64 (SMP w/4 CPU threads; PREEMPT)
Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8), LANGUAGE=en_GB:en
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages dgit depends on:
ii  apt                        2.5.2
ii  ca-certificates            20211016
ii  coreutils                  8.32-4.1
ii  curl                       7.85.0-1
ii  devscripts                 2.22.2
ii  dpkg-dev                   1.21.9
ii  dput                       1.1.2
ii  git [git-core]             1:2.37.2-1
ii  git-buildpackage           0.9.28
ii  libdpkg-perl               1.21.9
ii  libjson-perl               4.09000-1
ii  liblist-moreutils-perl     0.430-2
ii  liblocale-gettext-perl     1.07-4+b2
ii  libtext-csv-perl           2.02-1
ii  libtext-glob-perl          0.11-2
ii  libtext-iconv-perl         1.7-7+b2
ii  libwww-curl-perl           4.17-7+b2
ii  perl [libdigest-sha-perl]  5.34.0-5

Versions of packages dgit recommends:
ii  distro-info-data             0.54
ii  liburi-perl                  5.12-1
ii  openssh-client [ssh-client]  1:9.0p1-1+b1

Versions of packages dgit suggests:
ii  cowbuilder  0.89
ii  pbuilder    0.231
ii  sbuild      0.83.2

-- no debconf information

Reply via email to