Bug 3311 - %__python_version expands to nothing if puthon is not installed
Summary: %__python_version expands to nothing if puthon is not installed
Status: CLOSED FIXED
Alias: None
Product: Sisyphus
Classification: Development
Component: rpm (show other bugs)
Version: unstable
Hardware: all Linux
: P2 major
Assignee: placeholder@altlinux.org
QA Contact: qa-sisyphus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-11-24 13:11 MSK by Sir Raorn
Modified: 2008-06-13 12:15 MSD (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sir Raorn 2003-11-24 13:11:48 MSK
GLobal macro %__python_version expands to empty string if puthon is not
installed. This causes parse errors in sandman while doing it's pre-commit check
on specfiles containing something like:

Requires: python >= %__python_version

This macro should look like this:

%__python_version %((%__python -c 'import sys; print sys.version' 2>/dev/null ||
echo "unknown") |head -1 |cut -d' ' -f1 |cut -d. -f1,2)

This will not cause any errors in build process since python-devel package is
often BuildRequire'd in such packages.
Comment 1 Dmitry V. Levin 2003-11-24 18:09:16 MSK
Applied in upcoming rpm-4.0.4-alt28