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

[PATCH]: dpkg: "Architecture: ..." in status file



Hi,

here is the long awaited patch to track the architecture in the dpkg
status file. As it turns out in the end its a realy simple patch once
you find the lines of code that allways keep deleting the
architecture.

MfG
        Goswin

----------------------------------------------------------------------

diff -Nurd dpkg-1.10.18/debian/changelog dpkg-1.10.18-0.1/debian/changelog
--- dpkg-1.10.18/debian/changelog	2003-10-27 20:42:05.000000000 +0100
+++ dpkg-1.10.18-0.1/debian/changelog	2004-01-16 10:55:16.000000000 +0100
@@ -1,3 +1,10 @@
+dpkg (1.10.18-0.1) unstable; urgency=medium
+
+  * Keep Architecture field status file
+  * Copy Architecture field from available to status on install
+
+ -- Goswin von Brederlow <brederlo@informatik.uni-tuebingen.de>  Fri, 16 Jan 2004 10:55:56 +0200
+
 dpkg (1.10.18) unstable; urgency=medium
 
   * Rebuild, tagging and releasing correctly from cvs this time.
diff -Nurd dpkg-1.10.18/lib/parse.c dpkg-1.10.18-0.1/lib/parse.c
--- dpkg-1.10.18/lib/parse.c	2003-10-25 22:03:20.000000000 +0200
+++ dpkg-1.10.18-0.1/lib/parse.c	2004-01-16 10:53:16.000000000 +0100
@@ -241,8 +241,6 @@
     if (flags & pdb_recordavailable)
       parsemustfield(NULL,filename,lno, warnto,warncount,&newpig,1,
                      (const char **)&newpifp->architecture, "architecture");
-    else if (newpifp->architecture && *newpifp->architecture)
-      newpifp->architecture= NULL;
 
     /* Check the Config-Version information:
      * If there is a Config-Version it is definitely to be used, but
diff -Nurd dpkg-1.10.18/main/processarc.c dpkg-1.10.18-0.1/main/processarc.c
--- dpkg-1.10.18/main/processarc.c	2003-10-25 22:03:21.000000000 +0200
+++ dpkg-1.10.18-0.1/main/processarc.c	2004-01-16 10:41:48.000000000 +0100
@@ -790,7 +790,7 @@
   pkg->installed.description= pkg->available.description;
   pkg->installed.maintainer= pkg->available.maintainer;
   pkg->installed.source= pkg->available.source;
-  pkg->installed.architecture= 0; /* This is irrelevant in the status file. */
+  pkg->installed.architecture= pkg->available.architecture;
   pkg->installed.installedsize= pkg->available.installedsize;
   pkg->installed.version= pkg->available.version;
   pkg->installed.origin = pkg->available.origin;                               



Reply to: