diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2010-09-02 11:19:46 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2010-09-02 11:19:46 +0300 |
commit | fb81dee4c622298377e78270b839445df0144a73 (patch) | |
tree | b69797f835127b6e283cdfdeaef09f1e8b43f76d | |
parent | 3c7d4f89bb68d68b9d775fc6623c3f1c342ac0bd (diff) | |
download | librpm-tizen-fb81dee4c622298377e78270b839445df0144a73.tar.gz librpm-tizen-fb81dee4c622298377e78270b839445df0144a73.tar.bz2 librpm-tizen-fb81dee4c622298377e78270b839445df0144a73.zip |
Eliminate freeNames() from librpmbuild ABI
- Call freeNames() at end of buildSpec() instead of requiring API
users to clean up after us. This does mean losing some of the
supposed caching advantage when building on more than one spec,
but hardly matters, one spec at a time is the typical build usage
anyway.
-rw-r--r-- | build/build.c | 2 | ||||
-rw-r--r-- | build/rpmbuild_misc.h | 3 | ||||
-rw-r--r-- | rpmbuild.c | 2 |
3 files changed, 3 insertions, 4 deletions
diff --git a/build/build.c b/build/build.c index cab152bd1..cdc44a5de 100644 --- a/build/build.c +++ b/build/build.c @@ -11,6 +11,7 @@ #include <rpm/rpmlog.h> #include <rpm/rpmfileutil.h> #include "build/rpmbuild_internal.h" +#include "build/rpmbuild_misc.h" #include "debug.h" @@ -295,6 +296,7 @@ exit: rpmlog(RPMLOG_NOTICE, _("\n\nRPM build errors:\n")); rpmlogPrint(NULL); } + freeNames(); return rc; } diff --git a/build/rpmbuild_misc.h b/build/rpmbuild_misc.h index dae216aa4..0d2dcd255 100644 --- a/build/rpmbuild_misc.h +++ b/build/rpmbuild_misc.h @@ -7,9 +7,8 @@ /** \ingroup rpmbuild * Destroy uid/gid caches. - * @todo Get this out of the ABI */ -/* RPM_GNUC_INTERNAL XXX should be internal too but rpmbuild "needs" for now */ +RPM_GNUC_INTERNAL void freeNames(void); /** \ingroup rpmbuild diff --git a/rpmbuild.c b/rpmbuild.c index 912c4b7d5..6f06b51f4 100644 --- a/rpmbuild.c +++ b/rpmbuild.c @@ -14,7 +14,6 @@ const char *__progname; #include <rpm/rpmps.h> #include <rpm/rpmts.h> #include "lib/signature.h" -#include "build/rpmbuild_misc.h" /* XXX freeNames() */ #include "cliutils.h" #include "debug.h" @@ -474,7 +473,6 @@ int main(int argc, char *argv[]) ts = rpmtsFree(ts); finishPipe(); - freeNames(); ba->buildRootOverride = _free(ba->buildRootOverride); ba->targets = _free(ba->targets); |