From: Panu Matilainen Date: Mon, 13 Jun 2011 08:52:54 +0000 (+0300) Subject: Don't remove buildroot docdir on %doc usage (ticket #836) X-Git-Tag: tznext/4.11.0.1.tizen20130304~1009 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2f6bfc99d01df941f6aaad8497150f82eeb75311;p=tools%2Flibrpm-tizen.git 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. --- 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);