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

dnf5daemon-server: Add RPM package Group attribute #1122

Merged
Merged
Show file tree
Hide file tree
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
6 changes: 5 additions & 1 deletion dnf5daemon-server/package.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ const std::map<std::string, PackageAttribute> package_attributes{
{"nevra", PackageAttribute::nevra},
{"full_nevra", PackageAttribute::full_nevra},
{"reason", PackageAttribute::reason},
{"vendor", PackageAttribute::vendor}};
{"vendor", PackageAttribute::vendor},
{"group", PackageAttribute::group}};

std::vector<std::string> reldeplist_to_strings(const libdnf5::rpm::ReldepList & reldeps) {
std::vector<std::string> lst;
Expand Down Expand Up @@ -188,6 +189,9 @@ dnfdaemon::KeyValueMap package_to_map(
case PackageAttribute::vendor:
dbus_package.emplace(attr, libdnf_package.get_vendor());
break;
case PackageAttribute::group:
dbus_package.emplace(attr, libdnf_package.get_group());
break;
}
}
return dbus_package;
Expand Down
3 changes: 2 additions & 1 deletion dnf5daemon-server/package.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ enum class PackageAttribute {
nevra,
full_nevra,
reason,
vendor
vendor,
group
};

dnfdaemon::KeyValueMap package_to_map(
Expand Down
Loading