[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: dh_movefiles, tar vs. mv



Re: Daniel Burrows in <200502251314.09459.dburrows@debian.org>
>   I'd imagine that it doesn't use mv for the same reason "install" doesn't; 
> ie, its purpose is to COPY files, not MOVE them.

As I understood it, the question was about moving stuff from
debian/tmp to debian/package. The stuff in debian/tmp should get
removed by the clean target anyway, so it doesn't hurt to move instead
of copying it.

>   Anyway, I thought you were joking in your first message, but it looks like 
> you're serious, so I'll answer this time.  If you're copying between files on 
> the same device, mv will use the rename(2) system call, which is an atomic 
> operation: ie, it doesn't "copy" the source files at all, it just links them 
> into the target directory.  If you're copying between devices, mv will 
> presumably copy the whole file before deleting it -- to actually remove a 
> file "block-by-block" would mean a whole lot of totally pointless extra work 
> in order to make the program less robust (there's no direct way to delete the 
> first block of a file, so you'd have to either copy from the back or shift 
> the whole file back a block at a time and then truncate it).

I doubt that any subdirs of a package build directory will ever be on
a different mount point than the directory itself ;-)

Christoph
-- 
cb@df7cb.de | http://www.df7cb.de/

Attachment: signature.asc
Description: Digital signature


Reply to: