On mercredi, 5 avril 2017 18.17:52 h CEST jan matejek wrote:
on a sidenote:
On 5.4.2017 17:35, Brüns, Stefan wrote:
At least run %fdupes -s on the target directory, this will remove (symlink) the duplicates.
why do you recommend "-s" and symlinks?
The default is to create hardlinks, but apparently some people consistently use the "-s" flag. Is there a good reason for this? ISTM hardlinks are better from performance standpoint and have no downsides otherwise, unless you're fdupe'ing across mountpoints.
thanks m.
by the way -s doesn't make rpmlint happy I got a symlink but this the complain :-( So if I expand rpm --eval %fdupes on my TW I'm getting this _target=""; _symlinks=0; fdupes -q -p -n -H -o name -r %1 | while read _file; do if test -z "$_target" ; then _target="$_file"; else if test -z "$_file" ; then _target=""; continue ; fi ; if test "$_symlinks" = 1; then ln -sf "${_target#/home/bruno/rpmbuild/BUILDROOT/%{name}-%{version}-% {release}.x86_64}" "$_file"; else ln -f "$_target" "$_file"; fi ; fi ; done fdupes -q -p -n -H -o name -r /some/path/with/files give the duplicates correctly /tmp/mappyfile/__init__.pyc /tmp/mappyfile/__init__.pyo /tmp/mappyfile/ordereddict.pyc /tmp/mappyfile/ordereddict.pyo /tmp/mappyfile/tokens.pyc /tmp/mappyfile/tokens.pyo /tmp/mappyfile/utils.pyc /tmp/mappyfile/utils.pyo And the result extracted is right ls -ld __init__.py* -rw-r--r-- 1 root root 147 Apr 5 18:26 __init__.py -rw-r--r-- 2 root root 307 Apr 5 18:26 __init__.pyc -rw-r--r-- 2 root root 307 Apr 5 18:26 __init__.pyo We got the 2 links for the duplicate confirmed by stat stat __init__.py* File: __init__.py Size: 147 Blocks: 8 IO Block: 4096 regular file Device: 27h/39d Inode: 1030758 Links: 1 Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root) Access: 2017-04-05 18:26:52.287792333 +0200 Modify: 2017-04-05 18:26:52.287792333 +0200 Change: 2017-04-05 18:26:52.291792345 +0200 Birth: - File: __init__.pyc Size: 307 Blocks: 8 IO Block: 4096 regular file Device: 27h/39d Inode: 1030772 Links: 2 Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root) Access: 2017-04-05 18:28:13.052033536 +0200 Modify: 2017-04-05 18:26:52.291792345 +0200 Change: 2017-04-05 18:26:52.291792345 +0200 Birth: - File: __init__.pyo Size: 307 Blocks: 8 IO Block: 4096 regular file Device: 27h/39d Inode: 1030772 Links: 2 Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root) Access: 2017-04-05 18:28:13.052033536 +0200 Modify: 2017-04-05 18:26:52.291792345 +0200 Change: 2017-04-05 18:26:52.291792345 +0200 Birth: - So rpmlint is broken :-) -- Bruno Friedmann Ioda-Net Sàrl www.ioda-net.ch Bareos Partner, openSUSE Member, fsfe fellowship GPG KEY : D5C9B751C4653227 irc: tigerfoot -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org