Skip to content
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

comps: Fix marking a group package as installed (RhBug:2066638) #1995

Merged
merged 1 commit into from
Sep 25, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions dnf/comps.py
Original file line number Diff line number Diff line change
Expand Up @@ -673,8 +673,9 @@ def _group_install(self, group_id, pkg_types, exclude=None, strict=True, exclude
raise CompsError(_("Group id '%s' does not exist.") % ucd(group_id))

swdb_group = self.history.group.new(group_id, comps_group.name, comps_group.ui_name, pkg_types)
for i in comps_group.packages_iter():
swdb_group.addPackage(i.name, False, Package._OPT_MAP[i.type])
for pkg in comps_group.packages_iter():
pkg_installed = self.history.swdb.getPackageCompsGroups(pkg.name) != ()
swdb_group.addPackage(pkg.name, pkg_installed, Package._OPT_MAP[pkg.type])
self.history.group.install(swdb_group)

trans = TransactionBunch()
Expand Down Expand Up @@ -712,8 +713,9 @@ def _group_upgrade(self, group_id):

# create a new record for current transaction
swdb_group = self.history.group.new(group_id, comps_group.name, comps_group.ui_name, pkg_types)
for i in comps_group.packages_iter():
swdb_group.addPackage(i.name, False, Package._OPT_MAP[i.type])
for pkg in comps_group.packages_iter():
pkg_installed = self.history.swdb.getPackageCompsGroups(pkg.name) != ()
swdb_group.addPackage(pkg.name, pkg_installed, Package._OPT_MAP[pkg.type])
self.history.group.upgrade(swdb_group)

trans = TransactionBunch()
Expand Down
Loading