[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: using rm without -f



Ralf Corsepius wrote:
On Mon, 2006-03-20 at 15:03 -0700, Orion Poplawski wrote:
Ralf Corsepius wrote:
On Sun, 2006-03-19 at 18:40 -0500, Paul F. Johnson wrote:

Index: libopts.spec
 make DESTDIR=${RPM_BUILD_ROOT} install
 rm -f ${RPM_BUILD_ROOT}%{_libdir}/lib*.la
 rm -f ${RPM_BUILD_ROOT}%{_infodir}/libopts.txt*
-rm -rf ${RPM_BUILD_ROOT}%{_infordir}/dir
+rm -rf ${RPM_BUILD_ROOT}%{_infodir}/dir
rm -f ${RPM_BUILD_ROOT}%{_infodir}/dir

rm ${RPM_BUILD_ROOT}%{_infodir}/dir
If you think this is a clever idea - I prefer to call this unsafe and
error-prone.


I think dropping the -f leads towards reproducible builds and less cruft in specs. If upstream/buildsys changes in a way that what you are removing disappears, your rm will stay there forever.

Obviously, this is a completely trivial item, but it seems like avoiding error suppression is a Good Thing (tm).

--
Orion Poplawski
System Administrator                   303-415-9701 x222
Colorado Research Associates/NWRA      FAX: 303-415-9702
3380 Mitchell Lane, Boulder CO 80301   http://www.co-ra.com


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]