summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortv <tv@971eb68f-4bfb-0310-8326-d2484c010a4c>2011-12-14 19:37:06 +0000
committertv <tv@971eb68f-4bfb-0310-8326-d2484c010a4c>2011-12-14 19:37:06 +0000
commitc7e5bc027ba3ca22a60f3d2e4d2ec2523122c15a (patch)
treea19208b3c9b32c3b89496ae012823199b4a7db21
parent99c9156d0ab21646fe833c1af974d70bea2f18f4 (diff)
downloadperl-RPM4-c7e5bc027ba3ca22a60f3d2e4d2ec2523122c15a.tar
perl-RPM4-c7e5bc027ba3ca22a60f3d2e4d2ec2523122c15a.tar.gz
perl-RPM4-c7e5bc027ba3ca22a60f3d2e4d2ec2523122c15a.tar.bz2
perl-RPM4-c7e5bc027ba3ca22a60f3d2e4d2ec2523122c15a.tar.xz
perl-RPM4-c7e5bc027ba3ca22a60f3d2e4d2ec2523122c15a.zip
(Spec_binrpm) implement it for rpm-4.9.x
git-svn-id: svn+ssh://haiku.zarb.org/home/projects/rpm4/svn/trunk@161 971eb68f-4bfb-0310-8326-d2484c010a4c
-rw-r--r--RPM4/src/RPM4.xs7
1 files changed, 6 insertions, 1 deletions
diff --git a/RPM4/src/RPM4.xs b/RPM4/src/RPM4.xs
index 88da434..bf0e8a3 100644
--- a/RPM4/src/RPM4.xs
+++ b/RPM4/src/RPM4.xs
@@ -2810,7 +2810,8 @@ Spec_binrpm(spec)
Header header;
PPCODE:
#ifdef RPM4_9_0
- croak("binrpm is no more supported with rpm 4.9; FIXME");
+ rpmSpecPkgIter iter = rpmSpecPkgIterInit(spec);
+ while ((pkg = rpmSpecSrcIterNext(iter)) != NULL) {
#else
for(pkg = spec->packages; pkg != NULL; pkg = pkg->next) {
if (pkg->fileList == NULL)
@@ -2818,7 +2819,11 @@ Spec_binrpm(spec)
#endif
/* headerCopyTags(h, pkg->header, copyTags); */
binFormat = rpmGetPath("%{_rpmfilename}", NULL);
+#ifdef RPM4_9_0
+ header = rpmSpecSourceHeader(spec);
+#else
header = pkg->header;
+#endif
binRpm = headerFormat(header, binFormat, NULL);
free(binFormat);
path = rpmGetPath("%{_rpmdir}/", binRpm, NULL);