Package: bzr-builddeb
Version: 0.15~rc1
Severity: normal
Tags: patch

% bzr builddeb --working --merge
Running in merge mode
Building using working tree
bzr: ERROR: bzrlib.errors.ObjectNotLocked: <WorkingTree4 of 
/home/smcv/Collabora/pkg-telepathy/farsight> is not locked

Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/bzrlib/commands.py", line 650, in 
run_bzr_catch_errors
    return run_bzr(argv)
  File "/usr/lib/python2.4/site-packages/bzrlib/commands.py", line 612, in 
run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.4/site-packages/bzrlib/commands.py", line 304, in 
run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.4/site-packages/bzrlib/plugins/builddeb/__init__.py", 
line 223, in run
    (changelog, larstiq) = find_changelog(t, merge)
  File "/usr/lib/python2.4/site-packages/bzrlib/plugins/builddeb/util.py", line 
111, in find_changelog
    changelog_id = t.inventory.path2id(changelog_file)
  File "/usr/lib/python2.4/site-packages/bzrlib/workingtree_4.py", line 425, in 
_get_inventory
    self._must_be_locked()
  File "/usr/lib/python2.4/site-packages/bzrlib/workingtree_4.py", line 830, in 
_must_be_locked
    raise errors.ObjectNotLocked(self)
ObjectNotLocked: <WorkingTree4 of /home/smcv/Collabora/pkg-telepathy/farsight> 
is not locked

bzr 0.15.0 on python 2.4.4.final.0 (linux2)
arguments: ['/usr/bin/bzr', 'builddeb', '--working', '--merge']

This patch against http://jameswestby.net/bzr/bzr-builddeb/ seems to fix it:

==============================================================================
=== modified file '__init__.py'
--- __init__.py 2007-01-20 17:59:10 +0000
+++ __init__.py 2007-05-02 10:58:00 +0000
@@ -219,45 +219,51 @@
     else:
       info("Building using working tree")
       t = tree
-
-    (changelog, larstiq) = find_changelog(t, merge)
-
-    if build_dir is None:
-      build_dir = config.build_dir
-      if build_dir is None:
-        build_dir = '../build-area'
-
-    if orig_dir is None:
-      orig_dir = config.orig_dir
-      if orig_dir is None:
-        orig_dir = '../tarballs'
-    
-    properties = BuildProperties(changelog,build_dir,orig_dir,larstiq)
-
-    if merge:
-      if export_upstream is None:
-        build = DebMergeBuild(properties, t)
-      else:
-        prepull_upstream = config.prepull_upstream
-        stop_on_no_change = config.prepull_upstream_stop
-        build = DebMergeExportUpstreamBuild(properties, t, export_upstream,
-                                            export_upstream_revision,
-                                            prepull_upstream,
-                                            stop_on_no_change)
-    elif native:
-      build = DebNativeBuild(properties, t)
-    elif split:
-      build = DebSplitBuild(properties, t)
-    else:
-      build = DebBuild(properties, t)
-
-    build.prepare(use_existing)
+      t.lock_read()
 
     try:
-      build.export(use_existing)
-    except StopBuild, e:
-      warning('Stopping the build: %s.', e.reason)
-      return retcode
+        (changelog, larstiq) = find_changelog(t, merge)
+
+        if build_dir is None:
+          build_dir = config.build_dir
+          if build_dir is None:
+            build_dir = '../build-area'
+
+        if orig_dir is None:
+          orig_dir = config.orig_dir
+          if orig_dir is None:
+            orig_dir = '../tarballs'
+        
+        properties = BuildProperties(changelog,build_dir,orig_dir,larstiq)
+
+        if merge:
+          if export_upstream is None:
+            build = DebMergeBuild(properties, t)
+          else:
+            prepull_upstream = config.prepull_upstream
+            stop_on_no_change = config.prepull_upstream_stop
+            build = DebMergeExportUpstreamBuild(properties, t, export_upstream,
+                                                export_upstream_revision,
+                                                prepull_upstream,
+                                                stop_on_no_change)
+        elif native:
+          build = DebNativeBuild(properties, t)
+        elif split:
+          build = DebSplitBuild(properties, t)
+        else:
+          build = DebBuild(properties, t)
+
+        build.prepare(use_existing)
+
+        try:
+          build.export(use_existing)
+        except StopBuild, e:
+          warning('Stopping the build: %s.', e.reason)
+          return retcode
+
+    finally:
+        if working_tree:
+            t.unlock()
 
     if not export_only:
       build.build(builder)
==============================================================================

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (101, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.20-1-686 (SMP w/2 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages bzr-builddeb depends on:
ii  bzr                           0.15-1     bazaar-ng, the next-generation dis
ii  dpkg-dev                      1.13.25    package building tools for Debian
ii  fakeroot                      1.7        Gives a fake root environment
ii  python                        2.4.4-2    An interactive high-level object-o
ii  python-central                0.5.13-0.1 register and build utility for Pyt
ii  python-deb822                 0.2        Read and manipulate RFC822-like fi
ii  python-debian                 0.1.1      python modules to work with Debian

bzr-builddeb recommends no packages.

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to