Bug#493389: update-grub: uses wrong ordering algorithm (sorts 1.2.3-foo before 1.2.3.1-foo)

Henrique de Moraes Holschuh hmh at debian.org
Mon Aug 4 02:33:33 UTC 2008


On Sun, 03 Aug 2008, Robert Millan wrote:
> On Sun, Aug 03, 2008 at 10:12:48AM -0300, Henrique de Moraes Holschuh wrote:
> > There is absolutely NO reason for a human to accept that 1.2.3.1-foo is a
> > LOWER version number than 1.2.3-foo, simply because it is not.
> 
> Okay, I must have gotten the situation wrong then.
> 
> > Why don't you guys get the algorithm from apt/dpkg instead of reinventing
> > the wheel?  Granted, you may want to simplify it since you won't need epochs
> > or "~", but you don't have to find clever ways to implement version sorting
> > from the ground up.
> 
> Sounds fine. Could you send us a patch to call dpkg --compare-versions from the
> script?

Why would you want something in /sbin to call something in /usr/s?bin ?

You need to port the algorithm.

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh





More information about the Pkg-grub-devel mailing list