Bug#170825: Checking if old version's dependencies break on update

2005-08-18 Thread Henry Jensen
Hello

On Wed, 17 Aug 2005 19:54:27 +0300
[EMAIL PROTECTED] (Kari Pahula) wrote:

  dpkg: ../../src/packages.c:191: process_queue: Assertion `dependtry = 4' 
  failed.
  E: Sub-process /usr/bin/dpkg exited unexpectedly
  
  Tried with patched dpkg 1.10.28 and 1.13.10
 
 How did you run dpkg?  What was the command line?

apt-get install [somepackage]

 At least I didn't get that error with the test cases I ran on the patched 
 dpkg.

Like I said, I got it in all cases, both with 1.10.28 and 1.13.10. 
What compiler did you use? I still use gcc 3.3.5 here.


I attach an strace from  dpkg --configure -a


Regards,
Henry


-- 
  -
 |  Henry Jensen|  |
 |  ScanPlus GmbH   |Tel +49 731 92013 115 |
 |  Koenigstr. 78   D 89077 Ulm |Fax +49 731 92013 290 |
 |  http://www.scan-plus.de/| Amtsgericht Ulm HRB 3220 |
 |  [EMAIL PROTECTED]   |   Geschaeftsf.: Juergen Hoermann |
  -

execve(/usr/bin/dpkg, [dpkg, --configure, -a], [/* 28 vars */]) = 0
uname({sys=Linux, node=jensen, ...}) = 0
brk(0)  = 0x80fa000
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0x40017000
access(/etc/ld.so.nohwcap, F_OK)  = -1 ENOENT (No such file or directory)
open(/etc/ld.so.preload, O_RDONLY)= -1 ENOENT (No such file or directory)
open(/etc/ld.so.cache, O_RDONLY)  = 4
fstat64(4, {st_mode=S_IFREG|0644, st_size=35015, ...}) = 0
old_mmap(NULL, 35015, PROT_READ, MAP_PRIVATE, 4, 0) = 0x40018000
close(4)= 0
access(/etc/ld.so.nohwcap, F_OK)  = -1 ENOENT (No such file or directory)
open(/lib/tls/libc.so.6, O_RDONLY)= 4
read(4, \177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0`Z\1\000..., 512) = 512
fstat64(4, {st_mode=S_IFREG|0755, st_size=1254468, ...}) = 0
old_mmap(NULL, 1264780, PROT_READ|PROT_EXEC, MAP_PRIVATE, 4, 0) = 0x40021000
old_mmap(0x4014b000, 36864, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 4, 
0x129000) = 0x4014b000
old_mmap(0x40154000, 7308, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x40154000
close(4)= 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0x40156000
set_thread_area({entry_number:-1 - 6, base_addr:0x401562a0, limit:1048575, 
seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, 
useable:1}) = 0
munmap(0x40018000, 35015)   = 0
brk(0)  = 0x80fa000
brk(0x811b000)  = 0x811b000
brk(0)  = 0x811b000
umask(022)  = 022
open(/etc/dpkg/dpkg.cfg, O_RDONLY|O_LARGEFILE) = 4
fstat64(4, {st_mode=S_IFREG|0644, st_size=293, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0x40018000
read(4, # dpkg configuration file\n#\n# Th..., 4096) = 293
read(4, , 4096)   = 0
close(4)= 0
munmap(0x40018000, 4096)= 0
open(/root/.dpkg.cfg, O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or 
directory)
getuid32()  = 0
geteuid32() = 0
access(/var/lib/dpkg, W_OK)   = 0
open(/var/lib/dpkg/lock, O_RDWR|O_CREAT|O_TRUNC|O_LARGEFILE, 0660) = 4
fcntl64(4, F_SETLK64, {type=F_WRLCK, whence=SEEK_SET, start=0, len=0}, 
0xb870) = 0
fcntl64(4, F_GETFD) = 0
fcntl64(4, F_SETFD, FD_CLOEXEC) = 0
open(/var/lib/dpkg/status, O_RDONLY|O_LARGEFILE) = 6
fstat64(6, {st_mode=S_IFREG|0644, st_size=448638, ...}) = 0
mmap2(NULL, 448638, PROT_READ, MAP_SHARED, 6, 0) = 0x40157000
brk(0)  = 0x811b000
brk(0x813c000)  = 0x813c000
brk(0)  = 0x813c000
brk(0x815e000)  = 0x815e000
brk(0)  = 0x815e000
brk(0x818)  = 0x818
brk(0)  = 0x818
brk(0x81a2000)  = 0x81a2000
brk(0)  = 0x81a2000
brk(0x81c4000)  = 0x81c4000
munmap(0x40157000, 448638)  = 0
close(6)= 0
open(/var/lib/dpkg/updates/, O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 6
fstat64(6, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
fcntl64(6, F_SETFD, FD_CLOEXEC) = 0
getdents64(6, /* 3 entries */, 4096)= 80
getdents64(6, /* 0 entries */, 4096)= 0
close(6)= 0
open(/var/lib/dpkg/available, O_RDONLY|O_LARGEFILE) = 6
fstat64(6, {st_mode=S_IFREG|0644, st_size=407986, ...}) = 0
mmap2(NULL, 407986, PROT_READ, MAP_SHARED, 6, 0) = 0x40157000
brk(0)

Bug#170825: Checking if old version's dependencies break on update

2005-08-17 Thread Henry Jensen
Hello,

the patch caused the following Error:

dpkg: ../../src/packages.c:191: process_queue: Assertion `dependtry = 4' 
failed.
E: Sub-process /usr/bin/dpkg exited unexpectedly

Tried with patched dpkg 1.10.28 and 1.13.10

Kind regards,

Henry



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



Bug#170825: Checking if old version's dependencies break on update

2005-08-17 Thread Kari Pahula
On Wed, Aug 17, 2005 at 03:07:57PM +0200, Henry Jensen wrote:
 dpkg: ../../src/packages.c:191: process_queue: Assertion `dependtry = 4' 
 failed.
 E: Sub-process /usr/bin/dpkg exited unexpectedly
 
 Tried with patched dpkg 1.10.28 and 1.13.10

How did you run dpkg?  What was the command line?

At least I didn't get that error with the test cases I ran on the patched dpkg.


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



Bug#170825: Checking if old version's dependencies break on update

2005-07-20 Thread Kari Pahula
Here's my attempt at getting this one fixed.  Unfortunately I can't
claim to have any deep understanding of dpkg's workings after what
perusing I did, but it still seems to fix this.  At least it fixed the
test case shown.

This'll still need at least some refactoring.  The error message
handling is pretty much identical with the code prior to my code,
those could be merged and moved to their own function.  Also, the
error message generated is a bit off.

If nothing else, then the apparent simplicity of the patch bothers
me...  I hope it's of any use.
diff -urp dpkg-1.13.10/src/packages.c dpkg-1.13.10.new/src/packages.c
--- dpkg-1.13.10/src/packages.c 2005-06-06 07:07:12.0 +0300
+++ dpkg-1.13.10.new/src/packages.c 2005-07-21 01:00:33.644014266 +0300
@@ -408,6 +408,45 @@ int dependencies_ok(struct pkginfo *pkg,
   internerr(unknown value for found);
 }
   }
+
+  if (!removing  pkg-installed.depended) {
+for (possi= pkg-installed.depended; possi; possi = possi-next) {
+  if (possi-up-type != dep_depends  possi-up-type != dep_predepends)
+   continue;
+  matched= 0; varbufreset(oemsgs);
+  thisf= deppossi_ok_found(possi-ed, possi-up-up, 0, 0, matched, possi,
+  interestingwarnings, oemsgs);
+
+  switch (thisf) {
+  case 0:
+   ok= 0;
+  case 2:
+   varbufaddstr(aemsgs,  );
+   varbufaddstr(aemsgs, possi-up-up-name);
+   varbufaddstr(aemsgs, _( depends on ));
+   varbufdependency(aemsgs, possi-up);
+   if (interestingwarnings) {
+ /* Don't print the line about the package to be removed if
+  * that's the only line.
+  */
+ varbufaddstr(aemsgs, _(; however:\n));
+ varbufaddc(oemsgs, 0);
+ varbufaddstr(aemsgs, oemsgs.buf);
+   } else {
+ varbufaddstr(aemsgs, .\n);
+   }
+   break;
+  case 1:
+   if (ok1) ok= 1;
+   break;
+  case 3:
+   break;
+  default:
+   internerr(unknown value for found);
+  }
+}
+  }
+  
   if (ok == 0  (pkg-clientdata  pkg-clientdata-istobe == itb_remove))
 ok= 1;