Package: apt-move
Version: 4.2.24-1.1

Hi,
  openoffice.org packages use (in violation of chapter 5.6.12 of Debian
policy, see
http://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Version)
version number 2.0.4~rc3-1 and 2.0.4-1, hoping that 2.0.4~rc3 is below
2.0.4 - which surprisingly is for apt and dpkg, but not for apt-move. 

  Perhaps this should be reported as openoffice's policy violation, but
as damage was already done it would be nice if apt-move's
/usr/share/apt-move/cmpversion.awk could be modified so it orders
2.0.4~rc3 below 2.0.4.  Currently apt-move just downloads openoffice
packages & tarballs (of version 2.0.4) and then throws them away because
repository already contains "newer" (2.0.4~rc3) version.

  I've used hack below to teach apt-move how to order openoffice, but it
most probably fails for lot of other corner cases.  Perhaps spawning 
dpkg --compare-versions is right thing to do.  Hack below is definitely
not OK for world wide use, it may eat your repository...

                                        Thanks,
                                                Petr Vandrovec


--- cmpversion.awk      2002-10-28 23:59:41.000000000 -0800
+++ /usr/share/apt-move/cmpversion.awk  2006-10-16 10:20:17.000000000 -0700
@@ -26,8 +26,14 @@
                n = 1
                while (m < i && n < j) {
                        p = substr(a, m, 1)
+                       if (p == "~") {
+                               p = "!"
+                       }
                        q = substr(b, n, 1)
-                       d = (q ~ /[A-Za-z]/) - (p ~ /[A-Za-z]/)
+                       if (q == "~") {
+                               q = "!";
+                       }
+                       d = (p ~ /[A-Za-z]/) - (q ~ /[A-Za-z]/)
                        if (d) {
                                return d
                        }
@@ -71,6 +77,18 @@
                l -= j - 1
        }
 
+       if (k <= 0) {
+               a = "0";
+       }
+       if (l <= 0) {
+               b = "0";
+       }
+       a = substr(a, 1, 1);
+       b = substr(b, 1, 1);
+       d = (b ~ /~/) - (a ~ /~/);
+       if (d) {
+               return d;
+       }
        return (k > 0) - (l > 0)
 }
 


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to