Bug#228253: dpkg: Patch to preserv the Architecture field for newly installed packages
Package: dpkg
Version: 1.10.18-0.1
Severity: important
Tags: patch sid sarge
Hi,
in case you don't find your own patch enabling keeping the
Architecture field in the status file I attached a cleanup version of
mine.
'parse.c' has to be stopped from erasing existing Architecture lines in
the status file and 'processarc.c' has to copy the information over
when installing a package.
I didn't include code that "guesses" missing architectures since it
not so clear how to do this and its unneccessary for sarge.
Please do include this in your next upload and before sarge.
MfG
Goswin
-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux dual 2.4.23dual #1 SMP Sun Dec 14 13:57:16 CET 2003 i686
Locale: LANG=C, LC_CTYPE=de_DE
Versions of packages dpkg depends on:
ii dselect 1.10.18 a user tool to manage Debian packa
ii libc6 2.3.2.ds1-10 GNU C Library: Shared libraries an
-- no debconf information
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: