Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-5802

Yum provider incorrectly computes epoch for RPM package versions

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: PUP 4.5.0
    • Component/s: None
    • Labels:
      None
    • Template:
    • Acceptance Criteria:
      Hide

      can install (correct) packages with epoch tag. if package always has epoch, it should assume and install the 0 epoch

      Show
      can install (correct) packages with epoch tag. if package always has epoch, it should assume and install the 0 epoch
    • Story Points:
      2
    • Sprint:
      Client 2016-03-09, Client 2016-05-04, Client 2016-05-18
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      Previously, a bug in the yum provider would cause it to incorrectly interpret epoch values of package versions as 0. Now the epoch is properly parsed from the version string.

      Description

      There is a bug in the `yum_parse_evr` code that the yum package provider uses to parse version strings into epoch, version, release hashes:

       def yum_parse_evr(s)
          ei = s.index(':')
          if ei
            e = s[0,ei]
            s = s[ei+1,s.length]
          else
            e = nil
          end
          e = String(Bignum(e)) rescue '0'
         # ...
      

      Bignum() is not a function. This causes all epochs to throw an error and be coerced into '0'.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              eric.sorenson Eric Sorenson
              Reporter:
              mveytsman Max Veytsman
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support