Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-15688

backport fix: invalid version: v"3" (in a complex conditional)

Linking RHIVOS CVEs to...Migration: Automation ...SWIFT: POC ConversionSync from "Extern...XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done-Errata
    • Icon: Normal Normal
    • rhel-9.4
    • rhel-9.2.0
    • rpm
    • None
    • rpm-4.16.1.3-27.el9
    • None
    • None
    • rhel-swm
    • ssg_core_services
    • 14
    • 22
    • None
    • QE ack
    • False
    • False
    • Hide

      None

      Show
      None
    • No
    • Red Hat Enterprise Linux
    • None
    • Hide

      AC: Complex conditionals in spec file like the one in description works as expected, don't give error.

      `%if v"%pkgconf_version" > v"1.9" && v"%pkgconf_version" < v"2.0"` 

      Test: $ rpm --eval '%[v"0" && v"0"]' gives 0, not 

      
      

      $ rpm --eval '%[v"0" && v"0"]'
      error: invalid version: v"0" && v"0"
      error:     
      ${code}

      Show
      AC: Complex conditionals in spec file like the one in description works as expected, don't give error. `% if v "%pkgconf_version" > v "1.9" && v "%pkgconf_version" < v "2.0" ` Test: $ rpm --eval '% [v"0" && v"0"] ' gives 0, not  $ rpm --eval '% [v"0" && v"0"] ' error: invalid version: v"0" && v"0" error:      ${code}
    • Pass
    • Not Needed
    • None
    • Release Note Not Required
    • None

      Please backport the fix to https://github.com/rpm-software-management/rpm/issues/1883 to RHEL 9.

      What were you trying to do that didn't work?

      `%if v"%pkgconf_version" > v"1.9" && v"%pkgconf_version" < v"2.0"`

      Please provide the package NVR for which bug is seen:

      How reproducible: 100%

      Steps to reproduce

      1. use above type of conditional in a spec file

      Expected results

      No error

      Actual results

      `error: invalid version`

              packaging-team-maint packaging-team-maint
              petersen@redhat.com Jens-Ulrik Petersen
              packaging-team-maint packaging-team-maint
              Eva Mrakova Eva Mrakova
              Votes:
              1 Vote for this issue
              Watchers:
              9 Start watching this issue

                Created:
                Updated:
                Resolved: