juju packaging branch fails using merge-upstream from tarball and upstream branch

Bug #985285 reported by Clint Byrum
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu Distributed Development
Confirmed
Medium
Unassigned

Bug Description

lp:ubuntu/juju, revision 11 (it may move on after this) gave me spurious conflicts when trying to merge from upstream, whether I use tarball or not. The upstream source is lp:juju , revision 531

To reproduce:

bzr branch lp:juju trunk
bzr branch lp:ubuntu/juju
cd juju
bzr merge-upstream file://../trunk

Or

cd ../trunk
bzr export ../jujuupstream.tar.gz
cd ../juju
bzr merge-upstream --version 0.5+bzr531 ../jujuupstream.tar.gz

Either way, I get tons of conflicts about directories that have to be moved out of the way:
$ bzr status
removed:
  .pc/applied-patches
  .pc/disable-failing-zookeeper-test.patch/
  .pc/disable-failing-zookeeper-test.patch/juju/
  .pc/disable-failing-zookeeper-test.patch/juju/agents/
  .pc/disable-failing-zookeeper-test.patch/juju/agents/tests/
  .pc/disable-failing-zookeeper-test.patch/juju/agents/tests/test_unit.py
added:
  examples/
  examples/precise/
  examples/precise/mysql/
  examples/precise/mysql/config.yaml
  examples/precise/mysql/hooks/
  examples/precise/mysql/hooks/db-relation-joined
  examples/precise/mysql/hooks/install
  examples/precise/mysql/hooks/start
  examples/precise/mysql/hooks/stop
  examples/precise/mysql/metadata.yaml
  examples/precise/mysql/revision
  examples/precise/php/
  examples/precise/php/config.yaml
  examples/precise/php/hooks/
  examples/precise/php/hooks/config-changed
  examples/precise/php/hooks/install
  examples/precise/php/hooks/start
  examples/precise/php/hooks/stop
  examples/precise/php/metadata.yaml
  examples/precise/php/revision
  examples/precise/recorder/
  examples/precise/recorder/hooks/
  examples/precise/recorder/hooks/juju-info-relation-changed
  examples/precise/recorder/hooks/juju-info-relation-departed
  examples/precise/recorder/hooks/juju-info-relation-joined
  examples/precise/recorder/metadata.yaml
  examples/precise/recorder/revision
  examples/precise/wordpress/
  examples/precise/wordpress/config.yaml
  examples/precise/wordpress/hooks/
  examples/precise/wordpress/hooks/config-changed
  examples/precise/wordpress/hooks/db-relation-changed
  examples/precise/wordpress/hooks/install
  examples/precise/wordpress/hooks/start
  examples/precise/wordpress/hooks/stop
  examples/precise/wordpress/metadata.yaml
  examples/precise/wordpress/revision
  juju/
  juju/agents/
  juju/agents/base.py
  juju/agents/tests/
  juju/agents/tests/test_base.py
  juju/agents/tests/test_machine.py
  juju/agents/unit.py
  juju/charm/
  juju/charm/tests/
  juju/charm/tests/test_publisher.py
  juju/control/
  juju/control/bootstrap.py
  juju/control/debug_log.py
  juju/control/destroy_service.py
  juju/control/remove_relation.py
  juju/control/remove_unit.py
  juju/control/status.py
  juju/control/terminate_machine.py
  juju/control/tests/
  juju/control/tests/test_destroy_service.py
  juju/control/tests/test_remove_relation.py
  juju/control/tests/test_remove_unit.py
  juju/environment/
  juju/environment/config.py
  juju/environment/tests/
  juju/environment/tests/test_config.py
  juju/errors.py
  juju/hooks/
  juju/hooks/commands.py
  juju/hooks/protocol.py
  juju/hooks/tests/
  juju/hooks/tests/test_communications.py
  juju/hooks/tests/test_invoker.py
  juju/lib/
  juju/lib/lxc/
  juju/lib/lxc/__init__.py
  juju/lib/lxc/tests/
  juju/lib/lxc/tests/test_lxc.py
  juju/lib/testing.py
  juju/machine/
  juju/machine/unit.py
  juju/providers/
  juju/providers/common/
  juju/providers/common/tests/
  juju/providers/common/tests/test_launch.py
  juju/providers/dummy.py
  juju/providers/ec2/
  juju/providers/ec2/__init__.py
  juju/providers/ec2/files.py
  juju/providers/ec2/tests/
  juju/providers/ec2/tests/common.py
  juju/providers/ec2/tests/test_files.py
  juju/providers/ec2/tests/test_launch.py
  juju/providers/ec2/tests/test_provider.py
  juju/providers/ec2/tests/test_utils.py
  juju/providers/ec2/utils.py
  juju/providers/local/
  juju/providers/local/__init__.py
  juju/providers/orchestra/
  juju/providers/orchestra/__init__.py
  juju/providers/orchestra/cobbler.py
  juju/providers/orchestra/launch.py
  juju/providers/orchestra/tests/
  juju/providers/orchestra/tests/common.py
  juju/providers/orchestra/tests/data/
  juju/providers/orchestra/tests/data/bootstrap_user_data
  juju/providers/orchestra/tests/test_bootstrap.py
  juju/providers/orchestra/tests/test_cobbler.py
  juju/providers/orchestra/tests/test_launch.py
  juju/providers/orchestra/tests/test_provider.py
  juju/state/
  juju/state/errors.py
  juju/state/hook.py
  juju/state/relation.py
  juju/state/tests/
  juju/state/tests/common.py
  juju/state/tests/test_base.py
  juju/state/tests/test_errors.py
  juju/state/tests/test_hook.py
  juju/state/tests/test_initialize.py
  juju/state/tests/test_relation.py
  juju/state/tests/test_service.py
  juju/state/tests/test_topology.py
  juju/state/tests/test_utils.py
  juju/state/topology.py
  juju/tests/
  juju/tests/test_errors.py
  juju/unit/
  juju/unit/charm.py
  juju/unit/lifecycle.py
  juju/unit/tests/
  juju/unit/tests/test_lifecycle.py
