aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2011-09-09 17:45:06 +0000
committerThierry Vignaud <tv@mageia.org>2011-09-09 17:45:06 +0000
commit49d3300754b9cb2f575e6b7e59f6430ef28e5dfa (patch)
tree67e1090bb31a5c5f5c7f390a65291f4a68a25ccf
parent9b3a27eb7eeb6966165e24b54f9dc932f75c8555 (diff)
downloadperl-URPM-49d3300754b9cb2f575e6b7e59f6430ef28e5dfa.tar
perl-URPM-49d3300754b9cb2f575e6b7e59f6430ef28e5dfa.tar.gz
perl-URPM-49d3300754b9cb2f575e6b7e59f6430ef28e5dfa.tar.bz2
perl-URPM-49d3300754b9cb2f575e6b7e59f6430ef28e5dfa.tar.xz
perl-URPM-49d3300754b9cb2f575e6b7e59f6430ef28e5dfa.zip
(spec2srcheader) fix it for rpm-4.9.x
-rw-r--r--NEWS2
-rw-r--r--URPM.xs5
2 files changed, 6 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index f8219f9..5fce511 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,5 @@
+- fix spec2srcheader() for rpm-4.9.x
+
Version 3.38.1 - 16 November 2010
- fix crashing while removing several packages (#248)
diff --git a/URPM.xs b/URPM.xs
index 4ef9e76..fda00d6 100644
--- a/URPM.xs
+++ b/URPM.xs
@@ -3873,8 +3873,11 @@ Urpm_spec2srcheader(specfile)
/* parseSpec() sets RPMTAG_ARCH to %{_target_cpu} whereas we really a header similar to .src.rpm header */
headerMod(header, &td);
}
-
+#ifdef RPM490
+ pkg->h = headerLink(header);
+#else
pkg->h = headerLink(spec->sourceHeader);
+#endif
sv_pkg = sv_newmortal();
sv_setref_pv(sv_pkg, "URPM::Package", (void*)pkg);
XPUSHs(sv_pkg);