#42 %ifos doesn't match solaris2.10

open
5
2011-02-02
2011-02-02
Anonymous
No

Hi, there's a small typo in rpm_spec.pm.in that prevents the "%ifos" command from working correctly.

Here's a tiny patch against 1.3.103 that fixes the issue:

========================8-<=========================
--- rpm_spec.pm.in.orig Tue Feb 1 16:39:59 2011
+++ rpm_spec.pm.in Wed Feb 2 12:29:29 2011
@@ -998,7 +998,7 @@
my @oss = split /[\s,]+/, $str;
foreach my $o (@oss) {
next if not defined $o;
- if (lc ($o) eq $os) {
+ if (lc ($o) eq $str) {
return 1;
}
}
========================8-<=========================

Regards,
Julian

Discussion


  • Anonymous
    2011-02-02

    Sorry that patch was something I was playing with, and of course *doesn't* fix the problem.

    Looks like $os is only defined as "solaris", and not "solaris2.10" (as is the case when using rpmbuild on Solaris).

    Seems that $os_rel is only used to derive the "solaris" name (when equal to 5.x), but in fact should probably also be used to determine the release number of Solaris too (i.e. 5.10 -> "solaris2.10").

    Julian

     

  • Anonymous
    2011-02-02

    • summary: %ifos doesn't work --> %ifos doesn't match solaris2.10