Re: [Server-devel] recover from broken yum transaction

2008-09-11 Thread Seth Vidal
On Thu, 2008-09-11 at 09:53 +0200, Ahmed Kamal wrote:
 Trying rpm -Va, I am getting lots of these lines
 
 S.?./usr/bin/kblankscrn.kss
 S.?./usr/bin/kcminit
 S.?./usr/bin/kcminit_startup
 
 Basically, the size has changed, and the md5 check cannot be
 performed ?! I understand this is due to prelink, but that sux !
 This effectively kills the rpm -V functionality. Is it not possible to
 prelink binaries on the server before wrapping them into rpms ? Any
 suggested solution around this ?
 


You might consider reinstalling kdebase-workspace

yum reinstall kdebase-workspace

see if that works for you.

-sv


___
Server-devel mailing list
Server-devel@lists.laptop.org
http://lists.laptop.org/listinfo/server-devel


Re: [Server-devel] recover from broken yum transaction

2008-09-11 Thread Seth Vidal
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


___
Server-devel mailing list
Server-devel@lists.laptop.org
http://lists.laptop.org/listinfo/server-devel