What does the ‘@’ mean in front of the repo name in `dnf list`

dnffedorapackage-managementrepository

When I want to list installed packages, I do it usually in one of two ways.

The old fashioned way is using rpm -qa | grep <whatever I look for>, and that's that.

But recently I wanted a more comprehensive display of my packages, and henceforth, I used dnf list --installed <whatever I look for>.

However when looking at the result there are a couple things I don't understand.

Consider this example:

# dnf list --installed zsh                  
Last metadata expiration check: 0:13:25 ago on Mon Jul 11 05:48:04 2016.
Installed Packages
zsh.x86_64            5.2-5.fc24            @@commandline

(spaces in actual printout are wider)

So the resulting entries, are: «package» «version» «repo».

In my example that's:

  • package: zsh.x86_64
  • version: 5.2-5.fc24
  • repo: @@commandline

So far the resulting table is understandable, but I'm confused what the two '@@' mean in front of the repo name.

Also, "commandline" suggests the package was installed from command line (downloading the RPM, and then doing dnf install whatever.rpm in the command line, etc.). However I'm pretty sure I've installed zsh via dnf install zsh.

But that's not all.

I've several packages on my system installed from the repo @System, @fedora (however there's also fedora without the @) and things like @@commandline.

So what does that @ or @@ exactly mean in front of the repo name?

And how come I've got so many prominent packages installed from @@commandline although I'm more than sure I've installed them from the repos?

Best Answer

Let me throw a brick to attract some jade here.

dnf list all | less shows all packages(including installed and available packages). The output has two sections: "Installed Packages" and "Available Packages". All "Installed Packages" are preceded by @ sign, while "Available Packages" are not. So I believe @ signs show the packages are installed. If a package is installed but its original repo was deleted, I guess @@ sign is given.

dnf source code is hosted at https://github.com/rpm-software-management/dnf. After downloading the src code, do a grep commandline -ri . in the directory and it returns nothing. However, its github page does mention this,

It does package management using RPM, libsolv and hawkey libraries.

So I look at hawkey, which is hosted under same project, at https://github.com/rpm-software-management/hawkey. Looking at its code by grep -ri commandline ., it does show some results.

./src/types.h:#define HY_CMDLINE_REPO_NAME "@commandline"
./hawkey.spec:- fix: commandline RPMs do not provide their files (RhBug:1112810) (Ales Kozumplik)

So commandline comes from hawkey package. As to question why @comandline is shown in dnf list command, my wild guess is dnf code fails to use hawkey properly.

Related Question