[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: SVN layout problems (change it?)



Am Freitag, den 02.11.2007, 20:27 +0100 schrieb David Paleino:

> I'm recently having some difficulties with our current SVN layout. In fact, I
> like more SVN layout 2 (the one used by pkg-perl team, for example), than ours.
> 
> Here's the situation.
> 
> Current layout:
> 
> - trunk/
> -- packages/
> --- <package>/
> ---- branches/
> ---- tags/
> ---- trunk/
> ----- debian/ [ with _NO_ source files ]
> ---- (tarballs/)*
> 
> At least, this is what svn-inject created when I uploaded bioimagesuite.
> Here's, instead, SVN layout 2:
> 
> - branches/
> - tags/
> - trunk/
> -- (tarballs/)*
> -- <package>/
> --- debian/
> --- [ other source files ]
> 
> [ * this is added manually, or by svn-buildpackage, AFAIK. ]
> 
> I might agree that we save space by avoiding duplication of source code, yes,
> but I find it far less intuitive to, for example, create a patch for the source
> code: actually, in fact, I have to create the patch in some other dir where I
> have the source code extracted, svn commit it, svn up from the "real"
> directory, and svn-buildpackage from there. Probably I'm missing something, and
> I would be thankful for anyone who would save me from this hell.

I use the first example (no source files except the debian packaging
files). If you use dpatch, you can do the following:

~/.dpatch.conf:
PACKAGENAME="$(dpkg-parsechangelog | sed -n
'/^Source:/{s/^Source:[[:space:]]\+\(.*\)/\1/;p;q}')"
UPSTREAMVERSION="$(dpkg-parsechangelog | sed -n
'/^Version:/{s/^Version:[[:space:]]\+\([0-9]\+:\)\?\([^-]\
+\).*/\2/;p;q}')"

conf_origtargzpath="/usr/local/src/packages/${PACKAGENAME}"


~/.svn-buildpackage:
svn-override=origDir=/usr/local/src/packages/$PACKAGE
svn-override=buildArea=/usr/local/src/packages/$PACKAGE


I have all sources in /usr/local/src/packages/$PACKAGE and (most often)
the Debian packaging files in /usr/local/src/packages/pkg_$PACKAGE. If I
change into this directory, then I simply have to run:

dpatch-edit-patch -b my_patch

This tells dpatch, to search for the orig.tar.gz tarball in
${conf_origtargzpath}. It should be very simple to use this for your
situation too.

That's why I prefer the layout to only have debian/ under version
control.

Regards, Daniel



Reply to: