Skip to content

Document deb822 sources for Ubuntu 24.04 and later - #1885

Open
opensource-joe wants to merge 1 commit into
python:mainfrom
opensource-joe:docs/ubuntu-2404-deb822-sources
Open

Document deb822 sources for Ubuntu 24.04 and later#1885
opensource-joe wants to merge 1 commit into
python:mainfrom
opensource-joe:docs/ubuntu-2404-deb822-sources

Conversation

@opensource-joe

Copy link
Copy Markdown

Closes #1530.

The problem, reproduced

The Debian/Ubuntu tab tells you to enable source packages by editing /etc/apt/sources.list, either by adding a deb-src line or by uncommenting the ones already there.

On Ubuntu 24.04 that file is a four line stub, and its own comments explain why:

# Ubuntu sources have moved to the /etc/apt/sources.list.d/ubuntu.sources
# file, which uses the deb822 format. Use deb822-formatted .sources files
# to manage package sources in the /etc/apt/sources.list.d/ directory.

There is nothing to uncomment. A contributor who follows the guide as written reaches the next step and gets:

$ sudo apt-get build-dep python3
Reading package lists...
E: You must put some 'deb-src' URIs in your sources.list

Which is an unhelpful place to land on your first CPython build.

Verification

On Ubuntu 24.04.4 LTS, tested in both directions:

/etc/apt/sources.list as shipped 4 lines, all comments, zero deb-src lines to uncomment
apt-get build-dep -s python3 before the change E: You must put some 'deb-src' URIs in your sources.list
after adding deb-src to Types in ubuntu.sources and apt-get update resolves the full dependency set, through to python3-sphinx
host restored afterwards diff against the backup is identical, and build-dep fails again as before

Ubuntu's own generated ubuntu.sources documents the fix at line 21:

## Types: Append deb-src to enable the fetching of source package.

What changed

The 22.04 one-line instructions are kept, not replaced, since releases still using that format need them. The section now branches on which format the release uses, and names the file each one actually lives in.

I have not built the docs locally to check the rendering of the nested literal blocks inside the tab, so that is worth a glance in review.

Closes python#1530.

The dependency instructions tell you to uncomment `deb-src` lines in
/etc/apt/sources.list. On Ubuntu 24.04 that file is a four line stub whose
own comments say the sources have moved, and there is nothing to uncomment.
A contributor following the guide gets:

    E: You must put some 'deb-src' URIs in your sources.list

Verified on Ubuntu 24.04.4 LTS. `apt-get build-dep -s python3` fails exactly
as above with the file as shipped. Adding `deb-src` to the `Types` field in
/etc/apt/sources.list.d/ubuntu.sources and running `apt-get update` makes it
resolve. Ubuntu's own generated file documents this at line 21:

    ## Types: Append deb-src to enable the fetching of source package.

The 22.04 one-line instructions are kept rather than replaced, since releases
still using that format need them.
@python-cla-bot

Copy link
Copy Markdown

The following commit authors need to sign the Contributor License Agreement:

CLA not signed

@read-the-docs-community

read-the-docs-community Bot commented Aug 17, 2026

Copy link
Copy Markdown

@StanFromIreland

Copy link
Copy Markdown
Member

Why are you closing and re-opening? You also have to sign the CLA before we can review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Dependency installation on Ubuntu 24.04

2 participants