Skip to contentSkip to conversation

pkg_postinst_* not working anymore -> broken packages

DISCUSSION Koen Kooi 5 participants 12 messages Jun 8, 2008 – Jun 11, 2008

lore
Share & tools
lore

Koen Kooi

author
#0 lore raw

Hi,

Lately I have been wondering why things like avahi and umount don't work properly any more in angstrom 2008, and I found out why:

OE (and/or bitbake) ignores pkg_postinst_*

From avahi.inc:

pkg_postinst_avahi-daemon () {
        # can't do this offline
        if [ "x$D" != "x" ]; then
                exit 1
        fi
        grep "^avahi:" /etc/group > /dev/null || addgroup avahi
        grep "^avahi:" /etc/passwd > /dev/null || adduser 

--disabled-password --system --home /var/run/avahi-daemon --no-create-home avahi --ingroup avahi -g Avahi

        DBUSPID=`pidof dbus-daemon`

        if [ "x$DBUSPID" != "x" ]; then
                /etc/init.d/dbus-1 force-reload
        fi
}

In the rootfs:

root@efika:/usr/lib/opkg/info# cat avahi-daemon.postinst
#!/bin/sh
if test "x$D" != "x"; then
	OPT="-r $D"
else
	OPT="-s"
fi
update-rc.d $OPT avahi-daemon defaults 21 19

The same happens with the u-a calls for util-linux-(u)mount

This occurs with .dev + bitbake 1.8 head

regards,

Koen

author
#2 lore raw
Quoted 7 lines · Graeme Gregory
Quoted 5 lines · Koen Kooi

Hi,

Lately I have been wondering why things like avahi and umount don't work properly any more in angstrom 2008, and I found out why:

This is http://bugs.openembedded.net/show_bug.cgi?id=4316 ??

That is exactly the problem I'm seeing. It also narrows down which packages need a PR bump after it gets fixed.

regards,

Koen

author
#3 lore raw
Quoted 11 lines · Koen Kooi
Quoted 7 lines · Graeme Gregory
Quoted 5 lines · Koen Kooi

Hi,

Lately I have been wondering why things like avahi and umount don't work properly any more in angstrom 2008, and I found out why:

This is http://bugs.openembedded.net/show_bug.cgi?id=4316 ??

That is exactly the problem I'm seeing. It also narrows down which packages need a PR bump after it gets fixed.

The (incomplete) list of affected recipes:

alsa-state
angstrom-zeroconf-audio
asterisk
asterisk-core-sounds-en-alaw
asterisk-core-sounds-en-g729
asterisk-core-sounds-en-gsm
asterisk-core-sounds-en-ulaw
asterisk-extra-sounds-en-alaw
asterisk-extra-sounds-en-g729
asterisk-extra-sounds-en-gsm
asterisk-extra-sounds-en-ulaw
asterisk-moh-freeplay-alaw
asterisk-moh-freeplay-g729
asterisk-moh-freeplay-gsm
asterisk-moh-freeplay-ulaw
avahi
bacula-client
base-passwd
binutils
callweaver
changedfiles-modules
clamav
codec-engine
console-tools
crossword
cyrus-imapd
cyrus-sasl
dbus
dsplink
e2fsprogs
eglibc-package
exmap-console
fluxbox
foonas-init
glibc-package
gpe-helpviewer
gpe-mini-browser
gpe-session-scripts
gpe-session-scripts-phone
gpsd
h2200-bootloader
hostap-conf
iputils
ixp4xx-kernel
keylaunch-conf
libnss-mdns
librsvg
varous kernels
lirc-modules
logrotate-script
madwifi-modules
madwifi-ng
matchbox-keyboard-inputmethod
matchbox-sato
mnci-ramses
module-init-tools
modutils
multitap-pad
mysql
ncurses
ndisc6
net-snmp
netkit-tftpd
nokia770-init
nylon-scripts
nylon-statistics
openldap
openmoko-icon-theme-standard
openmoko-icon-theme-standard2
openmoko-icon-theme-standard2-qvga
openmoko-mediaplayer2
openmoko-session
openmoko-session2
openmoko-terminal
openprotium-init
openssh
opie-autorotateapplet
opie-batteryapplet
opie-brightnessapplet
opie-cardapplet
opie-cardmon
opie-clipboardapplet
opie-clockapplet
opie-dasher
opie-dvorak
opie-handwriting
opie-irdaapplet
opie-jumpx
opie-keyboard
opie-keyview
opie-kjumpx
opie-kpacman
opie-lockapplet
opie-memoryapplet
opie-multikey
opie-multikeyapplet
opie-networkapplet
opie-notesapplet
opie-pcmciaapplet
opie-pickboard
opie-pyquicklaunchapplet
opie-screenshotapplet
opie-taskbar-images
opie-ttf-support
opie-unikeyboard
opie-vmemo
opie-volumeapplet
opie-wirelessapplet
osso-application-installer
osso-core-config
ppp-dialin
ppp-dsl
prism2-firmware-update
ptim-helper
pulseaudio
qpf
rp-pppoe
sato-icon-theme
sgml-common
shared-mime-info
sharp-compat-libs
slugos-init
syslog-ng
sysvinit
ttf
u-boot
uim
unionroot-utils
update-modules
usb-gadget-mode
util-linux
util-linux-ng
vsftpd-charconv
wifi-radar
xorg-font-common

