Debian Bug report logs - #628574
menu should not ignore menu entries for packages that were configured once

Package: menu; Maintainer for menu is Bill Allombert <ballombe@debian.org>; Source for menu is src:menu.

Reported by: Raphaël Hertzog <hertzog@debian.org>

Date: Mon, 30 May 2011 09:00:03 UTC

Severity: normal

Tags: patch

Blocking fix for 628564: debhelper: dh_installmenu should no longer add the postinst/postrm snippet for registering menu entries

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, menu@packages.debian.org, Joey Hess <joeyh@debian.org>:
Bug#628564; Package debhelper. (Mon, 30 May 2011 09:00:07 GMT) Full text and rfc822 format available.

Acknowledgement sent to Raphaël Hertzog <hertzog@debian.org>:
New Bug report received and forwarded. Copy sent to menu@packages.debian.org, Joey Hess <joeyh@debian.org>. (Mon, 30 May 2011 09:00:09 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Raphaël Hertzog <hertzog@debian.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: debhelper: dh_installmenu should no longer add the postinst/postrm snippet for registering menu entries
Date: Mon, 30 May 2011 10:51:34 +0200
Package: debhelper
Version: 8.1.6
Severity: normal

I noticed that a simple package install triggers the menu trigger twice:
----
Preparing to replace zim 0.52-1 (using .../archives/zim_0.52-1_all.deb) ...
Unpacking replacement zim ...
Processing triggers for shared-mime-info ...
Processing triggers for menu ...
Processing triggers for desktop-file-utils ...
Processing triggers for man-db ...
Processing triggers for hicolor-icon-theme ...
Processing triggers for python-support ...
Processing triggers for gnome-menus ...
Setting up zim (0.52-1) ...
Processing triggers for python-support ...
Processing triggers for menu ...
----

The first one is because of the file trigger that dpkg activates. The second
one is because update-menus is called in the postinst. And update-menus runs
"dpkg-trigger --by-package=menu /usr/share/menu" if it sees that the dpkg lock
is active.

This is obviously counter-productive.

I thus believe that debhelper should no longer add the snippets for simple menu
files. Even oldstable has a menu with triggers support, thus I believe you
don't even have to care with backwards compatibility and/or partial upgrades.

Cheers,

PS: X-Debbugs-CC to menu@packages.debian.org set.

-- System Information:
Debian Release: wheezy/sid
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'proposed-updates'), (500, 'unstable'), (500, 'testing'), (500, 'stable'), (150, 'experimental')
Architecture: i386 (x86_64)

Kernel: Linux 2.6.38-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=fr_FR.utf8, LC_CTYPE=fr_FR.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages debhelper depends on:
ii  binutils              2.21.51.20110523-1 The GNU assembler, linker and bina
ii  dpkg-dev              1.16.1             Debian package development tools
ii  file                  5.04-5+b1          Determines file type using "magic"
ii  html2text             1.3.2a-15          advanced HTML to text converter
ii  man-db                2.6.0.2-1          on-line manual pager
ii  perl                  5.12.3-7           Larry Wall's Practical Extraction 
ii  perl-base             5.12.3-7           minimal Perl system
ii  po-debconf            1.0.16+nmu1        tool for managing templates file t

debhelper recommends no packages.

Versions of packages debhelper suggests:
ii  dh-make                       0.58       tool that converts source archives

-- no debconf information




Information forwarded to debian-bugs-dist@lists.debian.org, Joey Hess <joeyh@debian.org>:
Bug#628564; Package debhelper. (Mon, 30 May 2011 09:30:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Bill Allombert <Bill.Allombert@math.u-bordeaux1.fr>:
Extra info received and forwarded to list. Copy sent to Joey Hess <joeyh@debian.org>. (Mon, 30 May 2011 09:30:11 GMT) Full text and rfc822 format available.

Message #10 received at 628564@bugs.debian.org (full text, mbox):

From: Bill Allombert <Bill.Allombert@math.u-bordeaux1.fr>
To: Raphaël Hertzog <hertzog@debian.org>, 628564@bugs.debian.org
Subject: Re: Bug#628564: debhelper: dh_installmenu should no longer add the postinst/postrm snippet for registering menu entries
Date: Mon, 30 May 2011 11:27:44 +0200
On Mon, May 30, 2011 at 10:51:34AM +0200, Raphaël Hertzog wrote:
> Package: debhelper
> Version: 8.1.6
> Severity: normal
> 
> I noticed that a simple package install triggers the menu trigger twice:
> ----
> Preparing to replace zim 0.52-1 (using .../archives/zim_0.52-1_all.deb) ...
> Unpacking replacement zim ...
> Processing triggers for shared-mime-info ...
> Processing triggers for menu ...
> Processing triggers for desktop-file-utils ...
> Processing triggers for man-db ...
> Processing triggers for hicolor-icon-theme ...
> Processing triggers for python-support ...
> Processing triggers for gnome-menus ...
> Setting up zim (0.52-1) ...
> Processing triggers for python-support ...
> Processing triggers for menu ...
> ----
> 
> The first one is because of the file trigger that dpkg activates. The second
> one is because update-menus is called in the postinst. And update-menus runs
> "dpkg-trigger --by-package=menu /usr/share/menu" if it sees that the dpkg lock
> is active.

