libspec.lib: use rpmspec -P <specfile> instead of rpm -q --specedit ... if rpm 4 is detected
This commit is contained in:
parent
b20b079907
commit
08bfa59a98
@ -23,6 +23,9 @@
|
||||
packager_fullname=
|
||||
packager_email=
|
||||
|
||||
## Detect rpm version
|
||||
rpm_version="`rpm --version | sed 's|.* .* ||'`"
|
||||
|
||||
## Mode to be used when creating and updating the specfiles -------------------
|
||||
rpm_specfile_mode="644"
|
||||
|
||||
|
@ -637,12 +637,21 @@ $FUNCNAME: specfile_preprocessed = \"$specfile_preprocessed\""
|
||||
notify.error "$FUNCNAME: "$"can't create temporary files"
|
||||
notify.debug "$FUNCNAME: tmpspreprerr = \`${NOTE}$tmpspreprerr${NORM}'"
|
||||
|
||||
notify.debug "\
|
||||
if [ "${rpm_version:0:2}" == "5." ]; then
|
||||
notify.debug "\
|
||||
$FUNCNAME: running: rpm -q $rpm_options --specfile --specedit $specfile ..."
|
||||
|
||||
eval "\
|
||||
eval "\
|
||||
rpm -q $rpm_options --specfile --specedit $specfile \
|
||||
> $specfile_preprocessed 2> $tmpspreprerr"
|
||||
> $specfile_preprocessed 2> $tmpspreprerr"
|
||||
else
|
||||
notify.debug "\
|
||||
$FUNCNAME: running: rpmspec $rpm_options -P $specfile ..."
|
||||
|
||||
eval "\
|
||||
rpmspec $rpm_options -P $specfile \
|
||||
> $specfile_preprocessed 2> $tmpspreprerr"
|
||||
fi
|
||||
|
||||
if [ -s "$tmpspreprerr" ]; then
|
||||
notify.warning $"\
|
||||
|
Loading…
Reference in New Issue
Block a user