[Yum-devel] Equivalent to 'yum update' via Python API?
MacCana, Mike (London)
mmaccana at maninvestments.com
Mon Jun 1 12:40:43 UTC 2009
Yep, it helps me see how awesome you are Seth - worked like a charm.
Mike
-----Original Message-----
From: yum-devel-bounces at lists.baseurl.org [mailto:yum-devel-bounces at lists.baseurl.org] On Behalf Of Seth Vidal
Sent: 28 May 2009 14:33
To: yum development
Subject: Re: [Yum-devel] Equivalent to 'yum update' via Python API?
On Thu, 28 May 2009, MacCana, Mike \(London\) wrote:
> Hi folks,
>
> I was wondering what the equiavlent to a 'yum update' via the API was?
> I've read the various snippets and 5 minute guide, and have working
> functions to install individual apps, but I can't seem to locate the right functions in either the yum or cli modules.
>
import yum
my = yum.YumBase()
my.update()
my.resolveDeps()
my.processTransaction()
update() is call you're looking for.
If nothing is passed to update() then it will attempt to update all pkgs on the system.
update(self, po=None, requiringPo=None, **kwargs)
try to mark for update the item(s) specified.
po is a package object - if that is there, mark it for update,
if possible
else use **kwargs to match the package needing update
if nothing is specified at all then attempt to update everything
returns the list of txmbr of the items it marked for update
does this help?
-sv
**********************************************************************
Please consider the environment before printing this email or its attachments.
The contents of this email are for the named addressees only. It contains information which may be confidential and privileged. If you are not the intended recipient, please notify the sender immediately, destroy this email and any attachments and do not otherwise disclose or use them. Email transmission is not a secure method of communication and Man Investments cannot accept responsibility for the completeness or accuracy of this email or any attachments. Whilst Man Investments makes every effort to keep its network free from viruses, it does not accept responsibility for any computer virus which might be transferred by way of this email or any attachments. This email does not constitute a request, offer, recommendation or solicitation of any kind to buy, subscribe, sell or redeem any investment instruments or to perform other such transactions of any kind. Man Investments reserves the right to monitor, record and retain all electronic communications through its network to ensure the integrity of its systems, for record keeping and regulatory purposes.
Visit us at: www.maninvestments.com
TG0908
**********************************************************************
More information about the Yum-devel
mailing list