Bug 1249693 - rpmbuild returns a bad error message
rpmbuild returns a bad error message
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: rpm (Show other bugs)
22
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: packaging-team-maint
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-03 11:05 EDT by Viktor Jancik
Modified: 2016-01-31 21:25 EST (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-08-05 05:39:45 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Viktor Jancik 2015-08-03 11:05:39 EDT
Description of problem:
My spec file had a line:
    %config{noreplace} %{_sysconfdir}/wgetrc

and the error returned by RPM build was:
    File must begin with "/": {noreplace}

when the real error is bad brackets on %config(noreplace).


Version-Release number of selected component (if applicable):
RPM version 4.12.0.1

How reproducible:
Always

Steps to Reproduce:
1.Write a spec file with %config{noreplace} in it
2.Try to build the package

Actual results:
RPM build errors:
    File must begin with "/": {noreplace}

Expected results:
RPM build errors:
    Wrong brackets, curly instead of normal: %config{noreplace}
~or something like that

Additional info:
Comment 1 Kevin Fenzi 2015-08-03 11:33:35 EDT
rpmbuild is made from the rpm source package... ;) 

Moving over there for comment...
Comment 2 Florian Festi 2015-08-05 05:39:45 EDT
Sorry, rpmbuild is not going to guess your intentions and then try to give helpful hints. The error message is gives is quite correct. Rpmbuild expects a file name and complains that it is malformed. The "(noreplace)" part is optional and the spec parser has correctly decided that it is not there.

The error message also is not misleading. It tells you quite directly which part it is not able to interpret in a useful way and what it thinks should be there.

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