dpkg-source failed to rename file across filesystems

Bug #346577 reported by ilia
4
Affects Status Importance Assigned to Milestone
dpkg (Debian)
Fix Released
Unknown
dpkg (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: dpkg

dpkg-source uses rename() perl function which fails when target is located on another file system. For example, prevu executes it as `dpkg-source -x -sn file.dsc /var/dest/dir`. On my computer /var resides on separated file system which leads to error if file.dsc not under /var:

$ prevu libccrtp_1.7.1-2.dsc
I: Building against currently running distro: intrepid

gpg: Signature made Mon 23 Feb 2009 03:03:18 PM IST using DSA key ID 3D08B612
gpg: Can't check signature: public key not found
dpkg-source: extracting libccrtp in /var/cache/prevu/src/20157/extracted
dpkg-source: info: unpacking libccrtp_1.7.1.orig.tar.gz
dpkg-source: failure: Unable to rename /tmp/test/libccrtp_1.7.1.orig.tar.gz.tmp-extract.AXkZ7/ccrtp-1.7.1 to /var/cache/prevu/src/20157/extracted.orig: Invalid cross-device link

This particular failed rename() is in /usr/share/perl5/Dpkg/Source/Archive.pm file, but you can grep through pm modules to find out more. perlfunc(1) suggests to use File::Copy module or mv utility instead of rename function to handle move across different file systems.

I'm using dpkg 1.14.20ubuntu6 from Intrepid.

Revision history for this message
Mark Eichin (eichin-gmail) wrote :

Looks like debian fixed this for lenny in debbugs#507217 (dpkg-dev 1.14.24)

Changed in dpkg (Debian):
status: Unknown → Fix Released
Changed in dpkg (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.