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

--status-pipe implemented(not a cmdline option tho yet)



Below is a short apt run.  There are 2 types of status info being
displayed(currently on stderr).  I display the actual status field, and also
track running maintainer scripts.  It should be pretty self explanatory to
figure out.

My question to the apt developers, is this enough info for apt to make better
descisions?

The following VERY short patch does the status: lines.  The maintainer script
patch is a little more complicated, and may not even be needed, so isn't
included here.

==
Index: lib/dbmodify.c
===================================================================
RCS file: /cvs/dpkg/dpkg/lib/dbmodify.c,v
retrieving revision 1.4
diff -u -r1.4 dbmodify.c
--- lib/dbmodify.c      1999/10/30 01:44:55     1.4
+++ lib/dbmodify.c      2001/01/04 08:59:49
@@ -224,6 +224,7 @@
 
   onerr_abort++;
 
+fprintf(stderr, "status: %s: %s\n", pkg->name, statusinfos[pkg->status]);
   varbufreset(&uvb);
   varbufrecord(&uvb, pkg, &pkg->installed);
   if (fwrite(uvb.buf, 1, uvb.used, importanttmp) != uvb.used)
==

yakko:/mount/md0/home/adam# apt-get remove libqt2.2
Reading Package Lists... Done
Building Dependency Tree... Done
The following packages will be REMOVED:
  kaiman kdelibs3 libqt2.2 
0 packages upgraded, 0 newly installed, 3 to remove and 1  not upgraded.
Need to get 0B of archives. After unpacking 24.6MB will be freed.
Do you want to continue? [Y/n] 
status: kaiman: installed
(Reading database ... 37040 files and directories currently installed.)
Removing kaiman ...
status: kaiman: half-configured
run: kaiman: prerm remove
return: kaiman: prerm: 0
status: kaiman: half-installed
run: kaiman: postrm remove
return: kaiman: postrm: 0
status: kaiman: config-files
status: kaiman: config-files
status: kdelibs3: installed
Removing kdelibs3 ...
status: kdelibs3: half-configured
run: kdelibs3: prerm remove
return: kdelibs3: prerm: 0
status: kdelibs3: half-installed
dpkg - warning: while removing kdelibs3, directory `/etc/kde2/ui' not empty so not removed.
dpkg - warning: while removing kdelibs3, directory `/etc/kde2/colors' not empty so not removed.
dpkg - warning: while removing kdelibs3, directory `/etc/kde2' not empty so not removed.
dpkg - warning: while removing kdelibs3, directory `/usr/share/doc/kde/HTML' not empty so not removed.
dpkg - warning: while removing kdelibs3, directory `/usr/share/doc/kde' not empty so not removed.
run: kdelibs3: postrm remove
return: kdelibs3: postrm: 0
status: kdelibs3: config-files
status: kdelibs3: config-files
status: libqt2.2: installed
Removing libqt2.2 ...
status: libqt2.2: half-configured
run: libqt2.2: prerm remove
return: libqt2.2: prerm: 0
status: libqt2.2: half-installed
run: libqt2.2: postrm remove
return: libqt2.2: postrm: 0
status: libqt2.2: config-files
status: libqt2.2: config-files
yakko:/mount/md0/home/adam# apt-get install kaiman 
Reading Package Lists... Done
Building Dependency Tree... Done
The following extra packages will be installed:
  kdelibs3 libqt2.2 
The following NEW packages will be installed:
  kaiman kdelibs3 libqt2.2 
0 packages upgraded, 3 newly installed, 0 to remove and 1  not upgraded.
Need to get 0B/7308kB of archives. After unpacking 24.6MB will be used.
Do you want to continue? [Y/n] 
Selecting previously deselected package libqt2.2.
(Reading database ... 34903 files and directories currently installed.)
Unpacking libqt2.2 (from .../libqt2.2_2%3a2.2.3-4_i386.deb) ...
status: libqt2.2: half-installed
run: libqt2.2: preinst install 2:2.2.3-4
return: libqt2.2: preinst: 0
status: libqt2.2: unpacked
status: libqt2.2: unpacked
Selecting previously deselected package kdelibs3.
Unpacking kdelibs3 (from .../kdelibs3_4%3a2.1-20010101-1_i386.deb) ...
status: kdelibs3: half-installed
run: kdelibs3: preinst install 4:2.1-20010101-1
return: kdelibs3: preinst: 0
status: kdelibs3: unpacked
status: kdelibs3: unpacked
Selecting previously deselected package kaiman.
Unpacking kaiman (from .../kaiman_4%3a2.1-20010101-1_i386.deb) ...
status: kaiman: half-installed
status: kaiman: unpacked
status: kaiman: unpacked
Setting up libqt2.2 (2.2.3-4) ...
status: libqt2.2: unpacked
status: libqt2.2: half-configured
run: libqt2.2: postinst configure 2:2.2.3-4
return: libqt2.2: postinst: 0

status: libqt2.2: installed
Setting up kdelibs3 (2.1-20010101-1) ...
status: kdelibs3: unpacked
status: kdelibs3: unpacked
status: kdelibs3: unpacked
status: kdelibs3: unpacked
status: kdelibs3: unpacked
status: kdelibs3: unpacked
status: kdelibs3: unpacked
status: kdelibs3: unpacked
status: kdelibs3: unpacked
status: kdelibs3: unpacked
status: kdelibs3: unpacked
status: kdelibs3: half-configured
run: kdelibs3: postinst configure 4:2.1-20010101-1
return: kdelibs3: postinst: 0

status: kdelibs3: installed
Setting up kaiman (2.1-20010101-1) ...
status: kaiman: unpacked
status: kaiman: half-configured
run: kaiman: postinst configure 4:2.1-20010101-1
return: kaiman: postinst: 0

status: kaiman: installed


----BEGIN GEEK CODE BLOCK----
Version: 3.12
GCS d- s: a-- c+++ UL++++ P+ L++++ !E W+ M o+ K- W--- !O M- !V PS--
PE++ Y+ PGP++ t* 5++ X+ tv b+ D++ G e h*! !r z?
-----END GEEK CODE BLOCK-----
----BEGIN PGP INFO----
Adam Heath <doogie@debian.org>        Finger Print | KeyID
67 01 42 93 CA 37 FB 1E    63 C9 80 1D 08 CF 84 0A | DE656B05 PGP
AD46 C888 F587 F8A3 A6DA  3261 8A2C 7DC2 8BD4 A489 | 8BD4A489 GPG
-----END PGP INFO-----




Reply to: