{git-commit} doesn't work in a build recipe (0.3)

Bug #1058283 reported by Darxus
28
This bug affects 5 people
Affects Status Importance Assigned to Milestone
launchpad-buildd
Fix Released
High
Unassigned

Bug Description

This works:
# bzr-builder format 0.3 deb-version {debversion}+{revno}
These fail:
# bzr-builder format 0.3 deb-version {debversion}+{git-commit}
# bzr-builder format 0.3 deb-version {debversion}+{revdate}

Recipe: https://code.launchpad.net/~darxus/+recipe/wayland-daily
Building from: lp:~ted/wayland/master

Failures:
https://code.launchpad.net/~darxus/+archive/wayland-daily/+recipebuild/315684
bzr: ERROR: bzrlib.errors.BzrCommandError: deb-version not fully expanded: {debversion}+{git-commit}. Valid substitutions are: ['{time}', '{date}', '{revno:packaging}', '{revno}', '{svn-revno:packaging}', '{svn-revno}', '{git-commit:packaging}', '{git-commit}', '{latest-tag:packaging}', '{latest-tag}', '{debversion:packaging}', '{debversion}', '{debupstream-base:packaging}', '{debupstream-base}', '{debupstream:packaging}', '{debupstream}', '{revdate:packaging}', '{revdate}', '{revtime:packaging}', '{revtime}']

https://code.launchpad.net/~darxus/+archive/wayland-daily/+recipebuild/315657
bzr: ERROR: bzrlib.errors.BzrCommandError: deb-version not fully expanded: {debversion}+{revdate}. Valid substitutions are: ['{time}', '{date}', '{revno:packaging}', '{revno}', '{svn-revno:packaging}', '{svn-revno}', '{git-commit:packaging}', '{git-commit}', '{latest-tag:packaging}', '{latest-tag}', '{debversion:packaging}', '{debversion}', '{debupstream-base:packaging}', '{debupstream-base}', '{debupstream:packaging}', '{debupstream}', '{revdate:packaging}', '{revdate}', '{revtime:packaging}', '{revtime}']

https://code.launchpad.net/~darxus/+archive/wayland-daily/+recipebuild/315651
bzr: ERROR: bzrlib.errors.BzrCommandError: deb-version not fully expanded: {debversion}+{git-commit}. Valid substitutions are: ['{time}', '{date}', '{revno:packaging}', '{revno}', '{svn-revno:packaging}', '{svn-revno}', '{git-commit:packaging}', '{git-commit}', '{latest-tag:packaging}', '{latest-tag}', '{debversion:packaging}', '{debversion}', '{debupstream-base:packaging}', '{debupstream-base}', '{debupstream:packaging}', '{debupstream}', '{revdate:packaging}', '{revdate}', '{revtime:packaging}', '{revtime}']

And I just got "You have exceeded today's quota for ubuntu quantal.", which is incredibly frustrating.

Revision history for this message
i30817 (i30817) wrote :

Have this too... kinda strange the options are given for the upstream rev numbers if they don't work on the launchpad mirrors...

Revision history for this message
i30817 (i30817) wrote :

I had it for svn-revno instead though.

Revision history for this message
i30817 (i30817) wrote :

Welllllll.
{svn-revno}, {svn-revno:<branch id>} Replaced with the svn revision number of the revision that was built 0.4

{git-commit}, {git-commit:<branch id>} Replaced with the last 7 characters of the git commit that was built 0.4

So if we change 0.3 to 0.4 it might work (the recipe tut/wiki should be updated to set the example to 0.4 though)

Revision history for this message
Darxus (darxus) wrote :

Bah. Changed to:
# bzr-builder format 0.4 deb-version {debversion}+{date}+{git-commit}

Got:
bzr: ERROR: exceptions.AttributeError: 'cStringIO.StringI' object has no attribute 'split'

https://launchpadlibrarian.net/117938668/buildlog.txt.gz
https://launchpad.net/~darxus/+archive/wayland-daily/+recipebuild/316907

I acknowledge you said "might", but you really got my hopes up.

This thing sure can be frustrating to try to work with.

Revision history for this message
Curtis Hovey (sinzui) wrote :

The command is {git-commit:packaging}, not {git-commit} and it can only be used if you name one of the branches 'packaging'
such as :
# bzr-builder format 0.4 deb-version {debversion}+{date}+{git-commit:packaging}
lp:~ted/wayland/master
merge packaging lp:~darxus/+junk/wayland-packaging

Changed in launchpad:
status: New → Incomplete
Revision history for this message
Darxus (darxus) wrote :

Curtis: The error message and tutorial ( https://help.launchpad.net/Packaging/SourceBuilds/Recipes ) both say {git-commit} (without :packaging) should work. {git-commit:packaging} would give me the git commit of the packaging branch? That's not a git repo in this case, and not what I'm interested in being able to find the git repo of. I'd like people to be able to find out what upstream git commit the package was built from, as is listed as the Revision ID in the import details: https://bazaar.launchpad.net/~ted/wayland/master/revision/1077

Revision history for this message
Curtis Hovey (sinzui) wrote :

There are two issues in this bug
1
. Bug #891880 about 0.4 commands are shown as valid option in 0.3 recipes
   {git-commit} is not a valid version on 0.3
and
2. bug #915505 about the buildd running an older version of debversion.
    which is the split error you see in one example.

Though issue 1 is fixed upstream, the buildd is running the old version. This issue will be fixed when the servers are upgraded, probably to Ubuntu 12.04.

Changed in launchpad:
status: Incomplete → Triaged
importance: Undecided → High
affects: launchpad → launchpad-buildd
summary: - {git-commit} doesn't work in a build recipe
+ {git-commit} doesn't work in a build recipe (0.3)
Revision history for this message
Colin Watson (cjwatson) wrote :

Now that our virtual builders are running a trusty base system with bzr-builder 0.7.3, this should all work much better: you should be able to bump your recipe version to 0.4 and use {git-commit}. Please let us know if this doesn't work, for instance by reopening this bug.

Changed in launchpad-buildd:
status: Triaged → Fix Released
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.