diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2008-02-25 21:37:48 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2008-02-25 21:37:48 +0000 |
commit | a8e10ad067fbdf55f8cd4c423fd1958b6d1a243f (patch) | |
tree | 9c3d1e255bbbfd564aab519b3d5da3c4c9b362aa | |
parent | 52930d27a49b811c6aa28bbf9bd8c592497a665e (diff) | |
download | perl-URPM-a8e10ad067fbdf55f8cd4c423fd1958b6d1a243f.tar perl-URPM-a8e10ad067fbdf55f8cd4c423fd1958b6d1a243f.tar.gz perl-URPM-a8e10ad067fbdf55f8cd4c423fd1958b6d1a243f.tar.bz2 perl-URPM-a8e10ad067fbdf55f8cd4c423fd1958b6d1a243f.tar.xz perl-URPM-a8e10ad067fbdf55f8cd4c423fd1958b6d1a243f.zip |
make ->filename work (again) on header
-rw-r--r-- | URPM.xs | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -2015,6 +2015,12 @@ Pkg_filename(pkg) memcpy(eon, savbuf, 4); } } else if (pkg->h) { + char *name = get_name(pkg->h, RPMTAG_NAME); + char *version = get_name(pkg->h, RPMTAG_VERSION); + char *release = get_name(pkg->h, RPMTAG_RELEASE); + char *arch = headerIsEntry(pkg->h, RPMTAG_SOURCERPM) ? get_name(pkg->h, RPMTAG_ARCH) : "src"; + + XPUSHs(sv_2mortal(newSVpvf("%s-%s-%s.%s.rpm", name, version, release, arch))); } # deprecated |