SHA256
1
0
forked from pool/fdupes
OBS User unknown 2007-09-13 16:41:20 +00:00 committed by Git OBS Bridge
parent a85915a780
commit 9c3fe56e51
3 changed files with 32 additions and 11 deletions

View File

@ -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 Tue May 15 22:53:03 CEST 2007 - coolo@suse.de

View File

@ -15,7 +15,7 @@ URL: http://premium.caribe.net/~adrian2/fdupes.html
Group: Productivity/Archiving/Compression Group: Productivity/Archiving/Compression
Summary: Identifying or deleting duplicate files Summary: Identifying or deleting duplicate files
Version: 1.40 Version: 1.40
Release: 19 Release: 42
License: X11/MIT License: X11/MIT
Source0: %name-%{version}.tar.bz2 Source0: %name-%{version}.tar.bz2
Source1: macros.fdupes Source1: macros.fdupes
@ -55,6 +55,10 @@ rm -rf $RPM_BUILD_ROOT
/etc/rpm /etc/rpm
%changelog %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 * Tue May 15 2007 - coolo@suse.de
- add an RPM macro to make use of it in spec files - add an RPM macro to make use of it in spec files
* Thu Nov 16 2006 - dmueller@suse.de * Thu Nov 16 2006 - dmueller@suse.de

View File

@ -1,16 +1,23 @@
%fdupes(s) \ %fdupes(s) \
symlinks=0; \ _target=""; \
%{-s:symlinks=1;} \ _symlinks=0; \
fdupes -q -r -1 %1 | \ %{-s:_symlinks=1;} \
while read target rest; do \ fdupes -q -n -r %1 | \
for f in $rest; do \ while read _file; do \
if test "$symlinks" = 1; then \ if test -z "$_target" ; then \
ln -sf "${target/$RPM_BUILD_ROOT/}" "$f"; \ _target="$_file"; \
else \
if test -z "$_file" ; then \
_target=""; \
continue ; \
fi ; \
if test "$_symlinks" = 1; then \
ln -sf "${_target#%{buildroot}}" "$_file"; \
else \ else \
ln -f "$target" "$f"; \ ln -f "$_target" "$_file"; \
fi ;\ fi ;\
done ;\ fi ; \
done \ done \
%{nil} %{nil}