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

modifying %clean



Greetings,

I'd like to modify the %clean script, so that it automagically generates
the list of files that were installed under $RPM_BUILD_ROOT, before
erasing them. That way I could check afterwards that they all were
catched by the %files sections.

I tried to add the following line to my specs :
%clean
(mkdir -p %{_topdir}/LOGS ; cd $RPM_BUILD_ROOT ; find . \
      | sed -e 's,^\.,,' >> %{_topdir}/LOGS/%{name}.log)

And it worked fine, creating a new directory if it ever doesn't exist,
and adding a log file containing the list of all the items under (/).

But what I'd like actually, is having it by default, without having to
manually add this line to the spec file. How could I modify the %clean
script (plateform based), I didn't find anything under /usr/lib/rpm/, or
(even better) how could I override the default %clean through my
.rpmmacros file ?

Thanks in advance,
--
Guillaume Assire

"640 kB ought to be enough for everyone" -- Bill Gates, 1981
"This 508 kB kernel size should be enough" -- Linus Torvalds, 1991







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