Bug#678845: [Svn-bp-devel] Bug#678845: svn-buildpackage: svn-inject fails with subversion 1.7

2012-07-02 Thread Neil Williams
retitle 678845 svn-inject -o fails to determine absolute path
thanks

On Fri, 29 Jun 2012 10:30:03 +0200
Stefano Rivera stefa...@debian.org wrote:

 Hi Peter (2012.06.29_00:17:43_+0200)
  That is svn complaining because, apparently, it is run inside a
  directory that has been deleted.  How would I reproduce your bug - how
  did you invoke svn-inject?  I tried, and could not.  And I can't find
  where svn-bp _would_ delete the cwd while it is still the cwd.
 
 Oh, whoops, meant to attach a complete log.

Still no log attached.

 The command was:
 svn-inject -o pycparser_2.07+dfsg-1.dsc svn+ssh://purcell/tmp/test

So I attach my own test log for:

$ svn-inject pycparser_2.07+dfsg-1.dsc \
file:///home/neil/code/debian/svn-buildpackage/test/svn/

... which works and for 

$ svn-inject -o pycparser_2.07+dfsg-1.dsc \
file:///home/neil/code/debian/svn-buildpackage/test/svn/upstream/

... which fails.

So this is only related to the -o option.

It's not to do with this particular package, it fails with other
packages too.

Investigating...

reportbug template:

-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: armel
i386

Kernel: Linux 3.2.0-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
(ignored: LC_ALL set to en_GB.UTF-8) Shell: /bin/sh linked to /bin/dash

Versions of packages svn-buildpackage depends on:
ii  devscripts  2.12.0
ii  file5.11-2
ii  libcapture-tiny-perl0.18-1
ii  libfile-libmagic-perl   0.96-2
ii  liblocale-gettext-perl  1.05-7+b1
ii  libsvn-perl 1.7.5-1
ii  liburi-perl 1.60-1
ii  perl5.14.2-12
ii  subversion  1.7.5-1
ii  unp 2.0~pre7+nmu1
ii  wget1.13.4-3

Versions of packages svn-buildpackage recommends:
ii  debhelper  9.20120608

svn-buildpackage suggests no packages.

-- no debconf information




-- 


Neil Williams
=
http://www.linux.codehelp.co.uk/



svn-bp.log
Description: Binary data


pgp9eYS1qqkgQ.pgp
Description: PGP signature


Bug#678845: [Svn-bp-devel] Bug#678845: svn-buildpackage: svn-inject fails with subversion 1.7

2012-07-02 Thread Peter Samuelson

tags 678845 patch
thanks

[Neil Williams]
 $ svn-inject -o pycparser_2.07+dfsg-1.dsc \
 file:///home/neil/code/debian/svn-buildpackage/test/svn/upstream/
 
 ... which fails.
 
 So this is only related to the -o option.

From your log:

 cd /tmp/tmp.e9DyJwzOqX/unpdir/pycparser-2.07+dfsg ; tar  -c debian/copyright 
debian/patches/abort-on-test-failure deb
ian/rules debian/patches/series debian/compat debian/source/ debian/control 
debian/python3-pycparser.docs debian/
debian/changelog debian/clean debian/source/format debian/watch 
debian/python-pycparser.examples debian/patches/
debian/python-pycparser.docs debian/python-pycparser.install 
debian/python3-pycparser.install
debian/python3-pycparser.examples 2/dev/null | tar x  -C /tmp/tmp.VW1h6QWbAr
rm -rf /tmp/tmp.e9DyJwzOqX/unpdir/pycparser-2.07+dfsg
mv /tmp/tmp.VW1h6QWbAr /tmp/tmp.e9DyJwzOqX/unpdir/pycparser-2.07+dfsg
svn co 
file:///home/neil/code/debian/svn-buildpackage/test/svn/upstream/pycparser/trunk
 /tmp/tmp.e9DyJwzOqX/trunk

So as I thought, 'svn co' is run in a deleted cwd.  For reporting
purposes, it tries to get the absolute path of '.', which obviously
will not work there.

Arguably this failure mode is a new bug in Subversion 1.7, because in
the present case it shouldn't need to report anything relative to the
cwd, since it was given only absolute paths.  But a deleted cwd is a
strange corner case, and I seem to recall that in some Unix kernels it
is not even legal.  Plus, I'm told by upstream that this particular
error turns out to not be easy to avoid, as the distinction between
relative and absolute paths is far away from where the getcwd()
happens.

This ought to do the trick:

--- svn-inject
+++ svn-inject
@@ -626,6 +626,7 @@ sub del_unreferenced {
 # withecho(cp, -a, --parents, (keys %ourfiles), ../current2); 
sucks, cannot ignore errors properly
 # this sucks too
 withecho(cd $dir ; tar $opt_tarquiet -c .join(' ',keys %list). 
2/dev/null | tar x $opt_tarquiet -C $tmpdir);
+chdir /;
 withecho(rm, -rf, $dir);
 withecho(mv, $tmpdir, $dir);
 }



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#678845: svn-buildpackage: svn-inject fails with subversion 1.7

