aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-08-28 11:03:57 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-08-28 11:03:57 +0000
commit5c1cea473753f91a5438d0e90b3251dae3919201 (patch)
treecdc027a31c0ff7a56ed44953c84897eed7b63de7
parentaa2039f5184d198062dbb61255c18d68c7c99bfb (diff)
downloadperl-URPM-5c1cea473753f91a5438d0e90b3251dae3919201.tar
perl-URPM-5c1cea473753f91a5438d0e90b3251dae3919201.tar.gz
perl-URPM-5c1cea473753f91a5438d0e90b3251dae3919201.tar.bz2
perl-URPM-5c1cea473753f91a5438d0e90b3251dae3919201.tar.xz
perl-URPM-5c1cea473753f91a5438d0e90b3251dae3919201.zip
- spec2srcheader: workaround parseSpec returning a header where ->arch is set
to %{_target_cpu} whereas we really want a header similar to .src.rpm (see #32824)
-rw-r--r--NEWS3
-rw-r--r--URPM.xs4
2 files changed, 7 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index bc62bac..dd48390 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,9 @@
- allow running transaction with justdb option
- fix split_length > 1
(eg: "urpmi --split-length 2 a b c" will only install 2 pkgs)
+- spec2srcheader: workaround parseSpec returning a header where ->arch is set
+ to %{_target_cpu} whereas we really want a header similar to .src.rpm
+ (see #32824)
Version 1.75 - 12 August 2007, by Pascal "Pixel" Rigaux
diff --git a/URPM.xs b/URPM.xs
index 5b7eec3..622f075 100644
--- a/URPM.xs
+++ b/URPM.xs
@@ -3883,6 +3883,10 @@ Urpm_spec2srcheader(specfile)
pkg = (URPM__Package)malloc(sizeof(struct s_Package));
memset(pkg, 0, sizeof(struct s_Package));
headerAddEntry(spec->sourceHeader, RPMTAG_SOURCERPM, RPM_INT32_TYPE, &zero, 1);
+
+ /* parseSpec() sets RPMTAG_ARCH to %{_target_cpu} whereas we really a header similar to .src.rpm header */
+ headerModifyEntry(spec->sourceHeader, RPMTAG_ARCH, RPM_STRING_TYPE, "src", 1);
+
pkg->h = headerLink(spec->sourceHeader);
sv_pkg = sv_newmortal();
sv_setref_pv(sv_pkg, "URPM::Package", (void*)pkg);