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

Re: dh_movefiles, tar vs. mv

* Frank Küster (frank@debian.org) wrote:
> Eric Dorland <eric@debian.org> schrieb:
> > * Frank Küster (frank@debian.org) wrote:
> >> Hi,
> >> 
> >> dh_movefiles internally uses tar to move file contents. I'm not sure why
> >> it doesn't use mv, is it because mv moves the file block-by-block and
> >> thus starts removing parts of the file before it is completely written,
> >> and hence is less save?
> >> 
> >> Anyway: If I am only going to move complete subdirectories from the temp
> >> tree to the package trees, is it in this case safe to use mv? It's much
> >> faster, and it would safe space (because dh_movefiles only removes the
> >> originals after the complete tarball has been extracted).
> >
> > Uhh, who cares? dh_movefiles has been superseded by dh_install. 
> Well, fine. But the question remains: dh_install uses cp, not mv.  What
> is the problem with using mv?  And would it be safe to use mv if I only
> move complete directories?

Well one reason is sometimes (in multipackage builds) you want to have
the same file in 2 different packages. Also, the less side-effects
during build time the better for debugging. Eg since dh_install is
idempotent I can run my install target multiple times it will
work. That won't work with dh_movefiles.

OTOH if you have a massively big package, dh_install would be painful,
especially on some of the buildds. 

Eric Dorland <eric.dorland@mail.mcgill.ca>
ICQ: #61138586, Jabber: hooty@jabber.com
1024D/16D970C6 097C 4861 9934 27A0 8E1C  2B0A 61E9 8ECF 16D9 70C6

Version: 3.12
GCS d- s++: a-- C+++ UL+++ P++ L++ E++ W++ N+ o K- w+ 
O? M++ V-- PS+ PE Y+ PGP++ t++ 5++ X+ R tv++ b+++ DI+ D+ 
G e h! r- y+ 

Attachment: signature.asc
Description: Digital signature

Reply to: