At the moment, Subject from DNF API does not supports groups. We can do: # package name dnf.subject.Subject("foo") # provides dnf.subject.Subject("libfoo.so()(64bit)") # file name dnf.subject.Subject("/usr/bin/foo") but this doesn't work: dnf.subject.Subject("@foogroup") It would be nice to have this feature so we can easily check whether is given item installed or not (using get_best_query() method), regardless what type it is (pacckage name, provides, file name or group).
FTR, actually, we probably could benefit from this feature in DNF as well but I personally consider the "@" character to be very DNF-CLI specific. Essentially, every client can choose how to differentiate between different arguments on its own. One can use e.g. "group:FooGroup" and "pkg:foo-pkg" etc. Also currently the Subject implementation (down to the hawkey library) knows nothing about the group concept (including the Query objects returned by Subject). So, from the implementation POV it does not make sense to extend Subject in this direction. Or at least it's a huge amount of work. But maybe we can support the use case somehow else. Or my team mates can outvote me :-)
Actually, we don't necessarily need it in Subject, if there is other simple way for groups we can use that one based on "@" character. Currently, we use subprocess.Popen from Python code (and relying on return code) to do the stuff, but we'd like to change it to cleaner solution.
We'd rather expose a refactored CompsQuery to make it easily handle installed and available groups/environments and at the meantime having the same API as base.sack.query().
*** Bug 1090292 has been marked as a duplicate of this bug. ***
This package has changed ownership in the Fedora Package Database. Reassigning to the new owner of this component.
Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.
In the description there is not written the user story, therefore I am not sure what you want to do with requested features, but I have some alternatives. DNF has a new method called base.install_spec() that accepts package and group specs from commandline. If the method does not found the match it returns an error. In DNF5 there are group, module query, or even install_spec() method therefore I guess that you can get what you want with a minimal code. Event log allows you to track problems with provided argument. Because I am not sure whether offered approaches resolves the issue, I am closing the issue with - insufficient data.