On Fedora 31 (fresh install, I’m a new Linux user), I installed Visual Studio Code. The Discover software gave an error when I opened the rpm file in it, so I installed Code using the dnf command in the terminal. The program installed great, but I notice that when I list it, it shows “@commandline” as the repository. I assume because that’s how I installed it.
Now I came across the Visual Code repository on their website, and I’ve added it. It shows on my dnf repolist properly. My Code package (dnf list code) still shows it “@commandline”. How do I connect the package to the repository now?
You don’t. When an update comes, the package will replace the one you installed via dnf command and then it will show that comes from the repository. You can use the command dnf info code to check if there is another version. Also other thing you can do is to reinstall dnf reinstall code but IMHO you don’t need that.
Thanks for the response, but how will dnf know that there is an update? I mean, when I do “dnf update”, it won’t even check the Code repository since it is not in my repolist. Do I have to run dnf info for it to check?
BTW, I did reinstall code and that also did the trick, but I’m curious about the above anyway.
Yes, Discover didnt work for it, gives me a GPG bad signature, and a persistent warning about Appstream being set up (though I have that installed). That’s a separate issue.
I used dnf to install it directly from the terminal line. It worked find but showed commandline as the repository. I added the VS code repository afterward but I’m not sure if the Code package would ever be updated since dnf would not look for it since Code is not connected to it?
Though now that I think about it, dnf probably goes through all the installed packages and matches them against all the repositories, and would make the connection, changing “@commandline” —> “(code repository)”.
I’m just trying to understand Linux and packages/repositories. I think that last paragraph is correct?
If dnf identifies a package as being from @commandline, it is not a problem. Its alright. dnf is only saying that the package was installed from a terminal (command line) and not from a repository. When an updated version of the package becomes available in one of your configured repositories, the package will still be updated. After that update, dnf will then indicate the new source repository.
Relax … you’ll understand it when there is an update