Jump to content

deb822 format in /etc/apt/sources.list


saturnian

Recommended Posts

Has anybody here tried using the deb822 format in the /etc/apt/sources.list file (Debian, Ubuntu, etc.)?

 

Quote

This is a new format supported by apt itself since version 1.1. Previous versions ignore such files with a notice message as described earlier. It is intended to make this format gradually the default format, deprecating the previously described one-line-style format, as it is easier to create, extend and modify for humans and machines alike especially if a lot of sources and/or options are involved. Developers who are working with and/or parsing apt sources are highly encouraged to add support for this format and to contact the APT team to coordinate and share this work. Users can freely adopt this format already, but may encounter problems with software not supporting the format yet.

 

- https://manpages.debian.org/buster/apt/sources.list.5.en.html

 

 

I've haven't tried it out, but maybe it's time to get on board with it. Looks like Ubuntu has already switched to this format as of 20.10.

More info:

 

- https://man7.org/linux/man-pages/man5/deb822.5.html
- https://www.techrepublic.com/index.php/article/how-to-use-the-new-deb822-apt-format-on-ubuntu/
- https://repolib.readthedocs.io/en/latest/deb822-format.html

Link to comment
Share on other sites

First I heard of it. Certainly it's not in Testing or Unstable Debian yet.

Looks simple enough but less simple than the single-line format which I have never had problems with. I guess it must solve some mysterious niche issues that us plebs would not ever encounter.

Link to comment
Share on other sites

1 hour ago, sunrat said:

First I heard of it. Certainly it's not in Testing or Unstable Debian yet.

Looks simple enough but less simple than the single-line format which I have never had problems with. I guess it must solve some mysterious niche issues that us plebs would not ever encounter.

 

Well, I quoted from Buster manpages, and it says it's been supported by apt since version 1.1, so looks like it can be used in Testing and Unstable. I don't see info abut the deb822 format at the Debian wiki, though. It was mentioned a few years back at the Debian User Forums: http://forums.debian.net/viewtopic.php?t=138415

Link to comment
Share on other sites

securitybreach

Is there a benefit or is this just change for the sake of change? I do not see how changing from one line to multiple lines helps any. One of the links mention that it would make it easier to be readable by humans or machines but really it just complicates the simple method that worked for decades. Just my opinion

  • Agree 1
Link to comment
Share on other sites

2 hours ago, raymac46 said:

My old high school geometry teacher would call this "Compounding the Obvious." Must be something here I am not aware of....

I think your geo teach would file it under "The average propensity to change".  People who have been dealing with single line for years, will see no need to change.  But for new comers, having consistent line breaks could make it easier to check for typos.

  • +1 1
Link to comment
Share on other sites

9 hours ago, securitybreach said:

Is there a benefit or is this just change for the sake of change? I do not see how changing from one line to multiple lines helps any. One of the links mention that it would make it easier to be readable by humans or machines but really it just complicates the simple method that worked for decades. Just my opinion

 

Yeah, looking at the "Disadvantages" (of the old way) section (third link, above), I'm thinking that the deb822 format probably won't be all that helpful for your average desktop user. Not sure about that, though. It does look like somebody thinks it's a better idea, and that it isn't simply change for the sake of change. Maybe those who are using the new format are finding that they like it better. It seems to be easier to understand at a glance than the old one-line format, don't you think? When I get the chance, I'm gonna test it out on one of my Bullseye installations.

  • Agree 1
Link to comment
Share on other sites

Tested this out in Debian Bullseye (testing). Here are the lines I've been using in my old /etc/apt/sources.list file (now /etc/apt/sources.list-bkup) :

 

deb https://deb.debian.org/debian bullseye main contrib non-free
deb http://security.debian.org/debian-security bullseye-security main contrib non-free
deb https://deb.debian.org/debian bullseye-updates main contrib non-free

 

And here's the contents of the new /etc/apt/sources.list.d/debian.sources file:
 

Types: deb
URIs: https://deb.debian.org/debian
Suites: bullseye bullseye-updates
Components: main contrib non-free


Types: deb
URIs: http://security.debian.org/debian-security
Suites: bullseye-security
Components: main contrib non-free

 

Two sections instead of three lines. Seemed to work fine when I ran sudo apt update. This might not be such a bad change.

 

 

Edited by saturnian
  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...