forked from pool/fdupes
09c675b9c8
Just saw a false positive for rpm comparision, in this case Mesa: [ 1289s] /usr/share/man/man3/glColorTableParameter.3gl.gz 2 (none) 100444 root root 0 4294967295 [ 1289s] -/usr/share/man/man3/glColorTableParameterfv.3gl.gz 2 (none) 100444 root root 0 4294967295 [ 1289s] -/usr/share/man/man3/glColorTableParameteriv.3gl.gz 2 (none) 120777 root root 0 4294967295 glColorTableParameterfv.3gl.gz [ 1289s] +/usr/share/man/man3/glColorTableParameterfv.3gl.gz 2 (none) 120777 root root 0 4294967295 glColorTableParameteriv.3gl.gz [ 1289s] +/usr/share/man/man3/glColorTableParameteriv.3gl.gz 2 (none) 100444 root root 0 4294967295 [ 1289s] /usr/share/man/man3/glConvolutionFilter1D.3gl.gz 2 (none) 100444 root root 0 4294967295 Obviously, the parallel build changed the mtime order of the files. fdupes 1.40 had a patch from coolo to handle this (filename comparision with strcmp()) OBS-URL: https://build.opensuse.org/request/show/232080 OBS-URL: https://build.opensuse.org/package/show/utilities/fdupes?expand=0&rev=9
24 lines
457 B
Plaintext
24 lines
457 B
Plaintext
|
|
%fdupes(s) \
|
|
_target=""; \
|
|
_symlinks=0; \
|
|
%{-s:_symlinks=1;} \
|
|
fdupes -q -p -n -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#%{buildroot}}" "$_file"; \
|
|
else \
|
|
ln -f "$_target" "$_file"; \
|
|
fi ;\
|
|
fi ; \
|
|
done \
|
|
%{nil}
|
|
|