Uploaded image for project: 'Funtoo Linux'
  1. Funtoo Linux
  2. FL-4969

Broken kernel version comparison logic in linux-mod.eclass use_m function.

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • None
    • None

      Kernel version comparison which should return true for > 2.6.6 returns false for major versions greater than 3 (it also returns true for =2.6.6, contrary to the comment).

      This is caused by the following test logic starting at line 196:

          [ ${KV_MAJOR} -eq 3 ] && return 0
          [ ${KV_MAJOR} -eq 2 -a ${KV_MINOR} -gt 5 -a ${KV_PATCH} -gt 5 ] && \
              return 0 || return 1
      

       

      Changing line 196-198 to read the following fixes the logic to compare greater than or equal to 3 and makes the version comparison match the comment:

          [ ${KV_MAJOR} -ge 3 ] && return 0
          [ ${KV_MAJOR} -eq 2 -a ${KV_MINOR} -ge 6 -a ${KV_PATCH} -gt 6 ] && \
              return 0 || return 1
      

            Unassigned Unassigned
            temptorsent temptorsent
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: