From 1fe82d439b1e1cf005635e38a4b894ce552b4c39 Mon Sep 17 00:00:00 2001 From: Francois Pons Date: Fri, 8 Feb 2002 17:06:45 +0000 Subject: 4.2-2mdk --- rpmtools.spec | 6 +++++- rpmtools.xs | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/rpmtools.spec b/rpmtools.spec index 26a2ae2..9d3440a 100644 --- a/rpmtools.spec +++ b/rpmtools.spec @@ -1,5 +1,5 @@ %define name rpmtools -%define release 1mdk +%define release 2mdk # do not modify here, see Makefile in the CVS %define version 4.2 @@ -54,6 +54,10 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/perl5/man/*/* %changelog +* Fri Feb 8 2002 François Pons 4.2-2mdk +- missing fixing arch determination for _parse_ (now correctly + handles src architecture). + * Fri Feb 8 2002 François Pons 4.2-1mdk - fixed --descriptions and --summary of parsehdlist for multiline output by adding prefix after each linefeed. diff --git a/rpmtools.xs b/rpmtools.xs index 7543e4c..053153f 100644 --- a/rpmtools.xs +++ b/rpmtools.xs @@ -109,7 +109,7 @@ SV *get_fullname_sv(Header header) { char *name = get_name(header, RPMTAG_NAME); char *version = get_name(header, RPMTAG_VERSION); char *release = get_name(header, RPMTAG_RELEASE); - char *arch = get_name(header, RPMTAG_ARCH); + char *arch = headerIsEntry(header, RPMTAG_SOURCEPACKAGE) ? "src" : get_name(header, RPMTAG_ARCH); char *fullname = (char*)alloca(strlen(name)+strlen(version)+strlen(release)+strlen(arch)+4); STRLEN fullname_len = sprintf(fullname, "%s-%s-%s.%s", name, version, release, arch); return newSVpv(fullname, fullname_len); @@ -217,7 +217,7 @@ HV* get_info(Header header, int bflag, HV* provides) { if (bflag & HDFLAGS_RELEASE) hv_store(header_info, "release", 7, newSVpv(get_name(header, RPMTAG_RELEASE), 0), 0); if (bflag & HDFLAGS_ARCH) - hv_store(header_info, "arch", 4, newSVpv(get_name(header, RPMTAG_ARCH), 0), 0); + hv_store(header_info, "arch", 4, newSVpv(headerIsEntry(header, RPMTAG_SOURCEPACKAGE) ? "src" : get_name(header, RPMTAG_ARCH), 0), 0); if (bflag & HDFLAGS_GROUP) hv_store(header_info, "group", 5, newSVpv(get_name(header, RPMTAG_GROUP), 0), 0); if (bflag & HDFLAGS_SIZE) -- cgit v1.2.1