On Sat, Feb 24, 2018 at 4:20 PM, Sean Whitton <spwhit...@spwhitton.name> wrote: > 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 :)
Ah, interesting tool. I think it is a good complement to dgit. > > 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). That works when using gbp directly, but it did not work for me when running it through dgit. >> 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. I would prefer an option to have dgit do it for me. This way I could enable it globally on my system, since all my packages use pristine-tar. Usually when firing up a build I then go do something else while the build proceeds. Removing a possible interaction in the process sounds good to me. I think opportunistically calling origtargz (ie, enabling by default this option if origtargz is installed) would be very nice. I can't think of problems that may be created by enabling this option, but that may be just failure of my imagination :) > 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. I think outsourcing the job to a tool that can integrate with various sources is the right path forward. -- Saludos, Felipe Sateler