#1129981 Could git-debpush warn about attempt to do source-only NEW upload?

#1129981#5
Date:
2026-03-07 06:48:16 UTC
From:
To:
The tag2upload workflow is addictive, but I think I have managed to
refrain from using it for NEW packages under ITP processing.

However I just accidentally used it for a shared library transition
upload of 'ding-libs', and got the expected refusal:

This got me thinking.

Couldn't git-debpush detect and warn when I attempt to do a source-only
(tag2upload) upload of a package that will end up in NEW?

Those uploads will always be rejected, burning a version number and
causing uglyness in debian/changelog.

Some diff between the current git master and previous git tag would
discover if any debian/control 'Source' and/or 'Package' new field
values were introduced.

There could be a -fsource-only-new-upload to override the warning.

I understand if you don't want to add ugly logic about this fairly
archive-internal and suboptimal behaviour to dgit, but I wanted to bring
it up for discussion because I didn't see this idea discussed before.

If the archive is ever fixed to not have this requirement, this feature
could be disabled in the future.

/Simon

#1129981#10
Date:
2026-03-07 10:10:59 UTC
From:
To:
Simon Josefsson [07/Mar  7:48am +01] wrote:

Glad you're enjoying it that much :)

Just to note that dgit already handles this.  It's git-debpush where
we're a bit more wary about adding Debian-specific stuff.

I think that looking at debian/control like that, and failing a check,
is a fine idea.  That only covers binNEW but that's the annoying case,
right?  For sourceNEW you're less likely to do it by accident.

#1129981#15
Date:
2026-03-07 11:43:32 UTC
From:
To:
Sean Whitton <spwhitton@spwhitton.name> writes:

Yes, that would have cought this situation.

I suspect the biggest hurdle is the heuristic to find out what to diff
the current master branch with, to find out if any binNEW packages were
added.  I cannot understand how it would go about doing that reliably
without a online check against the archive, and even then there would be
a big race-condition, but maybe that also doesn't matter for a "helpful"
warning like this.  In the really odd case where a warning would be a
false positive there should be a --force flag anyway.

I'm fairly certain that I will forget about this archive limitation and
run git-debpush to do a NEW upload again eventually, but the solution to
detect each situation may be different so they could be solved
separately.

Thanks!

/Simon