[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Confrontare il numero di versione di due pacchetti



Il gio, 2002-11-21 alle 16:42, Thor ha scritto:

> non mi pare che dpkg --compare-versions funzioni sempre bene ...
> nell'esempio sottostante doveva rispondere YESSS e invece ha risposto NOOO
> idem se nel pacchetto c'e' %3a che indica i ":"
> 
>  if dpkg --compare-versions fetchmail_5.9.11-6.1_i386.deb gt
> fetchmail_5.9.11-6_i386.deb ; then echo YESSS ;else echo NOOO; fi
> NOOO

> bug o feature ? ;-)

bug tuo.. dpkg confronta versioni, non pacchetti. in particolare quando arriva a
-6.1 e -6_ trovando due non-numeri . e _ li confronta ed indovina chi chiene prima?

if dpkg --compare-versions 5.9.11-6.1 gt 5.9.11-6 ; then 
  echo YESSS 
else 
  echo NOOO
fi

--> YESSS

--
Federico Di Gregorio
Debian GNU/Linux Developer & Italian Press Contact        fog@debian.org
INIT.D Developer                                           fog@initd.org
   Abandon the search for Truth; settle for a good fantasy. -- Anonymous

Attachment: signature.asc
Description: PGP signature


Reply to: