aboutsummaryrefslogtreecommitdiffstats
path: root/URPM.xs
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2006-01-25 14:18:48 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2006-01-25 14:18:48 +0000
commit42b0b0546ecc2d2de7370e369aca39bb67241fdb (patch)
treead8da00c18d54ec943bc8919b1b0479df8c5ba9b /URPM.xs
parentb147b9f498da0e223df044c960ee9421fdaf5d11 (diff)
downloadperl-URPM-42b0b0546ecc2d2de7370e369aca39bb67241fdb.tar
perl-URPM-42b0b0546ecc2d2de7370e369aca39bb67241fdb.tar.gz
perl-URPM-42b0b0546ecc2d2de7370e369aca39bb67241fdb.tar.bz2
perl-URPM-42b0b0546ecc2d2de7370e369aca39bb67241fdb.tar.xz
perl-URPM-42b0b0546ecc2d2de7370e369aca39bb67241fdb.zip
Flag headers returned by spec2srcheader() as source packages
Diffstat (limited to 'URPM.xs')
-rw-r--r--URPM.xs2
1 files changed, 2 insertions, 0 deletions
diff --git a/URPM.xs b/URPM.xs
index 0391ec2..2c40f2f 100644
--- a/URPM.xs
+++ b/URPM.xs
@@ -3659,12 +3659,14 @@ Urpm_spec2srcheader(specfile)
/* Do not verify whether sources exist */
#define SPEC_FORCE 1
if (!parseSpec(ts, specfile, "/", NULL, 0, NULL, NULL, SPEC_ANYARCH, SPEC_FORCE)) {
+ int_32 one = 1;
SV *sv_pkg;
spec = rpmtsSetSpec(ts, NULL);
if (! spec->sourceHeader)
initSourceHeader(spec);
pkg = (URPM__Package)malloc(sizeof(struct s_Package));
memset(pkg, 0, sizeof(struct s_Package));
+ headerAddEntry(spec->sourceHeader, RPMTAG_SOURCEPACKAGE, RPM_INT32_TYPE, &one, 1);
pkg->h = headerLink(spec->sourceHeader);
sv_pkg = sv_newmortal();
sv_setref_pv(sv_pkg, "URPM::Package", (void*)pkg);