rpm/defclean.diff
OBS User autobuild bd93352974 Accepting request 36638 from Base:System
Copy from Base:System/rpm based on submit request 36638 from user oertel

OBS-URL: https://build.opensuse.org/request/show/36638
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=95
2010-04-01 16:15:26 +00:00

17 lines
550 B
Diff

--- ./build/parseSpec.c.orig 2010-03-25 15:19:16.000000000 +0000
+++ ./build/parseSpec.c 2010-03-25 15:45:25.000000000 +0000
@@ -562,6 +562,13 @@ int parseSpec(rpmts ts, const char *spec
free(body);
}
+ 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);