Bug#531515: [Pkg-ia32-libs-maintainers] Processed: Re: Bug#531515: ia32-apt-get: breaks dpkg --control (= 1.15.1) and debsums

2009-06-15 Thread Goswin von Brederlow
Hi,

thank you for starcing the problem. Too me it looks like debsums calls
dpkg-deb in an undocumented (although not uncommon for tools in
general) way:

4: /usr/bin/dpkg-deb --control -- 
/var/cache/apt/archives/bzip2_1.0.5-2_amd64.deb /tmp/gD4mFRK2gm/DEBIAN

According to the manpage the syntax is:

-e, --control archive [directory]

There is no mention in the docs that dpkg-deb supports --. Maybe
because it is such a common option.

Your patch isn't correct though, at least not complete. Think of this
invocation:

dpkg-deb --control -- /var/cache/apt/archives/bzip2_1.0.5-2_amd64.deb

In that case, despite having 3 arguments, the DIR has to default to
$(pwd)/DEBIAN. I guess there is no way around fully scanning the
arguments and counting the valid bits. That should allow the use of
the -D option as well.

MfG
Goswin



-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#531515: [Pkg-ia32-libs-maintainers] Processed: Re: Bug#531515: ia32-apt-get: breaks dpkg --control (= 1.15.1) and debsums

2009-06-15 Thread Axel Beckert
Hi Goswin,

Goswin von Brederlow schrieb am Fri, Jun 12, 2009 at 09:20:32PM +0200:
 thank you for starcing the problem. Too me it looks like debsums calls
 dpkg-deb in an undocumented (although not uncommon for tools in
 general) way:

I don't think it's debsums. Debsums calls dpkg without --, see line
491 of debsums:

491 system 'dpkg', '--control', $deb, $control

But it doesn't call dpkg-deb, but dpkg (which is ok) and dpkg adds
this -- since 1.15.1.

 4: /usr/bin/dpkg-deb --control -- 
 /var/cache/apt/archives/bzip2_1.0.5-2_amd64.deb /tmp/gD4mFRK2gm/DEBIAN
 
 According to the manpage the syntax is:
 
 -e, --control archive [directory]

 There is no mention in the docs that dpkg-deb supports --.

Then it's a bug that it's not documented anywhere else than in the
dpkg 1.15.1 changelog entry:

  * When dpkg delegates to dpkg-query or dpkg-deb to do the actual work, add
the -- marker to explicitely document the end of options so that
arguments starting with a dash are not interpreted as options.
Closes: #293163
Thanks to Bill Allombert for the patch.

 Your patch isn't correct though, at least not complete. Think of this
 invocation:
 
 dpkg-deb --control -- /var/cache/apt/archives/bzip2_1.0.5-2_amd64.deb

There you are right. Missed that one.

 In that case, despite having 3 arguments, the DIR has to default to
 $(pwd)/DEBIAN. I guess there is no way around fully scanning the
 arguments and counting the valid bits.

Looks so to me now, too. :-/

Regards, Axel
-- 
/~\  Plain Text Ribbon Campaign   | Axel Beckert
\ /  Say No to HTML in E-Mail and News| a...@deuxchevaux.org  (Mail)
 X| a...@noone.org (Mail+Jabber)
/ \  I love long mails: http://email.is-not-s.ms/ | http://noone.org/abe/ (Web)



-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Processed: Re: Bug#531515: ia32-apt-get: breaks dpkg --control (= 1.15.1) and debsums

2009-06-09 Thread Debian Bug Tracking System
Processing commands for cont...@bugs.debian.org:

 reopen 531515 14
Bug#531515: ia32-apt-get: breaks dpkg --control (= 1.15.1) and debsums
'reopen' may be inappropriate when a bug has been closed with a version;
you may need to use 'found' to remove fixed versions.
Bug reopened, originator set to 14.

 tag 531515 + patch
Bug#531515: ia32-apt-get: breaks dpkg --control (= 1.15.1) and debsums
There were no tags set.
Tags added: patch

 kthxbye
Stopping processing here.

Please contact me if you need assistance.

Debian bug tracking system administrator
(administrator, Debian Bugs database)


-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#531515: ia32-apt-get: breaks dpkg --control (= 1.15.1) and debsums

2009-06-09 Thread Axel Beckert
reopen 531515 14
tag 531515 + patch
kthxbye

Hi Goswin,

I'm sorry, but this bug is back respectively still there.

I'm not sure why it did happen again for the first time only today
although I dist-upgrade that box at least once a day. But it was
reproducable here by calling /usr/bin/debsums --generate=nocheck -sp
/var/cache/apt/archives after the upgrade of bzip2 in Sid, either via
DPkg::Post-Invoke or manually.

François, maybe you can enlighten me in which situations debsums calls
dpkg --control and in which not... Although I do think I can reliably
reproduce this bug. (See below.)

With version 14 the bug now seems to be only an off-by-one bug.

I added the following two lines to your dpkg-deb wrapper right after
'set -e':

  echo $#: $0 $@
  set -x

Now the output is as follows:

# /usr/bin/debsums --generate=nocheck -sp /var/cache/apt/archives
4: /usr/bin/dpkg-deb --control -- 
/var/cache/apt/archives/bzip2_1.0.5-2_amd64.deb /tmp/gD4mFRK2gm/DEBIAN
+ case $1 in
+ case $# in
+ echo 'Unexpected number of arguments to --control'
Unexpected number of arguments to --control
+ exit 1
debsums: can't extract control info from
/var/cache/apt/archives/bzip2_1.0.5-2_amd64.deb

So for me it looks as if the two cases for (--control) should be 3 and
4, not 2 and 3, probably because --control is also counted as
parameter.

