Exemple #1
0
static void
advisory_fixture(void)
{
    fixture_yum();

    HyPackage pkg;
    HyAdvisoryList advisories;

    pkg = by_name(test_globals.sack, "tour");
    advisories = hy_package_get_advisories(pkg, HY_GT);

    advisory = hy_advisorylist_get_clone(advisories, 0);

    hy_advisorylist_free(advisories);
    hy_package_free(pkg);
}
Exemple #2
0
static void
advisorypkg_fixture(void)
{
    fixture_yum();

    DnfPackage *pkg;
    GPtrArray *advisories;
    DnfAdvisory *advisory;
    GPtrArray *pkglist;

    pkg = by_name(test_globals.sack, "tour");
    advisories = dnf_package_get_advisories(pkg, HY_GT);
    advisory = static_cast<DnfAdvisory *>(g_ptr_array_index(advisories, 0));
    pkglist = dnf_advisory_get_packages(advisory);
    advisorypkg = static_cast<DnfAdvisoryPkg *>(g_ptr_array_index(pkglist, 0));

    g_ptr_array_unref(pkglist);
    g_ptr_array_unref(advisories);
    g_object_unref(pkg);
}