Re: Finding installed packages and their repositories using python yum module

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Tim,
Yes, found the expected result.
Thank you!


On Sat, Mar 22, 2014 at 10:19 PM, Tim Lauridsen <tim.lauridsen@xxxxxxxxx> wrote:
you are looking for 

.ui_from_repo


TIm


On Thu, Mar 20, 2014 at 12:26 PM, Navid Shaikh <shaikhnavid14@xxxxxxxxx> wrote:
Hi,
I am using python yum module.
I am finding all installed packages in system and yum repositories, from which these RPMs
are installed.
From command line, I can see this using command:

$yum list installed

However when I am using python yum module, I can find the installed packages but
I am not able to find associated yum repository from which a package is installed.

Here is how I got the installed packages:


import yum

yb = yum.YumBase()
pkg_list = yb.doPackageLists(pkgnarrow="installed")
inst_pkg_list = pkg_list.installed

#Now I am trying to find if there is an attribute giving yum repository info for this package
rpm1 = inst_pkg_list[0]
rpm1.repoid
'installed'
#However, it returns 'installed', which is not yum repository name.


Where I am doing it wrong?
Any help is highly appreciated.

--
Regards,
Navid Shaikh

_______________________________________________
Yum mailing list
Yum@xxxxxxxxxxxxxxxxx
http://lists.baseurl.org/mailman/listinfo/yum



_______________________________________________
Yum mailing list
Yum@xxxxxxxxxxxxxxxxx
http://lists.baseurl.org/mailman/listinfo/yum




--
Regards,
Navid Shaikh | @SwordPhilic
_______________________________________________
Yum mailing list
Yum@xxxxxxxxxxxxxxxxx
http://lists.baseurl.org/mailman/listinfo/yum

[Index of Archives]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux