summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortv <tv@971eb68f-4bfb-0310-8326-d2484c010a4c>2012-06-25 18:27:22 +0000
committertv <tv@971eb68f-4bfb-0310-8326-d2484c010a4c>2012-06-25 18:27:22 +0000
commitc6d059895a3acefbf30a5d5a1e8f61c29dc74f15 (patch)
treee5d028e013349b0d3dbb47b4f30ba90bd58d9b0c
parent7b8443f6b85346ba4088a16db4056eea440c38cb (diff)
downloadperl-RPM4-c6d059895a3acefbf30a5d5a1e8f61c29dc74f15.tar
perl-RPM4-c6d059895a3acefbf30a5d5a1e8f61c29dc74f15.tar.gz
perl-RPM4-c6d059895a3acefbf30a5d5a1e8f61c29dc74f15.tar.bz2
perl-RPM4-c6d059895a3acefbf30a5d5a1e8f61c29dc74f15.tar.xz
perl-RPM4-c6d059895a3acefbf30a5d5a1e8f61c29dc74f15.zip
(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
-rw-r--r--RPM4/NEWS3
-rw-r--r--RPM4/src/RPM4.xs7
2 files changed, 9 insertions, 1 deletions
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);