RPM

[RFE]: provide API to SPEC file parser

Bug #651570 reported by Jeff Johnson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
RPM
New
Undecided
Unassigned
Fedora
Won't Fix
Low

Bug Description

tracker

Tags: rpmbuild rhel
Revision history for this message
In , Michal (michal-redhat-bugs) wrote :

Description of problem:

For "third party tools" (like TPS) there's sometimes need to access to the
resulting string from Release line in SPEC file.

Input is SPEC file with this lines

%define _extra_release %{?dist:%{dist}}%{!?dist:%{?extra_release:%{extra_release}}}
Release: 3%{_extra_release}.1

Output is .el5_1.1 or The Right String.

See this bug 441672.

Version-Release number of selected component (if applicable):
rpm-4.4.2-48.el5

How reproducible:
always

Actual results:
no exported API

Expected results:
exported API

Revision history for this message
In , Panu (panu-redhat-bugs) wrote :

Sure there's an API of sorts for this in librpmbuild (even if it's not exactly
very sane or friendly to use), but just for digging out a release number from a
spec you can use a spec query, for example:

[pmatilai@localhost RHEL-5]$ rpm -q --define "%dist .el5" --specfile --qf
"%{name} %{version} %{release}\n" virt-manager.spec
virt-manager 0.5.3 7.el5
virt-manager-debuginfo 0.5.3 7.el5

NOTABUG in the sense that couple of ways to access this data do exist. There are
plans to provide a saner API for the build parts for rpm (including python
bindings), but that's way way out of scope for RHEL 5.

Jeff Johnson (n3npq)
tags: added: rhel rpmbuild
Changed in fedora:
importance: Unknown → Low
status: Unknown → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.