Re: [xz-devel] keep and hard links

2012-06-11 Thread Lasse Collin
On 2012-06-10 Ariel wrote:
 xz won't compress a file if it has hard links, even if --keep is 
 specified.
 
 I think this should be changed since if the file is not being deleted
 hard links don't matter.

You aren't the first one requesting this change. I'm not sure if it is
safe to change it. In theory someone could rely on the current feature
although that doesn't sound so likely.

Currently --force does what you request, but --force also makes xz
overwrite existing files, which you might not want. If overwriting
isn't an issue, then --keep --force does exactly what you want.

If --keep is modified, I think it should also allow (de)compression of
symlinks and setuid, setgid, and sticky files. This way it would match
what --force does.

I would like to hear what people think about this.

-- 
Lasse Collin  |  IRC: Larhzu @ IRCnet  Freenode



Re: [xz-devel] keep and hard links

2012-06-11 Thread Christoph Biedl
Lasse Collin wrote...

 If --keep is modified, I think it should also allow (de)compression of
 symlinks and setuid, setgid, and sticky files. This way it would match
 what --force does.
 
 I would like to hear what people think about this.

A while ago I considered asking for a few --force-* options that allow
finer control about what things are acceptable that usually are not.
Their names would be something like --force-overwrite,
--force-symlink, --force-links and so on. That would allow overriding
xz's sane defaults in certain aspects only without using --force and
doing something potientially really harmful and undesired.

Christoph