pristine-tar handling not compatible with git-ubuntu repositories
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
git-build-recipe (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
I was checking why my recipe builds did not have an orig tarball in the ppa, and all packages were being treated as native.
It looks like the git-ubuntu repositories for ubuntu packages in launchpad are not compatible with how git-build-recipe expects orig tarballs to be stored.
Checking the code, I see it tries first "pristine-tar list", and the log[1] has this output:
pristine-tar: There's no local pristine-tar branch. Several remote pristine-tar branches exist.
Run "git branch --track pristine-tar <remote>" to create a local pristine-tar branch
ea63f928c694829
870beb8eb66cfb8
That's not an output that git-build-recipe is looking for[2]:
prefix = "%s_%s.orig.tar." % (package, version)
dest_filename = None
pristine_
try:
for line in pristine_
line = line.decode(
if line.startswith
So next we try tag names[3]:
tag_names = ["upstream/%s" % version, "upstream-%s" % version]
But the upstream tags in git-ubuntu are named differently[4]:
$ git tag | grep upstream | tail
pkg/upstream/
pkg/upstream/
(...)
As a result, NoSuchTag is raised, and the package is "converted" to a native format somehow (I didn't follow that through).
1. https:/
2. https:/
3. https:/
4. https:/
FWIW, git-ubuntu's specification doesn't define the pristine-tar branch specifics (eg. ref names), except that they exist. Same for the dsc tags. I see importer/ {ubuntu, debian} /pristine- tar. I don't remember the specifics but the importer prefix may or may not be a mistake. Maybe we're stuck with that now. I do remember that we couldn't just use "pristine-tar" because that doesn't allow for Debian and Ubuntu orig tarballs being different, which they can be in the general case even if we try to avoid it.
I'm also aware that git-ubuntu's pristine-tar functionality is broken a lot of the time. It's quite far down the list of priorities to fix. For now it's best effort only, and maybe we'll break things.
It may not be safe to commit to git-build-recipe changes that assume that git-ubuntu's layout wrt. pristine-tar and upstream tags will not change.