severity 549568 minor
retitle 549568 svn-do expects copies instead of hard links
tag 549568 + confirmed
quit

On Sun, 4 Oct 2009 15:15:02 +0200
Jakub Wilk <uba...@users.sf.net> wrote:

> Package: svn-buildpackage
> Version: 0.6.29
> Severity: important
> File: /usr/bin/svn-do
> 
> svn-do is so broken, that is not usable at all:

What are you trying to achieve with svn-do?

> - each invocation of svn-do increases link count of every file in the 
> working copy;

The default behaviour of svn-buildpackage is to use links, the
destination of the links is the ../build-area/$package-$version/
directory which is only temporary. svn-do probably should use existing
svn-buildpackage support for --svn-rm-prev-dir and/or --svn-reuse.
These can't be used blindly for all invocations of svn-do, so some kind
of option support is needed in svn-do for this to work properly.
Alternatively, svn-do could just accept the -- option, denoting that
all subsequent values are passed to svn-buildpackage as options.

It seems that the core problem is that svn-do is expecting full copies
that are independent of the working copy files and this is the reason
why the rest of the operations fail. I've been able to locally restore
that behaviour by getting svn-do to use --svn-no-links.

> - files inside the working copy are modified even if the executed 
> command failed;

That's because the files are hardlinks, not separate copies. (i.e.
modified immediately instead of conditionally depending on the exit
status of the call within svn-do.)

> - once your files are modified, you are no longer able to do anything 
> useful with svn-do.

This is because svn-do probably needs to gain support for --svn-ignore.

I'm thinking that svn-do could probably migrate into /usr/share instead
of /usr/bin anyway - there are sections of the script where the author
clearly expected users to be copying the file and using it as a basis
for private scripts rather than assuming it would always do the right
thing.

I propose to close this bug by adding --svn-ignore and --svn-no-links
to the export command for all invocations of svn-do and then moving the
script to /usr/share/svn-buildpackage/contrib/ with a few comments in
the script. e.g. advising the use of --svn-reuse or --svn-rm-prev-dir
as alternatives to the existing comment about simply using rm -rf.

If there are real user cases for regular usage of svn-do, I'm OK with
extending it to support the -- option in 0.7.1 (as this would involve
changing the manpage which is currently in string freeze for
translation).

-- 


Neil Williams
=============
http://www.data-freedom.org/
http://www.nosoftwarepatents.com/
http://www.linux.codehelp.co.uk/

Attachment: pgpPlFnvHX6jr.pgp
Description: PGP signature

Reply via email to