pristine-tar handling not compatible with git-ubuntu repositories

Bug #2020386 reported by Andreas Hasenack
This bug affects 1 person
Affects Status Importance Assigned to Milestone
git-build-recipe (Ubuntu)

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
ea63f928c694829a23dd15aaa89451c44774dfeb refs/remotes/source/importer/debian/pristine-tar
870beb8eb66cfb8f72b7d8d16cce72678240ccaa refs/remotes/source/importer/ubuntu/pristine-tar

That's not an output that git-build-recipe is looking for[2]:
    prefix = "%s_%s.orig.tar." % (package, version)
    dest_filename = None
    pristine_tar_list = subprocess.Popen(
        ["pristine-tar", "list"], stdout=subprocess.PIPE, cwd=path)
        for line in pristine_tar_list.stdout:
            line = line.decode("UTF-8", errors="replace").rstrip("\n")
            if line.startswith(prefix):
                dest_filename = line

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

As a result, NoSuchTag is raised, and the package is "converted" to a native format somehow (I didn't follow that through).

4. (example, search for "upstream")

Revision history for this message
Robie Basak (racb) wrote :

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.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.