Re: recover from broken yum transaction

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

 



On Fri, 2008-09-12 at 09:54 +1200, Martin Langhoff wrote:

> That is not very useful for us. I don't worry so much about the
> machine being killed in the 'download stuff' part, bit AFAIK that's
> not part of the 'transaction'. When yum-complete-transaction is
> called, I am expecting it to work with the RPMs it has, and ensure
> anything it was trying to do gets done...

The transaction file is written out after the pkgs are downloaded, so
the transaction should complete just fine if the system hasn't changed
state dramatically. 


> WRT networking, in places like Peru my rule of thumb is that 50% of
> the servers will _not_ have internet. Package installations / upgrades
> are very likely to happen by sending out USB keys with a bunch of
> RPMs, and a GPG-signed script that triggers the yum process.

Then that won't be an issue at all, you'll have a local repo on the usb
key which yum can access. It won't even need -C b/c it will have
connectivity to the local file:/// based repo.


> yum supports -C... can yum-complete-transaction support -C as well?

it already does. - try it: yum-complete-transaction --help



> >>  - Is there an easy way to check for pending transactions?
> >
> > yum-complete-transaction checks for them itself
> 
> Yes, though it's useful to be able to check that for logging/reporting...


You can check with one call:
import yum.misc
yum.misc.find_unfinished_transactions()

if it returns a non-empty list then you have unfinished transactions.


> >>  - Does it have useful exit codes indicating whether it's done anything?
> >
> > If the results codes are not good enough we can fix that easily enough.
> 
> I am asking because checking the manpage and reading the source did
> not give me any hints as to exit codes. Neither does 'man yum' talk
> about exit codes except for the "check-update" command.

at this point yum should be returning 0 for any non-erroring exit and 1
for any error condition. Including rpm scriptlet failures.

That should also be true for yum-complete-transaction


-sv


-- 
fedora-devel-list mailing list
fedora-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-devel-list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux