nest-part not implemented

Bug #1537579 reported by Colin Watson
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
git-build-recipe
Fix Released
High
Colin Watson

Bug Description

git-build-recipe does not yet implement the "nest-part" command, which is useful e.g. for using just the "debian" directory from a different full-source branch.

I think this is not too hard to implement, just a little fiddly. I think we want something like:

 * add the given repository as a new remote and fetch it
 * apply "git filter-branch --subdirectory-filter" to split out a new branch with just the given subdirectory (careful to handle refs/original/ properly to avoid problems with multiple nest-part runs; we probably want to use a different temporary ref namespace and clean it up at the end)
 * use "git subtree add" to import the filtered branch into the requested subdirectory of the top-level tree

Colin Watson (cjwatson)
Changed in git-build-recipe:
assignee: nobody → Colin Watson (cjwatson)
status: Triaged → In Progress
William Grant (wgrant)
Changed in git-build-recipe:
status: In Progress → Fix Committed
Revision history for this message
Colin Watson (cjwatson) wrote :

git-build-recipe (0.3) unstable; urgency=medium

  [ Colin Watson ]
  * Implement nest-part (LP: #1537579).
  * Initial upload to Debian (closes: #814031).
  * Policy version 3.9.7: no changes required.

  [ William Grant ]
  * Fix substitution variables to always use the original source commits.
    (LP: #1542673)

 -- Colin Watson <email address hidden> Thu, 10 Mar 2016 17:33:26 +0000

Changed in git-build-recipe:
status: Fix Committed → Fix Released
Revision history for this message
Khurshid Alam (khurshid-alam) wrote :

@Colin Watson

Could you please update how to use nest-part for git recipes at https://help.launchpad.net/Packaging/SourceBuilds/Recipes ?

It still says "nest-part is not yet implemented for git recipes, but will be soon"

Revision history for this message
Colin Watson (cjwatson) wrote :

I've updated the documentation now. Thanks for the reminder.

Revision history for this message
Thomas Karl Pietrowski (thopiekar) wrote :

Colin: Thank you for the update.
Got a recipe where which I converted from BZR (I was manually import my code with a script on my desktop) to GIT.
For a reason the recipe fails here while executing a git command:
https://code.launchpad.net/~thopiekar/+archive/ubuntu/cura-master/+recipebuild/1261391

Revision history for this message
Thomas Karl Pietrowski (thopiekar) wrote :

Additionally something goes wrong here:
https://code.launchpad.net/~thopiekar/+archive/ubuntu/cura-master/+recipebuild/1261457

For a reason the OctoPrintPlugin is not included in the source package. So while building the binary packages I get an error and this a failed build.

Revision history for this message
Thomas Karl Pietrowski (thopiekar) wrote :

Colin: You can forget about the failed builds above.
Had a lot of mistypes in the recipes. Now most are working fine except one with a nest-part.

In a recipe I want to:

nest-part firmware lp:~ultimaker/ultimaker/+git/cura-binary-data cura/resources/firmware resources/firmware 2.3.1

But it fails with: https://launchpadlibrarian.net/293992302/buildlog.txt.gz

Using:
nest-part firmware lp:~ultimaker/ultimaker/+git/cura-binary-data cura/resources/firmware resources/firmware master

Works: https://code.launchpad.net/~thopiekar/+archive/ubuntu/cura/+recipebuild/1262272

The recipe: https://code.launchpad.net/~thopiekar/+recipe/cura-stable-daily

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.