upgrading charms from oneiric to precise

Kapil Thangavelu kapil.thangavelu at canonical.com
Fri May 25 21:55:01 UTC 2012


The oneiric charm branches have all been restored. Thanks mark, james, and
clint and unknown LP folks ;-)

The problem was apparently something obscure (bzr stacking) with distro
branch script that caused the oneiric bzr branches to not support the
rename of the precise branches. In future distro releases we'll try and
make the script either stack on id (ie. support renames), or push the
branches to the new series via a different mechanism and set the active
series separately.

cheers,
Kapil

On Tue, May 22, 2012 at 10:13 AM, Kapil Thangavelu <
kapil.thangavelu at canonical.com> wrote:

> This appears to have broken all the official oneiric charms. Why where they
> renamed as opposed to merged/copied into the correct location? The oneiric
> charms should still be promulgated for the oneiric series. Which series
> trunk
> branch lp:charms/<name> points to is controlled by the current series on
> lp,
> not by the promulgation process alone.
>
> we need to figure out how to restore the oneiric charms.
>
> -kapil
>
> Excerpts from Mark Mims's message of 2012-05-04 15:35:02 -0400:
> > Capturing notes on how we did this so when we're changing from p to q on
> > October we have some clue as to what we did here.
> >
> > ----------8<----------------
> >
> > # lp changes
> >
> > So this started with the lp team running `branch-distro` for charms.
> >
> > This took all branches in the store `lp:charms/<charm-name>`
> > (which are aliases to `lp:~charmers/charms/oneiric/<charm-name>/trunk`)
> and:
> >    - renamed them to `lp:~charmers/charms/precise/<charm-name>/precise`
> >    - created `lp:charms/<charm-name>` aliases pointing to these new
> branches
> >
> >
> > # the problem
> >
> > This naming scheme doesn't fit into our naming scheme for juju and the
> > charmstore...
> > namely `lp:~charmers/charms/<series>/<charm-name>/trunk`
> >
> >
> > # renames
> >
> > To fix this, we rename from `/precise` to `/trunk` across the board:
> >
> >      #!/usr/bin/python
> >
> >      from launchpadlib.launchpad import Launchpad
> >
> >      lp = Launchpad.login_with('rename-charms',
> > service_root='production', version='1.0')
> >
> >      for branch in lp.people['charmers'].getBranches():
> >          if branch.unique_name.startswith('~charmers/charms/precise/')
> > and branch.name == 'precise':
> >              print "Renaming " + branch.unique_name
> >              branch.name = 'trunk'
> >              try:
> >                  branch.lp_save()
> >              except:
> >                  print "couldn't do "
> >                  print branch
> >
> >
> > # more problems
> >
> > which barfs when there are existing branches with that name.
> >
> > Example:
> >    - before `branch-distro`
> >      - `lp:charms/nova-compute` points to
> > `lp:~charmers/charms/oneiric/nova-compute/trunk` (r28)
> >      - `lp:~charmers/charms/precise/nova-compute/trunk` (r34) exists for
> > development on precise
> >    - after `branch-distro`
> >      - `lp:charms/nova-compute` points to
> > `lp:~charmers/charms/precise/nova-compute/precise` (r28)
> >      - `lp:~charmers/charms/precise/nova-compute/trunk` (r34) exists and
> > should be the official aliased charm but isn't
> >
> >
> > # repromulgation
> >
> > Clint wrote `charm unpromulgate` which would allow us to:
> >
> >      bzr branch lp:charms/nova-compute
> >      cd nova-compute
> >      bzr push :parent
> >      edit .bzr/branch/branch.conf and replace everything with
> > bzr+ssh://
> bazaar.launchpad.net/~charmers/charms/precise/nova-compute/precise
> >      charm unpromulgate
> >
> >      cd ..
> >      mv nova-compute nova-compute-barfed
> >
> >
> >
> > and then promulgate the correct branch
> >
> >      bzr branch lp:~charmers/charms/precise/nova-compute/trunk
> nova-compute
> >      cd nova-compute
> >      bzr push :parent
> >      charm promulgate
> >
> > ----------8<----------------
> >
> > (logs captured in `lp:~mark-mims/+junk/charm-branch-distro-notes`)
> >
> > --
> > Mark Mims, Ph.D.
> > Canonical Ltd.
> > mark.mims at canonical.com
> > +1(512)981-6467
> >
>
> --
> Juju mailing list
> Juju at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/juju
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/juju/attachments/20120525/360beeb4/attachment.html>


More information about the Juju mailing list