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

Re: %clean in rpm-4.4.7+



In regard to: Re: %clean in rpm-4.4.7+, Jeff Johnson said (at 6:14pm on May...:

%__spec_clean_body test -d '%{buildsubdir}' && %{__rm} -rf '%{buildsubdir}'\
%{nil}

accomplish all of what I'm after?  Is it "safe" to use %{buildsubdir}
in %__spec_clean_body -- will it be filled in?  Also, are these macros
only executed on a successful rpmbuild?


Should, but untested.

Note that %buildsubdir is not known until %setup executes (not parsed)
that's the flaw in buildsubdir, undefined for most of a spec file parse.

AFAIK, %buildsubdir is well defined, but possibly
with odd default value if no, or multiple, %setup was present.

Good point, didn't think of that.

I could just try it, but the possibility for havok after an errant rm -rf
has me hesitating.


So add an echo and look a bit.

:-)  I was looking for an ironclad guarantee!

I'll do some minimal testing and report back if I encounter any gotchas.

Tim
--
Tim Mooney                              mooney dogbert cc ndsu NoDak edu
Information Technology Services         (701) 231-1076 (Voice)
Room 242-J6, IACC Building              (701) 231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164


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