renamed:
  examples/ => examples.moved/
  juju/ => juju.moved/
modified:
  debian/changelog
  juju.moved/agents/tests/test_unit.py
  juju.moved/machine/constraints.py
  juju.moved/machine/tests/test_constraints.py
  juju.moved/unit/deploy.py
conflicts:
  Conflict adding files to examples. Created directory.
  Conflict because examples is not versioned, but has versioned children. Versioned directory.
  Conflict adding file examples. Moved existing file to examples.moved.
  Conflict adding files to juju. Created directory.
  Conflict because juju is not versioned, but has versioned children. Versioned directory.
  Conflict adding file juju. Moved existing file to juju.moved.
  Conflict adding files to juju/agents. Created directory.
  Conflict because juju/agents is not versioned, but has versioned children. Versioned directory.
  Conflict adding files to juju/agents/tests. Created directory.
  Conflict because juju/agents/tests is not versioned, but has versioned children. Versioned directory.
  Conflict adding files to juju/charm. Created directory.
  Conflict because juju/charm is not versioned, but has versioned children. Versioned directory.
  Conflict adding files to juju/charm/tests. Created directory.
  Conflict because juju/charm/tests is not versioned, but has versioned children. Versioned directory.
  Conflict adding files to juju/control. Created directory.
  Conflict because juju/control is not versioned, but has versioned children. Versioned directory.
  Conflict adding files to juju/control/tests. Created directory.
  Conflict because juju/control/tests is not versioned, but has versioned children. Versioned directory.
  Conflict adding files to juju/environment. Created directory.
  Conflict because juju/environment is not versioned, but has versioned children. Versioned directory.
  Conflict adding files to juju/environment/tests. Created directory.
  Conflict because juju/environment/tests is not versioned, but has versioned children. Versioned directory.
  Conflict adding files to juju/hooks. Created directory.
  Conflict because juju/hooks is not versioned, but has versioned children. Versioned directory.
  Conflict adding files to juju/hooks/tests. Created directory.
  Conflict because juju/hooks/tests is not versioned, but has versioned children. Versioned directory.
  Conflict adding files to juju/lib. Created directory.
  Conflict because juju/lib is not versioned, but has versioned children. Versioned directory.
  Conflict adding files to juju/lib/lxc. Created directory.
  Conflict because juju/lib/lxc is not versioned, but has versioned children. Versioned directory.
  Conflict adding files to juju/lib/lxc/tests. Created directory.
  Conflict because juju/lib/lxc/tests is not versioned, but has versioned children. Versioned directory.
  Conflict adding files to juju/machine. Created directory.
  Conflict because juju/machine is not versioned, but has versioned children. Versioned directory.
  Conflict adding files to juju/providers. Created directory.
  Conflict because juju/providers is not versioned, but has versioned children. Versioned directory.
  Conflict adding files to juju/providers/common. Created directory.
  Conflict because juju/providers/common is not versioned, but has versioned children. Versioned directory.
  Conflict adding files to juju/providers/common/tests. Created directory.
  Conflict because juju/providers/common/tests is not versioned, but has versioned children. Versioned directory.
  Conflict adding files to juju/providers/ec2. Created directory.
  Conflict because juju/providers/ec2 is not versioned, but has versioned children. Versioned directory.
  Conflict adding files to juju/providers/ec2/tests. Created directory.
  Conflict because juju/providers/ec2/tests is not versioned, but has versioned children. Versioned directory.
  Conflict adding files to juju/providers/local. Created directory.
  Conflict because juju/providers/local is not versioned, but has versioned children. Versioned directory.
  Conflict adding files to juju/providers/orchestra. Created directory.
  Conflict because juju/providers/orchestra is not versioned, but has versioned children. Versioned directory.
  Conflict adding files to juju/providers/orchestra/tests. Created directory.
  Conflict because juju/providers/orchestra/tests is not versioned, but has versioned children. Versioned directory.
  Conflict adding files to juju/providers/orchestra/tests/data. Created directory.
  Conflict because juju/providers/orchestra/tests/data is not versioned, but has versioned children. Versioned directory.
  Conflict adding files to juju/state. Created directory.
  Conflict because juju/state is not versioned, but has versioned children. Versioned directory.
  Conflict adding files to juju/state/tests. Created directory.
  Conflict because juju/state/tests is not versioned, but has versioned children. Versioned directory.
  Conflict adding files to juju/tests. Created directory.
  Conflict because juju/tests is not versioned, but has versioned children. Versioned directory.
  Conflict adding files to juju/unit. Created directory.
  Conflict because juju/unit is not versioned, but has versioned children. Versioned directory.
  Conflict adding files to juju/unit/tests. Created directory.
  Conflict because juju/unit/tests is not versioned, but has versioned children. Versioned directory.
