compare rpm packages, ignore trailing version

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bcswebstudio
    Journeyman
    • Feb 2006
    • 13

    compare rpm packages, ignore trailing version

    I just imported the sample Sort rule from:
    http://www.scootersoftware.com/downl...c=kb_morerules
    and it works like a champ. Now, here is a sample of the type of thing I'm trying to compare and how I'd like it to be compared. Can it be done, say, with regular expression in BC2?

    php5-5.1.2-27
    php5-bz2-5.1.2-27
    php5-calendar-5.1.2-27

    compared to:
    php5-5.1.2-29.54
    php5-bz2-5.1.2-29.54

    should be interpreted as:

    php5
    php5-bz2
    php5-calendar

    php5
    php5-bz2

    Then, when I show "differences only", I will clearly see which packages (without regard to version info) are not installed on which server.

    The regular expression for the above stripping of version might be something like:
    (.+)-[0-9].+
    If this is possible, then an alternative enhancement or add'l rule might be to compare version and ignore subversions:
    (.+-[0-9]+)\.[0-9].+

    Can it be done? How?
Working...