Hello Ian, Felipe, Before I get into details, let me mention origtargz(1) from devscripts. It will extract origs from pristine-tar branches if those exist, or pull from the archive.
Whenever I get an error about a missing orig and it's not a new upstream version, I just type `origtargz` and I don't recall it ever failing to fix the problem :) On Wed, Feb 21 2018, Ian Jackson wrote: > I think there is probably a gbp rune that will just provide the > upstream source tarball from the pristine tar branch. I'm afraid I > don't know how it's spelled, but you can probably use that as a > workaround in the meantime. > > If you let me know what it is, that will be a small step towards > implementing this feature :-). It's --git-pristine-tar. Look for that in gbp-buildpackage(1). > Sean may disagree, but I don't think automatically generating missing > origs from pristine tar branches is something that dgit should to by > default. I do not disagree. I would like to see dgit's defaults remain suitable for the subset of pure dgit workflows to which pristine-tar is orthogonal. (By a pure dgit workflow I just mean one that may involve simple scripts like git-deborig but not a big tool like gbp or git-dpm. pristine-tar is orthogonal to a subset of the pure dgit workflows, which I consider to be the best pure dgit workflows. I'll avoid explaining that orthogonality here, unless asked.) > But it's certainly something we could have as an option, and maybe it > should even be implied by --gbp. And dgit could prompt the user to > specify the relevant options, if it detected an pristine-tar or > upstream branch. Right. We certainly want to make dgit+gbp convenient. I wonder if we might just have an option that causes dgit to call `origtargz` whenever it would error out due to a missing orig, and then try again? Or suggest to the user running that command? I think I'd prefer the latter, if the hint is not buried in other output. That would do what's needed for this bug, and it centralises logic about finding missing orig scripts to that script, rather than adding more code to dgit. > Related to this is #865905 "want better msg for missing .orig (eg due > to accidental upstream version bump)". #865905 mentions git-deborig > which is also a thing that dgit should maybe be willing to use for > this, when requested/configured. git-deborig has the potential to generate an orig with a different hash to the one in the archive and/or the pristine-tar branch (though git-deborig's tarball would be identical to an orig downloaded from an upstream's github releases page). So I'm not sure it should happen automatically. -- Sean Whitton
signature.asc
Description: PGP signature