Version 1 (modified by james, 9 years ago)
move from code snippets page

Search for which package(s) own a file on the system

my = yum.YumBase()
pkgs = my.rpmdb.whatProvides('/boot/vmlinuz-2.6.23.9-85.fc8', None, (None, None,None))
for pkg in pkgs:
    print pkg