Skip to content

Commit

Permalink
Add support for retrieving Group tag from package
Browse files Browse the repository at this point in the history
  • Loading branch information
Conan-Kudo authored and Jan Silhan committed Mar 21, 2016
1 parent 85826e1 commit 4fe26da
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/package.c
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,12 @@ hy_package_get_evr(HyPackage pkg)
return pool_id2str(pool, get_solvable(pkg)->evr);
}

const char *
hy_package_get_group(HyPackage pkg)
{
return solvable_lookup_str(get_solvable(pkg), SOLVABLE_GROUP);
}

const char *
hy_package_get_license(HyPackage pkg)
{
Expand Down
1 change: 1 addition & 0 deletions src/package.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ const char *hy_package_get_arch(HyPackage pkg);
const unsigned char *hy_package_get_chksum(HyPackage pkg, int *type);
const char *hy_package_get_description(HyPackage pkg);
const char *hy_package_get_evr(HyPackage pkg);
const char *hy_package_get_group(HyPackage pkg);
const char *hy_package_get_license(HyPackage pkg);
const unsigned char *hy_package_get_hdr_chksum(HyPackage pkg, int *type);
const char *hy_package_get_packager(HyPackage pkg);
Expand Down
1 change: 1 addition & 0 deletions src/python/package-py.c
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@ static PyGetSetDef package_getsetters[] = {
{"description", (getter)get_str, NULL, NULL,
(void *)hy_package_get_description},
{"evr", (getter)get_str, NULL, NULL, (void *)hy_package_get_evr},
{"group", (getter)get_str, NULL, NULL, (void *)hy_package_get_group},
{"license", (getter)get_str, NULL, NULL, (void *)hy_package_get_license},
{"packager", (getter)get_str, NULL, NULL, (void *)hy_package_get_packager},
{"reponame", (getter)get_str, NULL, NULL, (void *)hy_package_get_reponame},
Expand Down

0 comments on commit 4fe26da

Please sign in to comment.