Bug 1249693 - rpmbuild returns a bad error message
Summary: rpmbuild returns a bad error message
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm
Version: 22
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Packaging Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-08-03 15:05 UTC by Viktor Jancik
Modified: 2016-02-01 02:25 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-08-05 09:39:45 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Viktor Jancik 2015-08-03 15:05:39 UTC
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 15:33:35 UTC
rpmbuild is made from the rpm source package... ;) 

Moving over there for comment...

Comment 2 Florian Festi 2015-08-05 09:39:45 UTC
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.