Description of problem: if dnf-plugins-core is install, it is not possible to run dnf group list dnf group info as non root Version-Release number of selected component (if applicable): 0.4.19 How reproducible: every time Steps to Reproduce: 1. dnf group list 2. 3. Actual results: Error: This command has to be run under the root user. Expected results: list the groups Additional info: dnf group list --noplugins works as a work around The problem is that the GroupCommand class is setting writes_rpmdb = True that triggers the noroot plugin. A solution could be to split the GroupCommand in 2, one with read only commands and one with the commands there is making changes to the system. Another one is to have an optional nowrite_rpmdb_subcmd = ['install', 'remove', .....] and change to noroot to look at writes_rpmdb = True and subcmd not in nowrite_rpmdb_subcmd
IT should have been :) nowrite_rpmdb_subcmd = ['list', 'info', .....]
Thanks Tim. This issue awaits the signups implementation and fix to bug 1062889.
Fixed by 680ad20.
group info & group list works as non root now, thanks All non-root group cmds gives a [Errno 13] Permission denied: '/var/lib/dnf/groups.json' this might confuse the user and give a number of bugzilla reports. group install xxxx is still broken in 0.5 THe issue is in def _install(self, extcmds): cnt = 0 types, patterns = self._split_extcmds(extcmds) for env in self._patterns2environments(patterns): cnt += self.base.environment_install(env, types) for grp in self._patterns2groups(patterns): cnt += self.base.group_install(grp, types) if not cnt: msg = _('No packages in any requested groups available to install.') raise dnf.cli.CliError(msg) self._patterns2environments will raise an a CliError("No relevant match for the specified xxxx") if xxxx is not an evironment id. the patterns2 helper uses by _patterns2groups & _patterns2environments should proberly not raise and CliError, it should be handled on a higher level. def _patterns2(fn, patterns, fltr): for pat in patterns: grps = fn(pat) cnt = 0 for grp in grps: if not fltr(grp): continue yield grp cnt += 1 if not cnt: msg = _("No relevant match for the specified '%s'.") msg = msg % to_unicode(pat) raise dnf.cli.CliError(msg)
Created attachment 883863 [details] fix for group install Fix for the group install not working isssue
Created attachment 883876 [details] Better patch
Created attachment 883877 [details] Better patch (wrong checkout)
Created attachment 883892 [details] fix for group install group remove also fixed demands.resolving set, so the packages are installed/removed
dnf-0.5.1-1.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/dnf-0.5.1-1.fc20
Package dnf-0.5.1-1.fc20, hawkey-0.4.14-1.fc20: * should fix your issue, * was pushed to the Fedora 20 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing dnf-0.5.1-1.fc20 hawkey-0.4.14-1.fc20' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2014-5937/hawkey-0.4.14-1.fc20,dnf-0.5.1-1.fc20 then log in and leave karma (feedback).
dnf-plugins-core-0.0.8-2.fc20, libsolv-0.6.1-1.git6d968f1.fc20, hawkey-0.4.16-1.fc20, dnf-0.5.2-1.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/libsolv-0.6.1-1.git6d968f1.fc20,hawkey-0.4.16-1.fc20,dnf-0.5.2-1.fc20,dnf-plugins-core-0.0.8-2.fc20
Package dnf-plugins-core-0.0.8-2.fc20, libsolv-0.6.1-1.git6d968f1.fc20, hawkey-0.4.16-1.fc20, dnf-0.5.2-1.fc20: * should fix your issue, * was pushed to the Fedora 20 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing dnf-plugins-core-0.0.8-2.fc20 libsolv-0.6.1-1.git6d968f1.fc20 hawkey-0.4.16-1.fc20 dnf-0.5.2-1.fc20' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2014-6789/libsolv-0.6.1-1.git6d968f1.fc20,hawkey-0.4.16-1.fc20,dnf-0.5.2-1.fc20,dnf-plugins-core-0.0.8-2.fc20 then log in and leave karma (feedback).
dnf-plugins-core-0.0.8-2.fc20, libsolv-0.6.1-1.git6d968f1.fc20, hawkey-0.4.16-1.fc20, dnf-0.5.2-1.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report.