[Bug 888467] New: rpm %requires_eq expands to nothing if package is not installed (instead of failing)
https://bugzilla.novell.com/show_bug.cgi?id=888467 https://bugzilla.novell.com/show_bug.cgi?id=888467#c0 Summary: rpm %requires_eq expands to nothing if package is not installed (instead of failing) Classification: openSUSE Product: openSUSE Factory Version: 201407* Platform: Other OS/Version: openSUSE 13.2 Status: NEW Severity: Normal Priority: P5 - None Component: Development AssignedTo: mls@suse.com ReportedBy: suse-beta@cboltz.de QAContact: qa-bugs@suse.de Found By: Beta-Customer Blocker: --- %requires_eq is an easy to use replacement for something like Requires: perl = %(rpm -q --qf '%%{version}' perl) # rpm --eval '%requires_eq perl' Requires: perl = 5.18.2 # However it fails if you specify a package that is not installed: # rpm --eval '%requires_eq notfound' # echo $? 0 The same happens with %requires_ge This can result in missing dependencies if a package is not installed in the build environment. This can happen when a package got renamed - it will still be pulled in by BuildRequires because it (hopefully) has a Provides for the old name, but rpm -q will no longer find it. To make things worse, this will probably happen unnoticed because the build still works without problems. I strongly recommend to make not installed packages a fatal error, so that the packager can review what is happening. I know this can be annoying, but it's much better than random failures because of a missing dependency (which the packager of course[tm] has installed on his system, and therefore won't find out why it's broken for some users). An easy (and slightly evil) way would be to remove the | grep -v "is not" part from %requires_eq and %requires_ge, which will fail a second later because it produces a *.spec with invalid syntax ;-) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com