On Mar 23, 2011, at 4:51 PM, Jeff Johnson wrote: > This is a reversion from what was intended and already implemented > almost 4 years ago. > > Under #ifdef RPM_VENDOR_MANDRIVA please. >
Since your first question is likely: OK where is it? The murky path to automated (and configurable) %clean starts in build/parseBuildInstallClean.c: } else if (parsePart == PART_CLEAN) { const char * s = rpmExpand("%{?__spec_clean_body}%{!?__spec_clean_body:%{?buildroot:rm -rf '%{buildroot}'\n}}\n", NULL); if (s && *s) *iobp = rpmiobAppend(*iobp, s, 0); s = _free(s); #if !defined(RPM_VENDOR_OPENPKG) /* still-support-section-clean */ /* OpenPKG still wishes to use "%clean" script/section */ iobp = NULL; /* XXX skip %clean from spec file. */ #endif } Define %__spec_clean_body instead, don't bother messing with the parser state machine using PART_CLEAN (the spcfile parser is mostly crap anyways: PART_FOO linearizes the parser states and not a whole lot more that is useful or savable). hth 73 de Jeff ______________________________________________________________________ RPM Package Manager http://rpm5.org Developer Communication List rpm-devel@rpm5.org