Recognize other kernel packages with provides
Remove installonlypkg use and check if other kernel types are provided Remove unneeded g_printerr statement Update src/libpriv/rpmostree-core.c Based on feedback Co-authored-by: Jonathan Lebon <jonathan@jlebon.com>
This commit is contained in:
parent
1bd69619eb
commit
2e58c19e33
@ -3869,20 +3869,21 @@ rpmostree_context_get_tmprootfs_dfd (RpmOstreeContext *self)
|
||||
return self->tmprootfs_dfd;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
pkg_name_is_kernel (const char *name)
|
||||
{
|
||||
const char *kernel_names[] = {"kernel", "kernel-core", "kernel-rt", "kernel-rt-core", NULL};
|
||||
return g_strv_contains (kernel_names, name);
|
||||
}
|
||||
|
||||
/* Determine if a txn element contains vmlinuz. TODO: Check via provides?
|
||||
/* Determine if a txn element contains vmlinuz via provides.
|
||||
* There's also some hacks for this in libdnf.
|
||||
*/
|
||||
static gboolean
|
||||
rpmte_is_kernel (rpmte te)
|
||||
{
|
||||
return pkg_name_is_kernel (rpmteN (te));
|
||||
const char *kernel_names[] = {"kernel", "kernel-core", "kernel-rt", "kernel-rt-core", NULL};
|
||||
rpmds provides = rpmdsInit (rpmteDS (te, RPMTAG_PROVIDENAME));
|
||||
while (rpmdsNext (provides) >= 0)
|
||||
{
|
||||
const char *provname = rpmdsN (provides);
|
||||
if (g_strv_contains (kernel_names, provname))
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* TRUE if a package providing vmlinuz changed in this transaction;
|
||||
|
Loading…
Reference in New Issue
Block a user