Deploy of local git-based charms does not work

Bug #1457615 reported by Brad Crittenden
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
juju-deployer
Fix Released
Medium
Unassigned

Bug Description

Using juju-deployer on a local charm results in a git checkout to, e.g. trusty/trusty/mycharm. It then fails looking for trusty/metadata.yaml due to the extra level of the directory structure.

This patch written by Francesco Banconi may work:

=== modified file 'deployer/vcs.py'
--- deployer/vcs.py 2014-09-29 14:36:34 +0000
+++ deployer/vcs.py 2015-05-21 15:43:03 +0000
@@ -3,7 +3,10 @@

 from bzrlib.workingtree import WorkingTree

-from .utils import ErrorExit
+from .utils import (
+ ErrorExit,
+ mkdir,
+)

 class Vcs(object):
@@ -99,8 +102,12 @@
         self._call(params, self.err_update)

     def branch(self):
- params = ["git", "clone", "--depth", "1", self.origin, self.path]
- self._call(params, self.err_branch, os.path.dirname(self.path))
+ params = [
+ "git", "clone", "--depth", "1",
+ self.origin, os.path.basename(self.path)]
+ cwd = os.path.dirname(self.path)
+ mkdir(cwd)
+ self._call(params, self.err_branch, cwd)

     def is_modified(self):
         params = ["git", "status", "-s"]

Revision history for this message
Whit Morriss (whitmo) wrote :
Revision history for this message
Tim Van Steenburgh (tvansteenburgh) wrote :

@bac, would you mind re-testing with r148?

Changed in juju-deployer:
status: New → Fix Committed
importance: Undecided → Medium
Revision history for this message
Brad Crittenden (bac) wrote :

Thanks for the fix Tim. Sorry I did not notice your feedback previously.

Changed in juju-deployer:
status: Fix Committed → 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.