quilt-dev
[Top][All Lists]
Advanced

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

Re: [Quilt-dev] Another shell re-write of backup-files.


From: Jean Delvare
Subject: Re: [Quilt-dev] Another shell re-write of backup-files.
Date: Sat, 19 Mar 2011 11:42:05 +0100
User-agent: KMail/1.12.4 (Linux/2.6.32.29-0.3-pae; KDE/4.3.5; i686; ; )

On Friday 18 March 2011 09:58:11 pm Kaz Kylheku wrote:
> On Fri, 18 Mar 2011 21:27:00 +0100, Jean Delvare <address@hidden>
> >> Breaking hard links is done easily using an in-place sed (sed -i):
> >>
> >>   find "$opt_prefix" -type f -links +1 | xargs sed -i -s ''
> >
> > Except that it doesn't do what you want. What the script must do
> > when passed -L alone is to break links on _original_ files, not
> > _backed up_ files.
> 
> Ah yes, because we would like the restored files
> in the tree to have a new modification time.
> A restored file must be newer so that that its dependent
> objects are rebuilt by a timestamp-based build
> system such as Make.

No, the problem is completely different. What we want is that files with 
hard links before backup still have these hard links after restore.

The timestamp issue exists, but has nothing to do with links.

> That's how I had it coded at first, argh. Then, in a fit of
>  silliness, I "simplified" it, forgetting about the time stamp.
> 
>   ( cd "$opt_prefix" ; find . -type f -links +1 ) | xargs sed -i s ''

Better, but still wrong: what matters is the link count of _source_ 
files, not backed up files. And it isn't always the same.

I told you that backup-files semantics weren't trivial, didn't I?

-- 
Jean Delvare
Suse L3



reply via email to

[Prev in Thread] Current Thread [Next in Thread]