Hello Raphaël,

This is an old, known, issue, see bug #518919.  Menu must be triggered after
the package is configured, not before. 

Currently the only way to achieve that is to add a call to dpkg-trigger in the
package postint.  This is the purpose of the debhelper snippet.

See wishlist bug #556104 against dpkg.

Cheers,
-- 
Bill. <ballombe@debian.org>

Imagine a large red swirl here. 




Information forwarded to debian-bugs-dist@lists.debian.org, Joey Hess <joeyh@debian.org>:
Bug#628564; Package debhelper. (Mon, 30 May 2011 10:54:22 GMT) Full text and rfc822 format available.

Acknowledgement sent to Raphael Hertzog <hertzog@debian.org>:
Extra info received and forwarded to list. Copy sent to Joey Hess <joeyh@debian.org>. (Mon, 30 May 2011 10:54:27 GMT) Full text and rfc822 format available.

Message #15 received at 628564@bugs.debian.org (full text, mbox):

From: Raphael Hertzog <hertzog@debian.org>
To: Bill Allombert <Bill.Allombert@math.u-bordeaux1.fr>
Cc: 628564@bugs.debian.org
Subject: Re: Bug#628564: debhelper: dh_installmenu should no longer add the postinst/postrm snippet for registering menu entries
Date: Mon, 30 May 2011 12:52:47 +0200
[Message part 1 (text/plain, inline)]
clone 628564 -1
reassign -1
retitle -1 menu should not ignore menu entries for packages that were configured once
tag -1 + patch
thanks

On Mon, 30 May 2011, Bill Allombert wrote:
> This is an old, known, issue, see bug #518919.  Menu must be triggered after
> the package is configured, not before. 
> 
> Currently the only way to achieve that is to add a call to dpkg-trigger in the
> package postint.  This is the purpose of the debhelper snippet.

Then you should drop the file trigger in the first place and use a named
trigger. It's ridiculous to run it twice, once to drop the menu entry and
once to add it back. In particular when most upgraded applications work
just fine while being unpacked.

But I really think it's a bug of menu... I share completely the remarks
of Joey in http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=518919#15

In particular, the dpkg states precisely mean "your package is not
configured, it might not work" and if menu entries do not work when a
package is not in installed state, it's sort of to be expected.
When your system is not clean, your priority is to bring it back to a
clean state and hiding the fact that it's not clean is counter-productive.

But if you really want to keep doing something like this, then as an
intermediary solution I suggest you do not ignore packages which are not
configured but that were already configured once. You can detect those
packages since they have a non-empty "Config-Version" field.

And the postinst snippet would then only record the trigger for the
initial installation of the package. And the postrm snippet would no
longer be needed either.

Tentative untested patch for update-menus attached. I tested the sed
invocation this way:
$ echo -e "install ok unpacked  foo 0.1\ninstall ok installed baz, baz2 bar \ninstall ok unpacked foo2 "| sed -e "/^.* installed / b select; /[^ ]$/ b select; d; :select {s/^[^ ]* [^ ]* [^ ]* //; s/ [^ ]*\$//; s/[, ][, ]*/\n/g; p; d};"

foo
baz
baz2
bar
$ 

Cheers,
-- 
Raphaël Hertzog ◈ Debian Developer

Follow my Debian News ▶ http://RaphaelHertzog.com (English)
                      ▶ http://RaphaelHertzog.fr (Français)
[patch (text/plain, attachment)]

Bug 628564 cloned as bug 628574. Request was from Raphael Hertzog <hertzog@debian.org> to control@bugs.debian.org. (Mon, 30 May 2011 10:54:30 GMT) Full text and rfc822 format available.

Changed Bug title to 'menu should not ignore menu entries for packages that were configured once' from 'debhelper: dh_installmenu should no longer add the postinst/postrm snippet for registering menu entries' Request was from Raphael Hertzog <hertzog@debian.org> to control@bugs.debian.org. (Mon, 30 May 2011 10:54:33 GMT) Full text and rfc822 format available.

Added tag(s) patch. Request was from Raphael Hertzog <hertzog@debian.org> to control@bugs.debian.org. (Mon, 30 May 2011 10:54:33 GMT) Full text and rfc822 format available.

Bug reassigned from package 'debhelper' to 'menu'. Request was from Raphaël Hertzog <hertzog@debian.org> to control@bugs.debian.org. (Mon, 30 May 2011 12:21:13 GMT) Full text and rfc822 format available.

Bug No longer marked as found in versions debhelper/8.1.6. Request was from Raphaël Hertzog <hertzog@debian.org> to control@bugs.debian.org. (Mon, 30 May 2011 12:21:14 GMT) Full text and rfc822 format available.

Added indication that bug 628574 blocks 628564 Request was from Raphael Hertzog <hertzog@debian.org> to control@bugs.debian.org. (Mon, 30 May 2011 16:09:08 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Fri Apr 18 14:26:30 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.