Bug#696625: EXDEV not catched properly

Christoph Berg myon at debian.org
Mon Dec 24 08:12:32 UTC 2012


Package: autopkgtest
Version: 2.2.3
Severity: normal

adt-run: trace: ** init
adt-run: trace: ** start
adt-run: trace: $ vserver: adt-virt-null
adt-run: trace: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ starting
adt-run: trace: ** open, scratch=None
adt-run: trace: ** cmdl = ['sh', '-c', 'exec "$@"', 'x']
adt-run: trace: * initialising
adt-run: trace: * no key generation needed
adt-run: trace: * reset
adt-run: trace: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ builds ...
adt-run: trace: @@@@@@@@@@@@@@@@@@@@ deb deb0
adt-run: trace: * register what=deb0 deb_forbuilds=auto pkg=pgbouncer af=deb0-deb~pgbouncer_1.5.4-1_amd64.deb:pgbouncer_1.5.4-1_amd64.deb!|-
adt-run: unexpected, exceptional, error:
Traceback (most recent call last):
  File "/usr/bin/adt-run", line 1883, in main
    process_actions()
  File "/usr/bin/adt-run", line 1823, in process_actions
    'forbuilds',testbed.blamed)
  File "/usr/bin/adt-run", line 1486, in register
    shutil.copy(af.read(), dest)
  File "/usr/lib/python2.7/shutil.py", line 117, in copy
    if os.path.isdir(dst):
  File "/usr/lib/python2.7/genericpath.py", line 41, in isdir
    st = os.stat(s)
TypeError: coercing to Unicode: need string or buffer, instance found
adt-run: trace: ** stop
adt-run: trace: ** close, scratch=tb-scratch~/tmp/tmp.WCCrAUmben:-/|/tmp/tmp.WCCrAUmben/!

This patch fixes the issue:

--- adt-run.orig	2012-12-24 09:07:54.000000000 +0100
+++ adt-run	2012-12-24 09:07:57.000000000 +0100
@@ -1482,7 +1482,7 @@
 	try: os.link(af.read(), dest.write())
 	except (IOError,OSError), oe:
 		if oe.errno != errno.EXDEV: raise e
-		shutil.copy(af.read(), dest)
+		shutil.copy(af.read(), dest.write())
 
 	if act.ah['deb_'+forwhat] == 'install':
 		b.install.append(pkg)

PS: git://git.debian.org/git/autopkgtest/autopkgtest.git (from the Vcs
header) seems pretty out of date

Christoph
-- 
cb at df7cb.de | http://www.df7cb.de/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/autopkgtest-devel/attachments/20121224/b8233be0/attachment.pgp>


More information about the autopkgtest-devel mailing list