RPM Package Manager, CVS Repository http://rpm5.org/cvs/ ____________________________________________________________________________
Server: rpm5.org Name: Ralf S. Engelschall Root: /v/rpm/cvs Email: [EMAIL PROTECTED] Module: rpm Date: 17-Jul-2007 08:38:19 Branch: HEAD Handle: 2007071707381801 Modified files: rpm CHANGES rpm/build files.c parsePrep.c Log: Consistently use %{__mkdir_p} macro instead of its pre-defined value @MKDIR_P@ to allow overriding (good reasons) and to especially prepare the cleanup of the MKDIR_P Autoconf variable, which uses a totally broken fallback value (real reason). Summary: Revision Changes Path 1.1481 +1 -0 rpm/CHANGES 1.253 +7 -1 rpm/build/files.c 2.80 +7 -2 rpm/build/parsePrep.c ____________________________________________________________________________ patch -p0 <<'@@ .' Index: rpm/CHANGES ============================================================================ $ cvs diff -u -r1.1480 -r1.1481 CHANGES --- rpm/CHANGES 16 Jul 2007 15:43:55 -0000 1.1480 +++ rpm/CHANGES 17 Jul 2007 06:38:18 -0000 1.1481 @@ -1,4 +1,5 @@ 4.5 -> 5.0: + - rse: consistently use %{__mkdir_p} macro instead of its pre-defined value @MKDIR_P@ to allow overriding - mgh: Update configure.ac to use target instead of host values for configuration - rse: fix build environment to correctly support building RPM from outside its source tree - rse: remove RH-specific "_vsflags_up2date" macro, use "_vsflags" in Python bindings instead @@ . patch -p0 <<'@@ .' Index: rpm/build/files.c ============================================================================ $ cvs diff -u -r1.252 -r1.253 files.c --- rpm/build/files.c 16 Jul 2007 07:21:15 -0000 1.252 +++ rpm/build/files.c 17 Jul 2007 06:38:19 -0000 1.253 @@ -1036,13 +1036,19 @@ if (! fl->passedSpecialDoc) { char *compress_doc; + char *mkdir_p; pkg->specialDoc = newStringBuf(); appendStringBuf(pkg->specialDoc, "DOCDIR=\"$RPM_BUILD_ROOT\""); appendLineStringBuf(pkg->specialDoc, buf); appendLineStringBuf(pkg->specialDoc, "export DOCDIR"); appendLineStringBuf(pkg->specialDoc, "rm -rf \"$DOCDIR\""); - appendLineStringBuf(pkg->specialDoc, MKDIR_P " \"$DOCDIR\""); + mkdir_p = rpmExpand("%{?__mkdir_p}%{!?__mkdir_p:mkdir -p}", NULL); + if (!mkdir_p) + mkdir_p = xstrdup("mkdir -p"); + appendStringBuf(pkg->specialDoc, mkdir_p); + mkdir_p = _free(mkdir_p); + appendLineStringBuf(pkg->specialDoc, " \"$DOCDIR\""); compress_doc = rpmExpand("%{__compress_doc}", NULL); if (compress_doc && *compress_doc != '%') @@ . patch -p0 <<'@@ .' Index: rpm/build/parsePrep.c ============================================================================ $ cvs diff -u -r2.79 -r2.80 parsePrep.c --- rpm/build/parsePrep.c 16 Jul 2007 00:15:20 -0000 2.79 +++ rpm/build/parsePrep.c 17 Jul 2007 06:38:19 -0000 2.80 @@ -285,8 +285,13 @@ /* if necessary, create and cd into the proper dir */ if (createDir) { - sprintf(buf, MKDIR_P " '%s'\ncd '%s'", - spec->buildSubdir, spec->buildSubdir); + char *mkdir_p; + mkdir_p = rpmExpand("%{?__mkdir_p}%{!?__mkdir_p:mkdir -p}", NULL); + if (!mkdir_p) + mkdir_p = xstrdup("mkdir -p"); + sprintf(buf, "%s '%s'\ncd '%s'", + mkdir_p, spec->buildSubdir, spec->buildSubdir); + mkdir_p = _free(mkdir_p); appendLineStringBuf(spec->prep, buf); } @@ . ______________________________________________________________________ RPM Package Manager http://rpm5.org CVS Sources Repository rpm-cvs@rpm5.org