343 | | return [string compare $a_(name) $b_(name)] |
| 344 | set namecmp [string compare $a_(name) $b_(name)] |
| 345 | if {$namecmp != 0} { |
| 346 | return $namecmp |
| 347 | } |
| 348 | set avr_ [split $a_(version) "_"] |
| 349 | set bvr_ [split $b_(version) "_"] |
| 350 | set vercmp [rpm-vercomp [lindex $avr_ 0] [lindex $bvr_ 0]] |
| 351 | if {$vercmp != 0} { |
| 352 | return $vercmp |
| 353 | } |
| 354 | set ar_ [lindex $avr_ 1] |
| 355 | set br_ [lindex $bvr_ 1] |
| 356 | if {$ar_ < $br_} { |
| 357 | return -1 |
| 358 | } elseif {$ar_ > $br_} { |
| 359 | return 1 |
| 360 | } else { |
| 361 | return 0 |
| 362 | } |