SHA256
3
0
forked from pool/rpm
rpm/defclean.diff
OBS User autobuild ebdf1dffe6 Accepting request 19899 from Base:System
Copy from Base:System/rpm based on submit request 19899 from user mlschroe

OBS-URL: https://build.opensuse.org/request/show/19899
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=87
2009-09-04 22:20:13 +00:00

19 lines
592 B
Diff

Index: build/parseSpec.c
===================================================================
--- build/parseSpec.c.orig
+++ build/parseSpec.c
@@ -569,6 +569,13 @@ int parseSpec(rpmts ts, const char *spec
}
/* LCL: parsePart is modified @*/
+ if (spec->clean == NULL) {
+ char *body = rpmExpand("%{?buildroot: %{__rm} -rf %{buildroot}}", NULL);
+ spec->clean = newStringBuf();
+ appendLineStringBuf(spec->clean, body);
+ free(body);
+ }
+
/* Check for description in each package and add arch and os */
{
char *platform = rpmExpand("%{_target_platform}", NULL);