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

jam at tigger.ws jam at tigger.ws
Mon May 28 01:12:58 UTC 2007


On Monday 28 May 2007 00:00, mythtv-dev-request at mythtv.org wrote:
> > On 25/05/07, Michael T. Dean <mtdean at thirdcontact.com> wrote:
> >> On 05/25/2007 04:52 PM, aaron wrote:
> >>> Why's that?  (getting off topic...)
> >>
> >> A lot of reasons--from permissions to symbolic and hard link handling
> >
> > <.. snip lots of good stuff ..>
> >
> > Hm. I guess I've been lucky all these years... or I just haven't
> > copied source directories as often as I thought I had. :)
>
> Your 'luck' will hold out for the foreseeable future. I always
> use "cp -rp". There are no hard links or symlinks in the source
> tree or as a result of compiling and you shouldn't be deleting
> directories and reusing the inode to create a plain file while
> the copy is in progress ;-). "cp" has correctly copied files on
> UNIX based systems for about forty years as one of the most basic
> commands. If cp should ever fail, it is a clear indication that
> there is something seriously wrong with the system.
>
> The key for source dirs is to be sure to use "p":
>
>   -p     same as --preserve=mode,ownership,timestamps
>
>   --preserve[=ATTR_LIST]
>          preserve   the   specified   attributes   (default:  mode,owner-
>          ship,timestamps), if possible additional attributes: links, all
>
> for the timestamps to be preserved so that "make" can determine
> what does or doesn't need to be recompiled. I normally checkout
> a clean copy from svn and compile. Next,
>
> $ mkdir foo
> $ cd foo
> $ cp -rp ../mythtv/ .
> $ cd mythtv
> $ patch -p0 < ../../somethingbrilliant.diff
> $ make && make install
>
> I have a different tree for each thing I work on and only need
> to recompile for the files that change in that diff or files I
> edit.

I second that. Unix has just worked for 37 years <big grin>
cp -a bla just works
man cp says -a is equivalent to -dpPR

James


More information about the mythtv-dev mailing list