Existence of .bzr in src build tree confuses dpkg-source

Bug #445151 reported by Stephen Warren
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
AutoPPA
New
Undecided
Unassigned

Bug Description

I created a bzr branch with pipelines, roughly:
cd ~/bzr_wa
mkdir ppa-libvdpau
cd ppa-libvdpau
bzr init-repo
bzr import ~/path/to/libvdpau-0.2.tar.gz trunk
cd trunk
bzr nick upstream
bzr reconfigure-pipeline
bzr commit -m "Import libvdpau-0.2.tar.gz"
bzr add-pipe ubuntu
cp -rp ~/path/to/debian debian
bzr add debian
bzr commit -m "Add debian/"

with this ~/.autoppa.conf:
[libvdpau]
email = Stephen Warren <email address hidden>
branch = /home/swarren/bzr_wa/ppa-libvdpau/trunk/pipes/ubuntu
repository = /home/swarren/bzr_wa/ppa-libvdpau
ppa = ppa-libvdpau
releases = hardy intrepid jaunty karmic

and this command-line:
autoppa --no-upload --no-merge --no-tag libvdpau-0.2-1~autoppa1

This generates the following problems due to .bzr being present when autoppa generates the source packages:
AutoPPA 0.0.6

== Preparing changelog for libvdpau ==

== Preparing working tree for libvdpau ==
No handlers could be found for logger "bzr"
[ 1612] 2009-10-06 22:39:25.214 INFO: Branched 2 revision(s).
Branched 2 revision(s).

== Preparing signed source for libvdpau ==
 dpkg-buildpackage -rfakeroot -d -us -uc -S
dpkg-buildpackage: set CFLAGS to default value: -g -O2
dpkg-buildpackage: set CPPFLAGS to default value:
dpkg-buildpackage: set LDFLAGS to default value: -Wl,-Bsymbolic-functions
dpkg-buildpackage: set FFLAGS to default value: -g -O2
dpkg-buildpackage: set CXXFLAGS to default value: -g -O2
dpkg-buildpackage: source package libvdpau
dpkg-buildpackage: source version 0.2-1~autoppa1.8.04
dpkg-buildpackage: source changed by Stephen Warren <email address hidden>
 fakeroot debian/rules clean
dh_testdir
dh_testroot
rm -f build-stamp
[ ! -f Makefile ] || /usr/bin/make distclean
rm -f config.sub config.guess
dh_clean
 dpkg-source -b libvdpau_0.2-1~autoppa1
dpkg-source: warning: source directory 'libvdpau_0.2-1~autoppa1' is not <sourcepackage>-<upstreamversion> 'libvdpau-0.2'
dpkg-source: warning: .orig directory name libvdpau_0.2-1~autoppa1.orig is not <package>-<upstreamversion> (wanted libvdpau-0.2.orig)
dpkg-source: info: using source format `1.0'
dpkg-source: info: building libvdpau using existing libvdpau_0.2.orig.tar.gz
dpkg-source: info: building libvdpau in libvdpau_0.2-1~autoppa1.8.04.diff.gz
dpkg-source: error: cannot represent change to libvdpau_0.2-1~autoppa1/.bzr/checkout/dirstate: binary file contents changed
dpkg-source: warning: newly created empty file '.bzr/checkout/views' will not be represented in diff
dpkg-source: warning: newly created empty file '.bzr/branch/tags' will not be represented in diff
dpkg-source: warning: ignoring deletion of file config.sub
dpkg-source: warning: ignoring deletion of file config.guess
dpkg-source: unrepresentable changes to source
dpkg-buildpackage: failure: dpkg-source -b libvdpau_0.2-1~autoppa1 gave error exit status 1
debuild: fatal error at line 1329:
dpkg-buildpackage -rfakeroot -d -us -uc -S failed
...

Revision history for this message
Stephen Warren (srwarren) wrote :

Looking at the code, this happens because target.py:prepare_working_tree() simply branches the main branch to a temporary branch, and then runs the debuild commands right there. That temporary branch of course contains .bzr, and so causes the issue. It'd be better if autoppa performed a "bzr export" to a temporary directory (as opposed to the using a temporary branch), since that would not export the .bzr directory. Even better would be to export the build tag, so as to guarantee reproducibility.

Alternatively, perhaps I'm using autoppa wrong. My branch is trunk/, which naturally contains trunk/.bzr. Then, all the package's files are directly in that directory. Should I have some intermediate directory, so I end up with trunk/.bzr and trunk/libuvdpau-0.2/...? In that case, everthing has to move/rename when things eventually get upgraded to libvdpau-0.3. I suppose I could name the intermediate directory without any versioning. debuild also seems like it might be confused about the parent of the source directory not being named libvdpau-0.2...

Revision history for this message
Jamu Kakar (jkakar) wrote :

It sounds like you're using AutoPPA as intended. The projects I use
AutoPPA have a structure like:

trunk/
  debian/
  myproject/

With packaging files in the debian/ directory and project source in
myproject/. If I understand correctly, you use a similar structure,
right? So is the issue that your package scripts are copying the
.bzr directory into place or am I misunderstanding the issue?

What you suggest, doing a bzr export, would work in the case were
you don't care about merging, but I'd prefer not to have to do that,
if possible. I think I'd like to understand more clearly how the
.bzr directory is causing problems before recommending a way
forward.

If you want to talk about this in real time feel free to ping me on
IRC. I'm jkakar and can be found in #launchpad on Freenode.

Revision history for this message
Stephen Warren (srwarren) wrote :

Just a note: This error only happens when project_version.orig.tar.gz file exists in the repository directory. This causes debuild -S to try to create a diff file not a complete source tar. I had done this hoping to upload small diff files to my PPA instead of the whole source tree for each distro and version.

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.