Missing dependency to bash

Bug #487456 reported by Ari Hyttinen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
grub2 (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: grub2

Package installation scripts use #!/bin/bash.
Therefore package should pre-depend on bash, I assume?

Simple fix: add bash as pre-dependency to this.

Better fix, something that would be good for all packages: Installation scripts of essential packages should not depend on bash, dash should be enough!

Revision history for this message
Felix Zielcke (fzielcke) wrote : Re: [Bug 487456] [NEW] Missing dependency to bash

Am Dienstag, den 24.11.2009, 07:37 +0000 schrieb Ari Hyttinen:
> Public bug reported:
>
> Binary package hint: grub2
>
> Package installation scripts use #!/bin/bash.
> Therefore package should pre-depend on bash, I assume?
>
> Simple fix: add bash as pre-dependency to this.
>
> Better fix, something that would be good for all packages:
> Installation
> scripts of essential packages should not depend on bash, dash should
> be
> enough!
>

I'm not that familiar with the Ubuntu procedures so I can't really speak
for Ubuntu.
But in my karmic chroot bash is still essential and so according to
debian-policy which mostly applies as ubuntu-policy too AFAIK, it would
be wrong to depend on it.
If a Pre-Depends really would be needed for shell scripts then I think
this would be a real nightmare,
So IMO nothing needs to be changed at all.
Just wishlist to remove the bash dependency at all, but I don't think we
ever do this in Debian.

--
Felix Zielcke
Proud Debian Maintainer and GNU GRUB developer

Revision history for this message
Ari Hyttinen (ari-hyttinen-gmail) wrote :

Fair enough.

But note that I'm only suggesting that this limitation (installation
scripts should depend on a more limited set of utilities) would apply
to debs required to make system bootable and complete installation. So
I don't think there are many packages that would need to be changed
(grep bin/bash /var/lib/dpkg/info), and changes should be trivial.

I'm currently in a process of building a minimal Ubuntu, because I
want some available Ubuntu packages, and also want easy maintaining so
having a non-broken installation is a priority, but disk space is also
at premium. And I have to say, ubuntu-minimal is not *that* minimal...
Though I'm more irked at having to have perl installed (for debconf).

Though having a really minimal minimal installation would be helpful
for installers and live CDs too, not just embedded type PCs. But this
is wish list stuff, I agree.

2009/11/24 Felix Zielcke <email address hidden>:
> Am Dienstag, den 24.11.2009, 07:37 +0000 schrieb Ari Hyttinen:
>> Public bug reported:
>>
>> Binary package hint: grub2
>>
>> Package installation scripts use #!/bin/bash.
>> Therefore package should pre-depend on bash, I assume?
>>
>> Simple fix: add bash as pre-dependency to this.
>>
>> Better fix, something that would be good for all packages:
>> Installation
>> scripts of essential packages should not depend on bash, dash should
>> be
>> enough!
>>
>
> I'm not that familiar with the Ubuntu procedures so I can't really speak
> for Ubuntu.
> But in my karmic chroot bash is still essential and so according to
> debian-policy which mostly applies as ubuntu-policy too AFAIK, it would
> be wrong to depend on it.
> If a Pre-Depends really would be needed for shell scripts then I think
> this would be a real nightmare,
> So IMO nothing needs to be changed at all.
> Just wishlist to remove the bash dependency at all, but I don't think we
> ever do this in Debian.
>
> --
> Felix Zielcke
> Proud Debian Maintainer and GNU GRUB developer
>
> --
> Missing dependency to bash
> https://bugs.launchpad.net/bugs/487456
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in “grub2” package in Ubuntu: New
>
> Bug description:
> Binary package hint: grub2
>
> Package installation scripts use #!/bin/bash.
> Therefore package should pre-depend on bash, I assume?
>
> Simple fix: add bash as pre-dependency to this.
>
> Better fix, something that would be good for all packages: Installation scripts of essential packages should not depend on bash, dash should be enough!
>

Revision history for this message
Robert Millan (rmh-aybabtu) wrote :

That's nothing. In fact, to run grub-mkconfig you need *python*

$ grep -H lsb_release /etc/default/grub
/etc/default/grub:GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`

And all that just to do a trivial "echo Distroname" job. I suggest you focus on replacing python code first. Python takes more than double than bash!

But that's not all, debconf depends on *perl*!! Just check the size of libperl.so.5.10.0. There's definitely more profit in having cdebconf take over.

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

bash is Essential: yes, and therefore grub is actually *forbidden* from depending on it. (A pre-depends would be even more wrong.)

You're free to change this as you choose for embedded distributions, but as it stands this is not a bug in the grub2 packages. If the Debian grub2 folks want to use bash features, they're free to do so. For embedded distributions I would say that it's unusual to ship maintainer scripts in the image in the first place, so you could always configure everything on a more capable system and then rip bash out at the end.

Changed in grub2 (Ubuntu):
status: New → Invalid
Revision history for this message
Ari Hyttinen (ari-hyttinen-gmail) wrote :

First a disclaimer: even if below may sound like complaining, I do very much appreciate the work of core Ubuntu and Debian developers (as well as the whole community and upstream software developers), and I don't think they have any "obligation" to do things they don't think important or the right thing.

Colin: I actually now read the related part of Debian policy manual, which I of course should have done as the first thing. To nitpick, it's not that a package *must not* depend on an essential package, it just *should not* depend on it unless package requires a specific version number of an essential package, so it's not strictly forbidden. But according to the policy, the bug is invalid, thanks for closing it.

Related, if anybody feels passionate about following Debian Policy Manual, feel free to submit a bug against lsb-base (at least version 4.0-0ubuntu5). It depends on sed and ncurses-bin, both essential, without specifying version numbers, and this should "generally be considered a bug" as far as I can see ;-).

Related rant: essential depending on optional, or just dependencies going against priorities sounds quite wrong to me. The simplest solution could be having virtual packages to depend on, and then these could be provided by packages with lower priority than the package depending on the virtual package. Ideal solution would be to re-factor functionality or change package priorities so that "wrong way" dependencies disappear. Oh well, I guess this is a total non-issue in most cases.

About embedded installation of Ubuntu or another desktop distro: There are different kinds of embedded applications, and for some of them, being able to have a non-broken OS can be just about as big an advantage as having a non-broken OS for a LAMP server. Actually the embedded PC could end up being a LAMP server, among other things... In applications like this, ripping stuff out is just about as desirable as ripping essential stuff out of a "real" server installation. Emdebian Grip is a step in this direction, but it was unsuitable (read: much more work in the long run) in this case.

Also having custom versions of core packages like bash would be a pain when upgrading to 10.04 LTS soon, and would partially defeat the purpose of using an LTS version maintained by "somebody else".

Anyway, in this case the solution was to have normal Ubuntu installation, but move some stuff (like the maintainer scripts, docs etc) to a non-internal storage, which needs to be mounted only when OS maintenance is required. Seems to be quite an elegant and flexible solution so far, allowing "unlimited" space for maintenance and development stuff, while leaving plenty of room in the internal storage for future needs.

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.