OpenPKG CVS Repository
  http://cvs.openpkg.org/
  ____________________________________________________________________________

  Server: cvs.openpkg.org                  Name:   Ralf S. Engelschall
  Root:   /v/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-tools                    Date:   19-Jul-2006 19:33:19
  Branch: HEAD                             Handle: 2006071918331900

  Modified files:
    openpkg-tools/cmd       build.pl

  Log:
    Since years "openpkg build" has compared the <release> part of
    <name>-<version>-<release> with a plain string compare only while RPM
    compares <release> the same way as <version>. The problem is that
    OpenPKG <release> strings are also structured ones where a plain string
    compare is not really the correct solution in all cases.
    
    So, although our <version> compare is still rather different to what
    RPM does, we at least now follow RPM and use the same (structured)
    comparison for <release> as for <version>. This makes no real difference
    within a release, but perhaps a difference on upgrades. But it
    especially allows to correctly compare strings like "2.5.9" and
    "2.5.10", etc.

  Summary:
    Revision    Changes     Path
    1.28        +3  -3      openpkg-tools/cmd/build.pl
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-tools/cmd/build.pl
  ============================================================================
  $ cvs diff -u -r1.27 -r1.28 build.pl
  --- openpkg-tools/cmd/build.pl        19 Jul 2006 17:21:06 -0000      1.27
  +++ openpkg-tools/cmd/build.pl        19 Jul 2006 17:33:19 -0000      1.28
  @@ -469,12 +469,12 @@
   #   - "openpkg rpm":
   #     uses "vcmp_version" semantics 1:1 again
   #   - "openpkg build" (this):
  -#     trivial string comparison
  -#     FIXME: this is certainly too weak!?
  +#     uses "vcmp_version" semantics 1:1 again (>= 20060719)
  +#     trivial string comparison               (<= 20060719)
   sub vcmp_release ($$) {
       my ($a, $b) = @_;
   
  -    return ($a cmp $b);
  +    return vcmp_version($a, $b);
   }
   
   #   compare two package "version" or "version-release" strings
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     [email protected]

Reply via email to