pending merge tips: (use -v to see all merge revisions)
  Clint Byrum 2012-04-18 Import upstream version 0.5+bzr531

bzr:
  Installed: 2.5.0-2ubuntu2
  Candidate: 2.5.0-2ubuntu2
  Version table:
 *** 2.5.0-2ubuntu2 0
        500 http://mirrors.kernel.org/ubuntu/ precise/main amd64 Packages
        100 /var/lib/dpkg/status

Revision history for this message
James Westby (james-w) wrote :

Hi,

This is happening because the branch is in a bit of an odd state.

The "debian" revisions have one set of file-ids, and the "upstream" revisions in the packaging
branch have another set.

I'm not sure how this happened, but it looks like the files in the "debian" revisions were
effectively removed and re-added at some point.

The "upstream" file-ids match the true upstream lp:juju ones, so they are probably preferable.
bzr is changing the tree to use those ones, so the fix is probably to let it.

That means resolving the conflicts unfortunately. If the packaging branch doesn't have any
non-./debian/ changes to upstream then that should be straightforward though.

Thanks,

James

Martin Packman (gz)
Changed in udd:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Martin Packman (gz) wrote :

This was a pain to work around, because there's not actually any sane way to resolve the conflicts. You just get a selection of changed fileids that happen to have been touched on one side.

What I ended up doing was basically avoiding the builddeb logic entirely and just forcing the use of the upstream files rather than the importer ones. So:

$ # quilt pop everything
$ bzr rm *
$ bzr revert debian
$ bzr merge -r0..-1 --force ~/upstream/juju
$ # remove uneeded patches and quilt push any remaining
$ dch -i

This seems to get the branches back into some kind of sane state, but I guess the importer will be the judge of that.

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.