From 2f6bfc99d01df941f6aaad8497150f82eeb75311 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Mon, 13 Jun 2011 11:52:54 +0300 Subject: [PATCH] Don't remove buildroot docdir on %doc usage (ticket #836) - Some software installs its own documentation and if you try to combine it with %doc, rpmbuild will abort with mysterious "cpio bad magic" or such errors because what was assumed to be there was not, as %doc would 'rm -rf' the docdir upon first invocation. I don't see any good reason to disallow sharing the same directory for %doc and documentation installed by software "make install" - the other alternative would be forcing %doc to go to some other location, only making docs harder to find. - Also at least Mageia (and prior to that Mandriva) has been doing this for quite some time now. --- build/files.c | 1 - 1 file changed, 1 deletion(-) diff --git a/build/files.c b/build/files.c index c034834..fe16843 100644 --- a/build/files.c +++ b/build/files.c @@ -940,7 +940,6 @@ static rpmRC parseForSimple(rpmSpec spec, Package pkg, char * buf, appendStringBuf(pkg->specialDoc, "DOCDIR=$RPM_BUILD_ROOT"); appendLineStringBuf(pkg->specialDoc, pkg->specialDocDir); appendLineStringBuf(pkg->specialDoc, "export DOCDIR"); - appendLineStringBuf(pkg->specialDoc, "rm -rf $DOCDIR"); appendLineStringBuf(pkg->specialDoc, mkdocdir); free(mkdocdir); -- 2.7.4