The following patch works for me:

--- /usr/bin/dpkg-deb   2009-06-04 11:19:02.0 +0200
+++ /usr/bin/dpkg-deb.patched   2009-06-09 18:22:42.0 +0200
@@ -5,8 +5,8 @@
 case $1 in
   (--control)
 case $# in
-  2) DIR=$(pwd)/DEBIAN; break;;
   3) DIR=$3; break;;
+  4) DIR=$4; break;;
   *) echo 2 Unexpected number of arguments to --control
  exit 1;;
 esac

With set -x still enabled I also saw both cases[1], with and without
--, so both, 3 and 4 worked for me. (It though later confused
dpkg/tar when piping the output of --fsys-tarfile to somewhere...
After removing the -x this worked fine again, too.)

[1] On calling /usr/bin/debsums --generate=nocheck -sp /var/cache/apt/archives
3: /usr/bin/dpkg-deb --control 
/var/cache/apt/archives/bzip2_1.0.5-2_amd64.deb /var/lib/dpkg/tmp.ci

On calling aptitude reinstall bzip2
4: /usr/bin/dpkg-deb --control -- 
/var/cache/apt/archives/bzip2_1.0.5-2_amd64.deb /tmp/pS0f3zhYUg/DEBIAN

To be sure the bug is gone with my patch, I did the following:

Downgrading bzip2 to testing and upgrading again to Sid with dpkg-deb
patched as above. This didn't cause the error.

After reinstalling version 14 of ia32-apt-get (and therefore removing
my patch) and then downgrading bzip2 to testing and upgrading again to
Sid caused the bug to reappear in both situations (downgrading and
upgrading).

Regards, Axel
-- 
Axel Beckert - a...@deuxchevaux.org - http://noone.org/abe/



--
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Processed: Re: Processed: Re: Bug#531515: ia32-apt-get: breaks dpkg --control (= 1.15.1) and debsums

2009-06-09 Thread Debian Bug Tracking System
Processing commands for cont...@bugs.debian.org:

 found 531515 14
Bug#531515: ia32-apt-get: breaks dpkg --control (= 1.15.1) and debsums
Bug marked as found in version 14.

 submitter 531515 Axel Beckert a...@deuxchevaux.org
Bug#531515: ia32-apt-get: breaks dpkg --control (= 1.15.1) and debsums
Changed Bug submitter from 14 to Axel Beckert a...@deuxchevaux.org.

 kthxbye
Stopping processing here.

Please contact me if you need assistance.

Debian bug tracking system administrator
(administrator, Debian Bugs database)


-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#531515: ia32-apt-get: breaks dpkg --control (= 1.15.1) and debsums

2009-06-04 Thread Francois Marier
On 2009-06-03 at 18:15:17, Goswin von Brederlow wrote:
 Francois, if you want to sponsor the upload:

Done.

I also took the liberty to bump the Standards-Version to 3.8.1 to fix a
lintian warning.

Cheers,
Francois



-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Processed: Bug#531515: ia32-apt-get: breaks dpkg --control (= 1.15.1) and debsums

2009-06-03 Thread Debian Bug Tracking System
Processing commands for cont...@bugs.debian.org:

 reassign 531515 ia32-apt-get 13
Bug#531515: debsums: dpkg-deb: Unexpected number of arguments to --control
Bug reassigned from package `debsums' to `ia32-apt-get'.

 severity 531515 critical
Bug#531515: debsums: dpkg-deb: Unexpected number of arguments to --control
Severity set to `critical' from `normal'

 retitle 531515 ia32-apt-get: breaks dpkg --control (= 1.15.1) and debsums
Bug#531515: debsums: dpkg-deb: Unexpected number of arguments to --control
Changed Bug title to `ia32-apt-get: breaks dpkg --control (= 1.15.1) and 
debsums' from `debsums: dpkg-deb: Unexpected number of arguments to --control'.

 kthxbye
Stopping processing here.

Please contact me if you need assistance.

Debian bug tracking system administrator
(administrator, Debian Bugs database)


-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Processed: Re: Bug#531515: ia32-apt-get: breaks dpkg --control (= 1.15.1) and debsums

2009-06-03 Thread Debian Bug Tracking System
Processing commands for cont...@bugs.debian.org:

 tag 531515 + pending
Bug#531515: ia32-apt-get: breaks dpkg --control (= 1.15.1) and debsums
There were no tags set.
Tags added: pending

 thanks
Stopping processing here.

Please contact me if you need assistance.

Debian bug tracking system administrator
(administrator, Debian Bugs database)


-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#531515: ia32-apt-get: breaks dpkg --control (= 1.15.1) and debsums

2009-06-03 Thread Goswin von Brederlow
tag 531515 + pending
thanks

ow...@bugs.debian.org (Debian Bug Tracking System) writes:

 Changed Bug title to `ia32-apt-get: breaks dpkg --control (= 1.15.1) and 
 debsums' from `debsums: dpkg-deb: Unexpected number of arguments to 
 --control'.

I didn't support the full commandline syntax of dpkg-deb --control.
Fixed now and uploaded to mentors.debian.net. It will be fixed in
Debian as soon as someone sponsors the upload.

Francois, if you want to sponsor the upload:

http://mentors.debian.net/cgi-bin/sponsor-pkglist?action=details;package=ia32-libs-tools

http://mentors.debian.net/debian/pool/main/i/ia32-libs-tools/ia32-libs-tools_14.dsc
http://mentors.debian.net/debian/pool/main/i/ia32-libs-tools/ia32-libs-tools_14.tar.gz

MfG
Goswin



-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org