diff --git a/fdupes.changes b/fdupes.changes index 989946d..765ecba 100644 --- a/fdupes.changes +++ b/fdupes.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Thu Sep 6 18:41:37 CEST 2007 - mls@suse.de + +- do not hardlink empty files in %fdupes macro + +------------------------------------------------------------------- +Wed Sep 5 15:44:52 CEST 2007 - nadvornik@suse.cz + +- support filenames with spaces in %fdupes macro [#307727] + ------------------------------------------------------------------- Tue May 15 22:53:03 CEST 2007 - coolo@suse.de diff --git a/fdupes.spec b/fdupes.spec index 8a1f92e..93762b4 100644 --- a/fdupes.spec +++ b/fdupes.spec @@ -15,7 +15,7 @@ URL: http://premium.caribe.net/~adrian2/fdupes.html Group: Productivity/Archiving/Compression Summary: Identifying or deleting duplicate files Version: 1.40 -Release: 19 +Release: 42 License: X11/MIT Source0: %name-%{version}.tar.bz2 Source1: macros.fdupes @@ -55,6 +55,10 @@ rm -rf $RPM_BUILD_ROOT /etc/rpm %changelog +* Thu Sep 06 2007 - mls@suse.de +- do not hardlink empty files in %%fdupes macro +* Wed Sep 05 2007 - nadvornik@suse.cz +- support filenames with spaces in %%fdupes macro [#307727] * Tue May 15 2007 - coolo@suse.de - add an RPM macro to make use of it in spec files * Thu Nov 16 2006 - dmueller@suse.de diff --git a/macros.fdupes b/macros.fdupes index 0b5a4e7..9e23377 100644 --- a/macros.fdupes +++ b/macros.fdupes @@ -1,16 +1,23 @@ %fdupes(s) \ - symlinks=0; \ - %{-s:symlinks=1;} \ - fdupes -q -r -1 %1 | \ - while read target rest; do \ - for f in $rest; do \ - if test "$symlinks" = 1; then \ - ln -sf "${target/$RPM_BUILD_ROOT/}" "$f"; \ + _target=""; \ + _symlinks=0; \ + %{-s:_symlinks=1;} \ + fdupes -q -n -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#%{buildroot}}" "$_file"; \ else \ - ln -f "$target" "$f"; \ + ln -f "$_target" "$_file"; \ fi ;\ - done ;\ -done \ + fi ; \ + done \ %{nil}