rpmlint
rpmlint copied to clipboard
redundant-prefix-tag is a subcase of hardcoded-prefix-tag
(From http://rpmlint.zarb.org/cgi-bin/trac.cgi/ticket/160, akurtakov@…)
Prefix: %_prefix trigger redundant-prefix-tag Prefix: /usr trigger hardcoded-prefix-tag
But the fix for both warnings is to remove the Prefix: tag. I suggest removing the redundant-prefix-tag and reporting a hardcoded-prefix-tag whenever a Prefix: tag is seen nomather what is the value.
Does it sounds correct or there is a special issue which I don't see?
Changed 4 years ago by scop
status changed from new to assigned owner changed from misc@… to scop I agree that redundant-prefix-tag should be removed, unless I've missed something, it's plain broken. Specifying Prefix: does not have anything to do with %{_prefix} per se nor does it affect its value, Prefix: AFAIK only affects package relocatability (and rpm by default does not create relocatable packages so specifying Prefix: %{_prefix} is not redundant, it might actually be exactly the thing the packager was after). Removed in [1462].
Reporting hardcoded-prefix-tag when the Prefix: value is a macro would not be correct - it's not hardcoded, it's a macro (revision [1462] takes that into account). The info message, rpmlint -I hardcoded-prefix-tag, is AFAIK bogus though - if the Prefix: tag is removed, the package will not end up as relocatable any more. If rest of the specfile hardcodes /usr as well and the package is truely relocatable on that prefix, Prefix: /usr would probably be the right thing to do by the packager, not removing Prefix: altogether nor changing its value to a macro. Not quite sure what to do about this yet, leaving open for comments.
Original comment by: scop
- Milestone: 1.5 --> 1.7
Original comment by: scop
- Milestone: 1.7 --> future
Original comment by: scop