You are not logged in.

#1 2020-08-21 17:20:31

rbh
Moderator
From: South of Lapplands inland
Registered: 2016-08-11
Posts: 1,921

Skript add-apt-repository fails

Hi!

The skript add-apt-repository, which is provided by the package software-properties-common, seems buggy.

It will not work on BL and KaliLinux among some debian derivates.

It is used to add third party repositories and Personal Package Archive (PPA) to your sources, from the commandline.

Adding third party repos, shuld be used very cautios. Avoid adding a PPA on productive machine...

More about Apt Sources on https://wiki.debian.org/SourcesList and

It is simple (and safer if the command will work in the future) to manualy add the repository to /etc/apt/sources.list or a new file
/etc/apt/sources.list.d/RepoName.list.

More about Apt Sources on https://wiki.debian.org/SourcesList and

$ man sources.list

(Maybee this can be moved to Annoyances and workarounds)

Last edited by rbh (2020-08-21 17:24:08)


// Regards rbh

Please read before requesting help: "Guide to getting help", "Introduction to the Bunsenlabs Lithium Desktop" and other help topics under "Help & Resources" on the BunsenLabs menu

Offline

#2 2020-08-21 19:04:20

damo
....moderator....
Registered: 2015-08-20
Posts: 6,734

Re: Skript add-apt-repository fails

rbh wrote:

...
(Maybee this can be moved to Annoyances and workarounds)

Apart from the fact that Bunsenlabs specifically emphasizes that adding PPA's is definitely NOT recommended. In fact, during the bl-welcome Introduction the user is required to type "I understand" after being warned.


Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#3 2020-08-21 19:14:06

rbh
Moderator
From: South of Lapplands inland
Registered: 2016-08-11
Posts: 1,921

Re: Skript add-apt-repository fails

I do not know, but suspects, that the script add-apt-repository, was developed particularly to ease adding ppa's.

But, nevermind that. I think we had three writing and asking about add-apt-repository, so  for some it is an anoyance but so easy to work around (or not use...).


// Regards rbh

Please read before requesting help: "Guide to getting help", "Introduction to the Bunsenlabs Lithium Desktop" and other help topics under "Help & Resources" on the BunsenLabs menu

Offline

#4 2020-08-21 20:33:54

rbh
Moderator
From: South of Lapplands inland
Registered: 2016-08-11
Posts: 1,921

Re: Skript add-apt-repository fails

twoion wrote:

The system surrounding add-apt-repository/software-properties-common is a mess;

So I have understood. I can not see it to be an high priority to fix it if it.


// Regards rbh

Please read before requesting help: "Guide to getting help", "Introduction to the Bunsenlabs Lithium Desktop" and other help topics under "Help & Resources" on the BunsenLabs menu

Offline

#5 2020-08-21 21:10:51

rbh
Moderator
From: South of Lapplands inland
Registered: 2016-08-11
Posts: 1,921

Re: Skript add-apt-repository fails

twoion wrote:

@rbh how does this work for you (regardless of the bugs in bunsen-os-release):

# Add a PPA from launchpad to the sources (including importing the keys, so like add-apt-repository) 
sudo ansible localhost -m apt_repository -a repo=ppa:nginx/stable

It throws some errors:

 [WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'

But, it creates /etc/apt/sources.list.d/ppa_nginx_stable_buster.list on my localhost...

localhost | FAILED! => {
    "changed": false,
    "msg": "E:The repository 'http://ppa.launchpad.net/nginx/stable/ubuntu buster Release' does not have a Release file."
}

So one knows that the entry is not usable, as the ppa does not contain any debian packages.

# Add a regular repo to the sources, it'll also run immediately apt-get update
sudo ansible localhost -m apt_repository -a 'repo="deb https://pkg.bunsenlabs.org/debian helium main"'

Yep, as I have not deleted nginx-ppa, it again complain about that. It created /etc/apt/sources.list.d/pkg_bunsenlabs_org_debian.list, with correct info.

Ansible can also be used to remove the repos again.

Quite competent program suite.

But, I prefer manualy editing sources...

Last edited by rbh (2020-08-21 21:12:15)


// Regards rbh

Please read before requesting help: "Guide to getting help", "Introduction to the Bunsenlabs Lithium Desktop" and other help topics under "Help & Resources" on the BunsenLabs menu

Offline

#6 2020-08-23 15:42:14

rbh
Moderator
From: South of Lapplands inland
Registered: 2016-08-11
Posts: 1,921

Re: Skript add-apt-repository fails

twoion wrote:

Fix released in bunsen-os-release 10.5.1 and bunsen-python-apt-template 10.5.1

Hm... I gave the command:

add-apt-repository --yes "https://adoptopenjdk.jfrog.io/adoptopenjdk/deb/ stretch main"

The result in sources.list was:

deb https://adoptopenjdk.jfrog.io/adoptopenjdk/deb/ lithium stretch main
# deb-src https://adoptopenjdk.jfrog.io/adoptopenjdk/deb/ lithium stretch main

"lithium" should not be added... The same result with repo for Virtulbox and webmin. Same with single or double quotes.

I'm more convinced than ever: add-apt-repository, should not be used...


// Regards rbh

Please read before requesting help: "Guide to getting help", "Introduction to the Bunsenlabs Lithium Desktop" and other help topics under "Help & Resources" on the BunsenLabs menu

Offline

Board footer

Powered by FluxBB