Bug 919080 - rpmbuild run with -E | --eval exits with return value "1" and prints usage
Summary: rpmbuild run with -E | --eval exits with return value "1" and prints usage
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm
Version: 18
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
Assignee: Packaging Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-03-07 14:57 UTC by Tomáš Hozza
Modified: 2014-01-03 11:06 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-01-03 11:06:57 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Tomáš Hozza 2013-03-07 14:57:59 UTC
Description of problem:
rpmbuuld run with -E or --eval option prints out usage and exits with non zero
exit value indicating an error.

Version-Release number of selected component (if applicable):
rpm-build-4.10.3.1-1.fc18

How reproducible:
every time

Steps to Reproduce:
1. # rpmbuild --eval %{_sbindir}
   or
   # rpmbuild -E %{_sbindir}
2. Look at the rpmbuild output.
3. # echo $?
  
Actual results:
# rpmbuild --eval %{_sbindir}
/usr/sbin
RPM version 4.10.3.1
Copyright (C) 1998-2002 - Red Hat, Inc.
This program may be freely redistributed under the terms of the GNU GPL

Usage: rpmbuild [-v?] [-bp] [-bc] [-bi] [-bl] [-ba] [-bb] [-bs] [-tp] [-tc] [-ti] [-ta] [-tb] [-ts] [--rebuild] [--recompile] [--buildroot=DIRECTORY] [--clean] [--nobuild] [--nodeps]
        [--nodirtokens] [--noclean] [--nocheck] [--rmsource] [--rmspec] [--short-circuit] [--target=CPU-VENDOR-OS] [-D|--define 'MACRO EXPR'] [--undefine=MACRO] [-E|--eval 'EXPR'] [--macros=<FILE:...>]
        [--nodigest] [--nosignature] [--rcfile=<FILE:...>] [-r|--root ROOT] [--dbpath=DIRECTORY] [--querytags] [--showrc] [--quiet] [-v|--verbose] [--version] [-?|--help] [--usage] [--with=<option>]
        [--without=<option>] [--buildpolicy=<policy>] [--sign]

# echo $?
1

Expected results:
# rpmbuild --eval %{_sbindir}
/usr/sbin
# echo $?
0

Additional info:

Comment 1 Panu Matilainen 2013-03-27 08:45:11 UTC
Yup, its an ages old glitch, old versions just give a different error:

[pmatilai@sh-el5 ~]$ rpmbuild --eval "%{_sbindir}"; echo $?
/usr/sbin
rpmbuild: no spec files given for build
1

The sanest fix might well be just eliminating --eval from rpmbuild altogether, but we'll see. But really, just use 'rpm --eval <foo>' which actually works.

Comment 2 Panu Matilainen 2013-04-25 10:10:10 UTC
Fixed upstream.

Comment 3 Fedora End Of Life 2013-12-21 15:25:24 UTC
This message is a reminder that Fedora 18 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 18. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '18'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 18's end of life.

Thank you for reporting this issue and we are sorry that we may not be 
able to fix it before Fedora 18 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior to Fedora 18's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 4 Tomáš Hozza 2014-01-03 11:06:57 UTC
Works well in F20...


Note You need to log in before you can comment on or make changes to this bug.