author
#4 lore raw
In reply to Koen Kooi
Quoted 6 lines · Koen Kooi

Hi,

Lately I have been wondering why things like avahi and umount don't work properly any more in angstrom 2008, and I found out why:

OE (and/or bitbake) ignores pkg_postinst_*

FWIW, if you see a recipe doing this:

pkg_postinst() {
<content>
}

then kill it with fire! pkg_postinst() will apply to *each* and *every* entry in PACKAGES, so ${PN}-dev and ${PN}-doc as well as ${PN}-dbg will get the postinsts in their control files.

#5 lore raw
In reply to Koen Kooi

Any chance of getting bitbake commit r1072 backed out soon (the one that broke the postins* scripts), because for now pinning to r1071 is pretty much the only sane way to get a sane build environment?

Cheers,
Jeremy

author
#6 lore raw
Quoted 3 lines · Jeremy Lainé

Any chance of getting bitbake commit r1072 backed out soon (the one that broke the postins* scripts), because for now pinning to r1071 is pretty much the only sane way to get a sane build environment?

r1075 does that. Various package alsa have had a PR bump to fix downstream feeds.

regards,

Koen

Quoted 3 lines

Cheers,
Jeremy

#7 lore raw
In reply to Jeremy Lainé
Quoted 3 lines · Jeremy Lainé

Any chance of getting bitbake commit r1072 backed out soon (the one that broke the postins* scripts), because for now pinning to r1071 is pretty much the only sane way to get a sane build environment?

As already mentioned, its already gone.

My current bitbake plans are something like:

a) Merge some kind of environment sanity patches
b) Some testing to make sure the above doesn't break anything (a week?)
c) Release bitbake 1.8.12

Are there any other open bitbake issues we need to account for before we make a new release?

Cheers,

Richard

#8 lore raw

Hello Richard,

Quoted 4 lines · Richard Purdie

On Tue, 2008-06-10 at 21:26 +0200, Jeremy Lainé wrote:
Are there any other open bitbake issues we need to account for before we make a new release?

I would like to re-issue the problem where bitbake gives an ERROR that multiple packages provide something and that bitbake then happily starts building two packages.

Even though the user has specified one.
In one case this happens even when the user has specified a specific provider but that provider is somehow not fully "providing something but should".

After the two packages built, there is no way to get rid of this behaviour.

Regards,

Signature · 1 line
Leon
#9 lore raw
Quoted 10 lines · Leon Woestenberg

I would like to re-issue the problem where bitbake gives an ERROR that multiple packages provide something and that bitbake then happily starts building two packages.

Even though the user has specified one.
In one case this happens even when the user has specified a specific provider but that provider is somehow not fully "providing something but should".

After the two packages built, there is no way to get rid of this behaviour.

This last bit is no longer true, bitbake now no longer looks for the populate_staging stamps to influence its choice of providers making builds more deterministic. To put this another way, bitbake no longer cares whether packages have built or not, it no longer influences it.

I guess what you're suggesting is that the "multiple packages provide something" error should be fatal. I seem to remember trying this and people were not happy. That warning is still experimental and I'd probably prefer to leave it as an error for now, perhaps considering making it fatal for the release after next?

Cheers,

Richard

author
#10 lore raw
Quoted 17 lines · Richard Purdie
Quoted 10 lines · Leon Woestenberg

I would like to re-issue the problem where bitbake gives an ERROR that multiple packages provide something and that bitbake then happily starts building two packages.

Even though the user has specified one.
In one case this happens even when the user has specified a specific provider but that provider is somehow not fully "providing something but should".

After the two packages built, there is no way to get rid of this behaviour.

This last bit is no longer true, bitbake now no longer looks for the populate_staging stamps to influence its choice of providers making builds more deterministic. To put this another way, bitbake no longer cares whether packages have built or not, it no longer influences it.

Quoted 5 lines

I guess what you're suggesting is that the "multiple packages provide something" error should be fatal. I seem to remember trying this and people were not happy. That warning is still experimental and I'd probably prefer to leave it as an error for now, perhaps considering making it fatal for the release after next?

The problem case Leon and I are seeing:

Multiple kernel recipes are getting built when doing 'bitbake
something', which makes builds fail, or worse, succeed and you end up with bogus kernels for your machine.

In the past we have worked around it by adding COMPATIBLE_MACHINE to each kernel (people should do that, yes, I'm looking at you, linux-bd-neon). But now we have linux_<version>.bb that are meant to be reused, we are stuck with this 'feature' again.

Maybe we should special case recipes that do 'inherit kernel'?

regards,

Koen

#11 lore raw
Quoted 5 lines · Koen Kooi

The problem case Leon and I are seeing:

Multiple kernel recipes are getting built when doing 'bitbake
something', which makes builds fail, or worse, succeed and you end up with bogus kernels for your machine.

Ouch, thats bad :(.

Quoted 6 lines

In the past we have worked around it by adding COMPATIBLE_MACHINE to each kernel (people should do that, yes, I'm looking at you, linux-bd-neon). But now we have linux_<version>.bb that are meant to be reused, we are stuck with this 'feature' again.

Maybe we should special case recipes that do 'inherit kernel'?

Lets find the real problem. Do we know which dependency is causing the problem? What is one recipe providing which the other isn't? There has to be a reason bitbake is doing this, we just need to work out what it is. That can be hard unfortunately and we need to improve on that...

Cheers,

Richard