[buildd-tools-devel] Bug#657715: Bug#657715: copyfiles should create non-existent target directories

Roger Leigh rleigh at codelibre.net
Sat Jan 28 10:36:41 UTC 2012


On Sat, Jan 28, 2012 at 11:13:10AM +0100, Marc Haber wrote:
> when copying a file from a non-standard directory via the copyfiles
> mechanism, this does not work:
> 
> $ schroot --begin-session --chroot=squeeze_build64 --session=build
> E: 20copyfiles: cp: cannot create regular file `/var/lib/schroot/mount/build/etc/apt/apt.keys.input/zg20110.debian.zugschlus.de': No such file or directory
> E: build: Chroot setup failed: stage=setup-start
> 
> Manually creating /var/lib/schroot/mount/build/etc/apt/apt.keys.input
> inside the chroot fixes this issue.
> 
> The copyfiles mechanism should create target directories, if necessary.

This would make sense.  Would a "mkdir -p" be sufficient, or should we
take steps to preserve the ownership and perms of every directory in
the path in the chroot?

> Btw, just giving the directory /etc/apt/apt.keys.input in a copyfiles
> file, this causes the directory with its entire contents to be copied
> to the target. I am not sure whether this is the intended behavior. If
> so, it should be documented, and copyfiles is kind of a misnomer for
> this feature.

Non-regular files get copied with "cp -a", so this is intended.  I'll
add it to the documentation.


Regards,
Roger

-- 
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux             http://people.debian.org/~rleigh/
 `. `'   Printing on GNU/Linux?       http://gutenprint.sourceforge.net/
   `-    GPG Public Key: 0x25BFB848   Please GPG sign your mail.





More information about the Buildd-tools-devel mailing list