dpkg postinst uses awk before it exists during bootstrap

Bug #1376590 reported by Goswin von Brederlow
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
dpkg (Ubuntu)
Fix Released
Undecided
Adam Conrad
Trusty
Won't Fix
Undecided
Unassigned
Utopic
Won't Fix
Undecided
Unassigned

Bug Description

O: Setting up dpkg (1.17.5ubuntu5.3) ...
P: Configuring package dpkg
D: Updating dpkg to status 3
O: dpkg: dpkg: dependency problems, but configuring anyway as you requested:
O: dpkg depends on libbz2-1.0; however:
O: Package libbz2-1.0 is not installed.
O: dpkg depends on libc6 (>= 2.14); however:
O: Package libc6 is not installed.
O: dpkg depends on liblzma5 (>= 5.1.1alpha+20120614); however:
O: Package liblzma5 is not installed.
O: dpkg depends on libselinux1 (>= 2.1.0); however:
O: Package libselinux1 is not installed.
O: dpkg depends on zlib1g (>= 1:1.1.4); however:
O: Package zlib1g is not installed.
O: dpkg depends on tar (>= 1.23); however:
O: Package tar is not installed.
O:
O: /var/lib/dpkg/info/dpkg.postinst: 79: /var/lib/dpkg/info/dpkg.postinst: awk: not found
O: dpkg: error processing package dpkg (--install):
O: subprocess installed post-installation script returned error exit status 127
O: Errors were encountered while processing:
O: dpkg
D: Status: 256
E: Internal error: install

The problem is that awk is a symlink to either mawk or gawk that is setup in their postinst script. But during bootstrap none of them have run yet so the link does not exist.

Tags: patch trusty
Revision history for this message
Goswin von Brederlow (goswin-v-b) wrote :
tags: added: trusty
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "Don't call migrate_multiarch_conffile on new installs" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Brian Murray (brian-murray) wrote :

Michael - Could you have a look at this?

Changed in dpkg (Ubuntu):
assignee: nobody → Michael Vogt (mvo)
Revision history for this message
Goswin von Brederlow (goswin-v-b) wrote :

In case you don't recognise the output it comes from cdebootstrap after adding trusty as another ubuntu suite.

Revision history for this message
moise7864 (gregory-siwhine) wrote :

This still occurs when using cdebootstrap and dpkg from trusty.

It still not possible to build an ubuntu rootfs from cdebootstrap, too bad.

Revision history for this message
Adam Conrad (adconrad) wrote :

Actually, wait. I was about to fix this, since it's trivial, but does cdebootstrap suffer from the same "only one dist" issue that debootstrap does? If so, a fixed postinst in trusty-updates will do you no good.

Changed in dpkg (Ubuntu):
assignee: Michael Vogt (mvo) → Adam Conrad (adconrad)
Revision history for this message
Goswin von Brederlow (goswin-v-b) wrote :

Yes it does, so fixing will have no instant effect. But it would fix it for the next point release and future releases at least.

Revision history for this message
Adam Conrad (adconrad) wrote :

I dropped that codepath entirely in vivid in 1.17.23ubuntu1, since it was only meant for transitions to trusty anyway. Ubuntu doesn't do point releases the same way as Debian (we don't merge -updates down into the release pocket at point releases), so fixing this for T/U will do no one any measurable amount of good, so I'll just WontFix the old releases.

Changed in dpkg (Ubuntu):
status: New → Fix Released
Changed in dpkg (Ubuntu Trusty):
status: New → Won't Fix
Changed in dpkg (Ubuntu Utopic):
status: New → Won't Fix
Revision history for this message
Adam Conrad (adconrad) wrote :

FWIW, this feels a bit like a bug/misfeature in cdebootstrap that it doesn't run postinsts in the same order as debootstrap (which doesn't show this bug). Being gross-hack-for-gross-hack compatible would seem like a worthwhile goal.

Then again, having a base system that's more robust against gross hacks being incompatible would also be a good thing. :P

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.