2012-06-29 Thread Stefano Rivera
Hi Peter (2012.06.29_00:17:43_+0200)
 That is svn complaining because, apparently, it is run inside a
 directory that has been deleted.  How would I reproduce your bug - how
 did you invoke svn-inject?  I tried, and could not.  And I can't find
 where svn-bp _would_ delete the cwd while it is still the cwd.

Oh, whoops, meant to attach a complete log.

The command was:
svn-inject -o pycparser_2.07+dfsg-1.dsc svn+ssh://purcell/tmp/test

It works with 1.6 and fails when I upgrade svn to 1.7.

SR

-- 
Stefano Rivera
  http://tumbleweed.org.za/
  H: +27 21 461 1230 C: +27 72 419 8559



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#678845: svn-buildpackage: svn-inject fails with subversion 1.7

2012-06-28 Thread Peter Samuelson

[Stefano Rivera]
 Since upgrading to subversion 1.7, svn-inject no longer works:
 
  ...
  svn co svn+ssh://purcell/tmp/test/pycparser/trunk /tmp/tmp.jKa9wdfMh5/trunk
  svn: E125001: Couldn't determine absolute path of '.'
  svn: E02: No such file or directory
  mkdir -p /tmp/tmp.jKa9wdfMh5/trunk
  svn -m Creating trunk directory import /tmp/tmp.jKa9wdfMh5/trunk 
  svn+ssh://purcell/tmp/test/pycparser/trunk
  svn: E125001: Couldn't determine absolute path of '.'
  svn: E02: No such file or directory
  Command 'svn -m Creating trunk directory import /tmp/tmp.jKa9wdfMh5/trunk 
  svn+ssh://purcell/tmp/test/pycparser/trunk' failed in 'unknown', how to 
  continue now? [Qri?]: q
  Aborting.

That is svn complaining because, apparently, it is run inside a
directory that has been deleted.  How would I reproduce your bug - how
did you invoke svn-inject?  I tried, and could not.  And I can't find
where svn-bp _would_ delete the cwd while it is still the cwd.

(I am not a svn-bp user, so I don't know the common use patterns.)

The fact that svn aborts because it can't turn '.' into an absolute
path is arguably a bug, which I've pinged upstream about.  svn wants to
canonicalize the paths it acts upon, and then report them relative to
the current directory - that's why it attempts to getcwd().  In fact
this is not relevant if you pass it absolute pathnames, as svn-inject
does, but getting svn to look up the absolute cwd only when it is
working on relative paths turns out to not be trivial.

Peter



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#678845: svn-buildpackage: svn-inject fails with subversion 1.7

2012-06-24 Thread Stefano Rivera
Package: svn-buildpackage
Version: 0.8.4
Severity: serious

Since upgrading to subversion 1.7, svn-inject no longer works:

 ...
 svn co svn+ssh://purcell/tmp/test/pycparser/trunk /tmp/tmp.jKa9wdfMh5/trunk
 svn: E125001: Couldn't determine absolute path of '.'
 svn: E02: No such file or directory
 mkdir -p /tmp/tmp.jKa9wdfMh5/trunk
 svn -m Creating trunk directory import /tmp/tmp.jKa9wdfMh5/trunk 
 svn+ssh://purcell/tmp/test/pycparser/trunk
 svn: E125001: Couldn't determine absolute path of '.'
 svn: E02: No such file or directory
 Command 'svn -m Creating trunk directory import /tmp/tmp.jKa9wdfMh5/trunk 
 svn+ssh://purcell/tmp/test/pycparser/trunk' failed in 'unknown', how to 
 continue now? [Qri?]: q
 Aborting.

SR

-- System Information:
Debian Release: wheezy/sid
  APT prefers testing-proposed-updates
  APT policy: (500, 'testing-proposed-updates'), (500, 'unstable'), (500, 
'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-2-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_ZA.UTF-8, LC_CTYPE=en_ZA.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages svn-buildpackage depends on:
ii  devscripts  2.11.9
ii  file5.11-1
ii  libcapture-tiny-perl0.18-1
ii  libfile-libmagic-perl   0.96-2
ii  liblocale-gettext-perl  1.05-7+b1
ii  libsvn-perl 1.7.5-1
ii  liburi-perl 1.60-1
ii  perl5.14.2-12
ii  subversion  1.7.5-1
ii  unp 2.0~pre7+nmu1
ii  wget1.13.4-3

Versions of packages svn-buildpackage recommends:
ii  debhelper  9.20120608

svn-buildpackage suggests no packages.

-- no debconf information



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org