dpkg-maintscript-helper: warning: environment variable DPKG_MAINTSCRIPT_PACKAGE missing

Bug #706354 reported by dino99
104
This bug affects 23 people
Affects Status Importance Assigned to Milestone
AppArmor
Invalid
Undecided
Unassigned
apparmor (Ubuntu)
Confirmed
Undecided
Unassigned
debconf (Ubuntu)
Confirmed
Undecided
Unassigned
libreoffice (Ubuntu)
Confirmed
Undecided
Unassigned
lightdm (Ubuntu)
Confirmed
Low
Unassigned
ntp (Ubuntu)
Confirmed
Low
Unassigned

Bug Description

Binary package hint: dpkg

natty i386 updated

into a terminal, get this output:

oem@oem-desktop:~$ sudo dpkg-reconfigure apparmor
[sudo] password for oem:
dpkg-maintscript-helper: warning: environment variable DPKG_MAINTSCRIPT_NAME missing
dpkg-maintscript-helper: warning: environment variable DPKG_MAINTSCRIPT_PACKAGE missing
 * Starting AppArmor profiles

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: dpkg 1.15.8.7ubuntu2
ProcVersionSignature: Ubuntu 2.6.37-12.26-generic-pae 2.6.37
Uname: Linux 2.6.37-12-generic-pae i686
NonfreeKernelModules: nvidia
Architecture: i386
Date: Sat Jan 22 18:48:00 2011
ProcEnviron:
 LANGUAGE=fr_FR:fr:en_GB:en
 LANG=fr_FR.UTF-8
 LC_MESSAGES=fr_FR.utf8
 SHELL=/bin/bash
SourcePackage: dpkg

Revision history for this message
dino99 (9d9) wrote :
Revision history for this message
Hans Joachim Desserud (hjd) wrote :

Thanks for taking your time to report this issue and making Ubuntu better.

I get the same error message when running dpkg-reconfigure on Natty. Looks like the variables aren't set, though the reconfiguring seems to run without problems.

Changed in dpkg (Ubuntu):
status: New → Confirmed
Revision history for this message
Raphaël Hertzog (hertzog) wrote :

It's a bug in debconf. Debconf should set those variables. Alternatively apparmor can hardcode its package name in the postinst script.

affects: dpkg (Ubuntu) → debconf (Ubuntu)
Changed in apparmor:
status: New → Invalid
Revision history for this message
dino99 (9d9) wrote :

Still get these errors on Oneiric i386 A1
In failsafe mode booting i get: dpkg-maintscript-helper: error: couldn't identify the package

Changed in apparmor (Ubuntu):
status: New → Confirmed
Revision history for this message
Daniel Holbach (dholbach) wrote :

In a very quick analysis I found that all the packages (on my system) that use "if dpkg-maintscript-helper supports ..." are affected.

