On Friday 18 March 2011 09:58:11 pm Kaz Kylheku wrote: > On Fri, 18 Mar 2011 21:27:00 +0100, Jean Delvare <[email protected]> > >> 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 _______________________________________________ Quilt-dev mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/quilt-dev
