From: Panu Matilainen Date: Thu, 2 Sep 2010 11:25:30 +0000 (+0300) Subject: Add a new public function for retrieving build dependencies from spec X-Git-Tag: rpm-4.9.0-beta1~415 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bbe310aaf8c97ef3534d827f2a996c7feec7ce47;p=platform%2Fupstream%2Frpm.git Add a new public function for retrieving build dependencies from spec - Not needed by rpmbuild itself currently, but permits retrieving the build dependency information in a format that's better suited for further processing than an rpm problem set. --- diff --git a/build/rpmbuild.h b/build/rpmbuild.h index f63283b..78981a9 100644 --- a/build/rpmbuild.h +++ b/build/rpmbuild.h @@ -79,6 +79,14 @@ rpmSpec rpmSpecParse(const char *specFile, rpmSpecFlags flags, rpmps rpmSpecCheckDeps(rpmts ts, rpmSpec spec); /** \ingroup rpmbuild + * Retrieve build dependency set from spec. + * @param spec parsed spec control structure + * @param tag dependency tag + * @return dependency set of tag (or NULL) + */ +rpmds rpmSpecDS(rpmSpec spec, rpmTag tag); + +/** \ingroup rpmbuild * Build stages state machine driver. * @param buildArgs build arguments * @param spec spec file control structure diff --git a/build/spec.c b/build/spec.c index abe5a5d..1fc1554 100644 --- a/build/spec.c +++ b/build/spec.c @@ -310,6 +310,11 @@ rpmSpec rpmSpecFree(rpmSpec spec) return spec; } +rpmds rpmSpecDS(rpmSpec spec, rpmTag tag) +{ + return (spec != NULL) ? rpmdsNew(spec->buildRestrictions, tag, 0) : NULL; +} + rpmps rpmSpecCheckDeps(rpmts ts, rpmSpec spec) { rpmps probs = NULL;