daniel@daydream:~$ grep dpkg-maintscript-helper /var/lib/dpkg/info/*.postinst | grep support
/var/lib/dpkg/info/apparmor.postinst:if dpkg-maintscript-helper supports rm_conffile; then
/var/lib/dpkg/info/libreoffice-common.postinst: if dpkg-maintscript-helper supports rm_conffile; then
/var/lib/dpkg/info/libreoffice-common.postinst: if dpkg-maintscript-helper supports mv_conffile; then
/var/lib/dpkg/info/lightdm.postinst:if dpkg-maintscript-helper supports mv_conffile; then
/var/lib/dpkg/info/ntpdate.postinst:if dpkg-maintscript-helper supports rm_conffile; then
/var/lib/dpkg/info/ntpdate.postinst:if dpkg-maintscript-helper supports mv_conffile; then
daniel@daydream:~$ sudo dpkg-reconfigure libreoffice-common
dpkg-maintscript-helper: warning: environment variable DPKG_MAINTSCRIPT_NAME missing
dpkg-maintscript-helper: warning: environment variable DPKG_MAINTSCRIPT_PACKAGE missing
dpkg-maintscript-helper: warning: environment variable DPKG_MAINTSCRIPT_NAME missing
dpkg-maintscript-helper: warning: environment variable DPKG_MAINTSCRIPT_PACKAGE missing
daniel@daydream:~$ sudo dpkg-reconfigure ntpdate
dpkg-maintscript-helper: warning: environment variable DPKG_MAINTSCRIPT_NAME missing
dpkg-maintscript-helper: warning: environment variable DPKG_MAINTSCRIPT_PACKAGE missing
dpkg-maintscript-helper: warning: environment variable DPKG_MAINTSCRIPT_NAME missing
dpkg-maintscript-helper: warning: environment variable DPKG_MAINTSCRIPT_PACKAGE missing
daniel@daydream:~$ sudo dpkg-reconfigure apparmor
dpkg-maintscript-helper: warning: environment variable DPKG_MAINTSCRIPT_NAME missing
dpkg-maintscript-helper: warning: environment variable DPKG_MAINTSCRIPT_PACKAGE missing
 * Starting AppArmor profiles Skipping profile in /etc/apparmor.d/disable: usr.bin.firefox
                                                                                                                                               [ OK ]
 * Reloading AppArmor profiles Skipping profile in /etc/apparmor.d/disable: usr.bin.firefox
                                                                                                                                               [ OK ]
daniel@daydream:~$

Package WITHOUT "if dpkg-maintscript-helper supports ..."

daniel@daydream:~$ sudo dpkg-reconfigure gedit
update-alternatives: /usr/bin/gedit wird verwendet, um /usr/bin/gnome-text-editor (gnome-text-editor) im Auto-Modus bereitzustellen.
daniel@daydream:~$

Changed in lightdm (Ubuntu):
status: New → Confirmed
Changed in ntp (Ubuntu):
status: New → Confirmed
Changed in libreoffice (Ubuntu):
status: New → Confirmed
Dave Walker (davewalker)
Changed in ntp (Ubuntu):
importance: Undecided → Low
Changed in lightdm (Ubuntu):
importance: Undecided → Low
status: Confirmed → Triaged
Revision history for this message
dino99 (9d9) wrote :

Actual Oneiric i386 b2 have the same issue (genuine packages)

Revision history for this message
dino99 (9d9) wrote :

Oneiric use debconf 1.5.40ubuntu1, while Sid have 1.5.41 (Debian ), please merge it.

Revision history for this message
dino99 (9d9) wrote :

On Oneiric i386 b2, get this issue for the first time today with midori 0.4.0-2. As a result, i cant open midori at all.

sudo dpkg-reconfigure midori
[sudo] password for oem:
dpkg-maintscript-helper: error: environment variable DPKG_MAINTSCRIPT_NAME is required

As it a debconf issue, i'm using debconf 1.5.40ubuntu1 package

Revision history for this message
Prasad Murthy (murthy) wrote :

This bug is in Oneiric Ocelot

Changed in lightdm (Ubuntu):
status: Triaged → Confirmed
Revision history for this message
Juan Simón (simonbcn) wrote :

Same problem in Oneiric 64 bits.

Revision history for this message
Andreas Müller (email-zeitsofa) wrote :

root@workstation:/home# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=11.10
DISTRIB_CODENAME=oneiric
DISTRIB_DESCRIPTION="Ubuntu 11.10"

root@workstation:/home# uname -a
Linux workstation 3.0.0-12-generic #20-Ubuntu SMP Fri Oct 7 14:50:42 UTC 2011 i686 i686 i386 GNU/Linux

dpkg-reconfigure lightdm
dpkg-maintscript-helper: warning: environment variable DPKG_MAINTSCRIPT_NAME missing
dpkg-maintscript-helper: warning: environment variable DPKG_MAINTSCRIPT_PACKAGE missing

and this bug are on low? *thumbs up*

Revision history for this message
tralala28 (tralala28) wrote :

paolo@HPMini:~$ cat /etc/lsb-release

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=11.10
DISTRIB_CODENAME=oneiric
DISTRIB_DESCRIPTION="Ubuntu 11.10"

paolo@HPMini:~$ uname -a

Linux HPMini 3.0.0-12-generic #20-Ubuntu SMP Fri Oct 7 14:50:42 UTC 2011 i686 i686 i386 GNU/Linux

paolo@HPMini:~$ sudo dpkg-reconfigure lightdm

dpkg-maintscript-helper: warning: environment variable DPKG_MAINTSCRIPT_NAME missing
dpkg-maintscript-helper: warning: environment variable DPKG_MAINTSCRIPT_PACKAGE missing

paolo@HPMini:~$

......... i do not like unity at all (kind of dislike it actually), i installed the gnome3 shell and also wanted to replace lightdm with gdm and i got the error above. (ps. if anybody knows an alternative way to do it instead of using dpkg-reconfigure, send me a pm; i'd appreciate a lot. :)

Revision history for this message
dino99 (9d9) wrote :

Actual output on Precise i386 with debconf 1.5.41ubuntu1

oem@oem-desktop:~$ sudo dpkg-reconfigure apparmor
dpkg-maintscript-helper: warning: environment variable DPKG_MAINTSCRIPT_NAME missing
dpkg-maintscript-helper: warning: environment variable DPKG_MAINTSCRIPT_PACKAGE missing

oem@oem-desktop:~$ grep dpkg-maintscript-helper /var/lib/dpkg/info/*.postinst | grep support
/var/lib/dpkg/info/apparmor.postinst:if dpkg-maintscript-helper supports rm_conffile; then
/var/lib/dpkg/info/desktop-base.postinst:if dpkg-maintscript-helper supports rm_conffile 2>/dev/null; then
/var/lib/dpkg/info/libreoffice-common.postinst: if dpkg-maintscript-helper supports rm_conffile; then
/var/lib/dpkg/info/libreoffice-common.postinst: if dpkg-maintscript-helper supports mv_conffile; then
/var/lib/dpkg/info/lightdm-gtk-greeter.postinst:if dpkg-maintscript-helper supports mv_conffile; then
/var/lib/dpkg/info/lightdm.postinst:if dpkg-maintscript-helper supports mv_conffile; then
/var/lib/dpkg/info/ntpdate.postinst:if dpkg-maintscript-helper supports rm_conffile; then
/var/lib/dpkg/info/ntpdate.postinst:if dpkg-maintscript-helper supports mv_conffile; then
/var/lib/dpkg/info/ntp.postinst:if dpkg-maintscript-helper supports rm_conffile; then
/var/lib/dpkg/info/ntp.postinst:if dpkg-maintscript-helper supports mv_conffile; then
/var/lib/dpkg/info/pcmciautils.postinst:if dpkg-maintscript-helper supports rm_conffile; then
/var/lib/dpkg/info/system-tools-backends.postinst:if dpkg-maintscript-helper supports mv_conffile; then
/var/lib/dpkg/info/tmux.postinst:if dpkg-maintscript-helper supports rm_conffile; then
/var/lib/dpkg/info/ttf-unifont.postinst:if dpkg-maintscript-helper supports rm_conffile 2>/dev/null; then

no longer affects: midori
Revision history for this message
Robert Yeckley (ryeckley82) wrote :

Thank you, Linux community, for maintaining a well-oiled operating system for me. I'm a multimedia guy and a musician, I CANNOT go without decent multimedia encoders/decoders and unified audio drivers for software. Anyway, I'm just a hack at programming, I'm no expert. I thought back to my MSDOS days, and applied it to UNIX. Here's the solution:

1) CHANGE YOUR GLOBAL VARIABLES

/etc/environment
---------------------
PATH=...
DPKG_MAINTVERSION_NAME="Ubuntu"
DPKG_MAINTVERSION_PACKAGE="[version of Ubuntu]"
---------------------
don't put in the brackets when you fill in version (lucid, maverick, natty, etc).

2) REBOOT IMMEDIATELY.

3) RUN "dpkg-reconfigure -a" one more time.

Revision history for this message
Roger Oakes (rogrpuma) wrote :

This is preventing me from successfully installing and using LibreOffice. Please upgrade importance and assign.

Revision history for this message
dino99 (9d9) wrote :

Actual output on Precise i386:

oem@oem-desktop:~$ sudo dpkg-reconfigure apparmor
[sudo] password for oem:
dpkg-maintscript-helper: error: couldn't identify the package

Revision history for this message
Colin Watson (cjwatson) wrote :

I should say, before this becomes widespread, that the workaround in comment 14 is entirely wrong: those aren't appropriate values for either DPKG_MAINTSCRIPT_NAME or DPKG_MAINTSCRIPT_PACKAGE, and there is no way to set those variables correctly in /etc/environment.

I've followed up to the Debian bug for this with a fresh set of patches to try to move this along.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.