local svn:externals with bzr and by-reference trees

April 29, 2010

$ bzr branch https://mingw-w64.svn.sourceforge.net/svnroot/mingw-w64/trunk
$ cd trunk/
$ svn proplist -v -R https://mingw-w64.svn.sourceforge.net/svnroot/mingw-w64/trunk | grep externals -C1
Properties on 'svn-checkout/mingw-w64-headers/ddk/include':
ddk svn://svn.reactos.org/reactos/trunk/reactos/include/ddk

$ bzr branch svn://svn.reactos.org/reactos/trunk/reactos/include/ddk mingw-w64-headers/ddk/include/ddk
$ bzr join mingw-w64-headers/ddk/include/ddk/
$ bzr ci -m "Merging svn:externals"

$ bzr merge :parent
https://mingw-w64.svn.sourceforge.net/svnroot/mingw-w64/trunk is permanently redirected to https://mingw-w64.svn.sourceforge.net/svnroot/mingw-w64/trunk/
+N mingw-w64-crt/misc/wcstof.c
+N mingw-w64-headers/direct-x/include/d3dx9shape.h
M mingw-w64-crt/ChangeLog
M mingw-w64-headers/include/ChangeLog
M mingw-w64-headers/include/dbghelp.h
All changes applied successfully.

$ bzr ci -m "merged from upstream svn"

$ bzr merge svn://svn.reactos.org/reactos/trunk/reactos/include/ddk
M mingw-w64-headers/ddk/include/ddk/hubbusif.h
M mingw-w64-headers/ddk/include/ddk/ntddk.h
M mingw-w64-headers/ddk/include/ddk/ntifs.h
M mingw-w64-headers/ddk/include/ddk/ntimage.h
M mingw-w64-headers/ddk/include/ddk/usbbusif.h
M mingw-w64-headers/ddk/include/ddk/wdm.h
All changes applied successfully.

$ bzr ci -m "Merged updates from ddk svn:externals"

If you really need to commit back. Create pristine bzr-svn import without joined externals. Merge just the revisions you want to commit and merge that into svn.

$ echo "Bzr rocks" >> sure-it-does; bzr add sure-it-does; bzr ci -m "My masive hack"
$ bzr branch :parent ../pristine
$ cd ../pristine
$ bzr merge -r-2..-1 ../trunk
$ bzr ci -m "Bingo"
$ bzr push :parent

But this will invalidate your “joined” clone.

When bzr people talk about NestedTrees we mean by-reference Nested Trees such that joining a tree doesn’t join it’s whole history but instead transperatly, rerucsivly commits to correct child branches. With by-reference nested trees you would then be able to push to correct upstreams of all externals code.

Lintian no-symbols-control-file

January 29, 2009

This advice has been posted on the debian-mentors mailing list. A quick how to generate symbols file

$ apt-get source libsword6
$ cd sword-1.5.9
$ debuild binary
$ rm -f debian/*.symbols dpkg-gensymbols*
$ dpkg-gensymbols -plibsword6 -Pdebian/libsword6 | patch -p0
$ mv dpkg-gensymbols* debian/libsword6.symbols
$ perl -pi -e ‘s/-\d.*//’ debian/libsword6.symbols

dpkg-shlibdeps: warning: dependency could be avoided

January 29, 2009

dpkg-shlibdeps: warning: dependency on $(lib) could be avoided if $(object) were not uselessly linked against it (they use none of its symbols).

I didn’t like this build time warning at all. In the library packaging guide a found a nifty trick, add this line to the debian/rules (this is cdbs, don’t know how it is done with debhelper scripts)


This worked for the executable and I’ve saved 300 bytes!!!!! Yeah =D

It didn’t work for the library though =( Bummer.