Comparar versiones de paquetes Debian / Debian package version comparison
* ESPAÑOL/SPANISH *
Más de una vez se nos plantea la duda de si un paquete Debian que contiene en su versión caracteres como '+', '-' o '~' es de mayor versión que otro con unaversión similar. Para esto, podemos usar este sencillo comando que nos responderá en consecuencia lo que "dpkg" piensa :]
Esto nos será mucho más ágil que recurrir a mirar la Debian policy (aunque nunca está de más saber qué es que) :P
* ENGLISH/INGLÉS *
Sometimes, when we find a Debian package which version contains special characters like '+', '-' or '~' we may wonder what version between two packages having similar versions is greater. For this case, we can use this easy command which will return what "dpkg" thinks about :]
This will be much more easier than take a look to the Debian policy (although, it will never be a bad thing to do just to know what is what :P)
# Literalmente significa: # "es '2.4~jaunty1' mayor que '2.4'?" # Y si la respuesta es si, este comando nos devolverá "TRUE" dpkg --compare-versions 2.4~jaunty1 gt 2.4 && echo TRUE # Literally it means: # "is '2.4~jaunty1' greater than '2.4'?" # And if the answer from dpkg is afirmative, it will returno "TRUE" dpkg --compare-versions 2.4~jaunty1 gt 2.4 && echo TRUE
Lenguaje:
bash

Comentarios