bash-dev package?

Asked by JVD on 2019-07-11

Please publish some 'bash-dev' package that provides the
headers necessary to build bash built-ins for the current
'bash' , eg. in /usr/include/bash .

I am sure there used to be one in an earlier Ubuntu release ,
but 'dpkg -l bash-dev' now produces no results for Ubuntu bionic 18.04 LTS,
and the bash package web-page does not mention one either .

Is there a 'bash-dev' package ? If so, please let me know how to get it -
if not, please consider publishing one , & do not deny users the tremendous
pleasure of developing bash built-ins.

Thanks, Jason

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu bash Edit question
Assignee:
No assignee Edit question
Solved by:
JVD
Solved:
2019-07-11
Last query:
2019-07-11
Last reply:
2019-07-11
Manfred Hampl (m-hampl) said : #1

There is a package bash-builtins (in universe) with several /usr/include/bash/*.h files.

The description on https://launchpad.net/ubuntu/+source/bash tells
bash-builtins: Bash loadable builtins - headers & examples

Is this what you are looking for?

JVD (jason-vas-dias) said : #2

But why don't I see that package ? :
    $ dpkg -l 'bash*'
    Desired=Unknown/Install/Remove/Purge/Hold
    | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
    |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
    ||/ Name Version Architecture Description
+++-================================-=====================-=====================-=====================================================================
    ii bash 4.4.18-2ubuntu1.2 amd64 GNU Bourne Again SHell
    ii bash-completion 1:2.8-1ubuntu1 all programmable completion for the bash shell
   un bash-doc <none> <none> (no description available)

There is no 'bash-builtins' package by default .

Do I need to add some special repository to sources.list ? My sources.list is:

$ grep '^deb' /etc/apt/sources.list
deb http://us.archive.ubuntu.com/ubuntu/ bionic main restricted
deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
deb http://us.archive.ubuntu.com/ubuntu/ bionic universe
deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates universe
deb http://us.archive.ubuntu.com/ubuntu/ bionic multiverse
deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates multiverse
deb http://us.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu bionic-security main restricted
deb http://security.ubuntu.com/ubuntu bionic-security universe
deb http://security.ubuntu.com/ubuntu bionic-security multiverse
deb http://uk.archive.ubuntu.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://uk.archive.ubuntu.com/ubuntu/ bionic main restricted universe multiverse
deb http://uk.archive.ubuntu.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://uk.archive.ubuntu.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://uk.archive.ubuntu.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://uk.archive.ubuntu.com/ubuntu/ bionic-updates main restricted universe multiverse

Why isn't 'bash-builtins' included in any of the standard repositories ?

Manfred Hampl (m-hampl) said : #4

dpkg lists only the packages that are installed.

Please provide the output that you receive for the commands

sudo apt update
apt-cache policy bash-builtins

JVD (jason-vas-dias) said : #5

Now I'm really confused - if 'dpkg -l' lists only packages that are installed,
what is the meaning of the line it emits:
'un bash-doc <none> <none> (no description available)' -
doesn't the 'un' prefix mean 'uninstalled' ?
I thought it always used to show installed and available packages.

OK, I see 'apt-cache policy bash-builtins' and 'apt list "bash*"' do show
the bash-builtins package.

I guess I should just be using 'apt list' instead of 'dpkg -l' .

Thanks!

Manfred Hampl (m-hampl) said : #6

The dpkg list command is a bit tricky. Depending on parameters is will omit uninstalled packages from the listing, or it will list them.
The meaning of 'un' is:
u - desired status unknown
n - not installed