From c6d059895a3acefbf30a5d5a1e8f61c29dc74f15 Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 25 Jun 2012 18:27:22 +0000 Subject: (newspec) fix forcing 'noarch_check' & 'force' parameters (RPMSPEC_ANYARCH, RPMSPEC_FORCE) git-svn-id: svn+ssh://haiku.zarb.org/home/projects/rpm4/svn/trunk@214 971eb68f-4bfb-0310-8326-d2484c010a4c --- RPM4/NEWS | 3 +++ RPM4/src/RPM4.xs | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'RPM4') diff --git a/RPM4/NEWS b/RPM4/NEWS index c363a58..2c264ca 100644 --- a/RPM4/NEWS +++ b/RPM4/NEWS @@ -1,3 +1,6 @@ +- new spec: + o fix forcing 'noarch_check' & 'force' parameters + Version 0.30 - 15 June 2012 - functions that not are implemented since switching to rpm-4.6 now die diff --git a/RPM4/src/RPM4.xs b/RPM4/src/RPM4.xs index 57f45ce..869cb91 100644 --- a/RPM4/src/RPM4.xs +++ b/RPM4/src/RPM4.xs @@ -428,7 +428,12 @@ void _newspec(rpmts ts, char * filename, SV * svpassphrase, SV * svrootdir, SV * if (filename) { #ifdef RPM4_9_0 - spec = rpmSpecParse(filename, RPMSPEC_ANYARCH|RPMSPEC_FORCE, NULL); + rpmSpecFlags flags = 0; + if (anyarch) + flags |= RPMSPEC_ANYARCH; + if (force) + flags |= RPMSPEC_FORCE; + spec = rpmSpecParse(filename, flags, NULL); #else if (!parseSpec(ts, filename, rootdir, NULL ,0, passphrase, cookies, anyarch, force)) spec = rpmtsSetSpec(ts, NULL); -- cgit v1.2.1