-
Notifications
You must be signed in to change notification settings - Fork 741
Fix Conflicting keyring values in app-vscode.sh #510
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
From what I understand, the problem occurs if the Microsoft VS Code repository has already been added to the APT sources and the VS Code installation script for Omakub is run. By not performing an existence check, you simply add another layer, creating a conflict. At this point, wouldn't it be enough to simply implement a check in the part where the repository is added that bypasses and switches to the VSCode installation if already present? This way, we avoid having to clean up and re-add it every time. |
I have taken a more gentle approach. |
@neidiom It's sufficient an initial check that only verifies whether the GPG keys and Microsoft repo have already been added. If so, it continues with the VSCode installation from APT; otherwise, it adds the mirrors first and then continues. This allows for much less clutter and keeps the code clean. |
@Kasui92 please check now. I wrapped the repo setup part into a function. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exactly! It all seems correct to me 👍🏻
This PR closes #521 |
Where is the other definition for vscode being added to the default that's producing the conflict? |
I was getting this error:
wget -qO- https://omakub.org/install | bash
________ __ .
__ \ _____ _____ | | ____ _ |_
/ | \ / __ \ | |/ / | \ __
/ | \ Y Y / __ | <| | / _\
_______ /|| (___ /|_ _/| /
/ / / / /
=> Omakub is for fresh Ubuntu 24.04+ installations only!
Begin installation (or abort with ctrl+c)...
E: Conflicting values set for option Signed-By regarding source https://packages.microsoft.com/repos/code/ stable: /etc/apt/keyrings/packages.microsoft.gpg != /usr/share/keyrings/microsoft.gpg E: The list of sources could not be read.
The Problem I Faced
When I first tried to run the installation, I immediately ran into a problem that had a conflict in the software sources. The repository for Microsoft VS Code was defined in more than one place, and these definitions were secured with two different, conflicting GPG keys. This created a deadlock; apt would refuse to do anything until the conflict was resolved, which in turn caused the installation script to fail right at the start.