[mythtv] Best way to use SVN version for deployment?

Michael T. Dean mtdean at thirdcontact.com
Fri May 25 21:19:27 UTC 2007

On 05/25/2007 04:52 PM, aaron wrote:
> On 25/05/07, Michael T. Dean <mtdean at thirdcontact.com> wrote:
>> Also, I don't trust cp for recursive copies of source directories.
>> cpio, yes.  tar, yes.  cp, no.
> Why's that?  (getting off topic...)
> I don't think I've ever had problems using cp -R to copy source
> directories... takes a long time to complete, perhaps, but I don't
> think I've ever had any problems...

A lot of reasons--from permissions to symbolic and hard link handling
and portability (some options to work around some of the issues are only
available on some platforms). There are lots of discussions of the
issues out on the web.  Search on "tar cp cpio" and then dig through all
the irrelevant garbage to find the interesting parts.  :)

Basically, if you're using cp -R or cp -r, there's a good chance that
eventually, it will mess up your working copy--often in such a way that
an update "fails" silently.  Then you're getting told to rm -r your
MythWeb directory or your mythplugins or ... and check out a new one
because your update didn't do what it should have.  ;)

Of course, when you have files larger than 2GiB, you can't use tar/cpio
(because--except for "broken" versions that ignore the
specification--they cannot have large file support).  Therefore, cpio
becomes my favorite.  I can use a "find" with appropriate arguments to
prune any >= 2GiB files and "-print0" the rest and pipe it to cpio
-dpmv0.  Then I can use the same find without the -prune and -print0 and
instead "-exec" a cp for the large files.

True, this would mess up hard links for large files, but there are few
times when I need to copy directory structures with large files Really,
the only time I can remember ever having done that is when moving my
Myth box from a single combined frontend/backend to 2 dedicated
backends, and I know I'm not using hard links for the Myth recordings,
which are the only large files I have.  (Wow, I almost went back onto
the Myth topic.  Would be close enough if this were the -users list.)


More information about the mythtv-dev mailing list