On Sun Sep 10, 2000 at 09:29:33AM -0400, pgeorges wrote:

> > I've written a perl script called rpmcheck which will compare your
> > locally installed rpms to a local mirror directory (or nfs).  It
> > doesn't check over FTP (yet), so it's not useful to everyone, but some
> > people may appreciate the script.  It can tell you what rpms need to
> > be upgraded to the current version in the mirror, or what new rpms
> > exist that you do not have installed.  It prompts you to
> > freshen/install depending on the mode you choose.
> 
> Nice. But : when I freshen a package, the scripts had not finish yet,
> and I get the
> prompt back, so you end up with a concurrency access to RPM database,
> like this :
> 
> U   MandrakeUpdate       VER 7.1-26mdk    -> 7.1-27mdk
> Freshen MandrakeUpdate (yes/NO)? yes
> MandrakeUpdate             
> ##################################################
> U   MySQL                VER 3.23.22-2mdk -> 3.23.23-1mdk
> Freshen MySQL (yes/NO)? yes
> cannot get exclusive lock on database
> error: cannot open /var/lib/rpm/packages.rpm                  
> 
> => because MandrakeUpdate install was not finished (checked with a quick
> 'ps ax')
> So, in that case, I have to restart the script ...

And you'll always get this with certain packages unless I add a sleep
call behind every freshen/install...  some packages do a lot more
"behind the scenes" stuff than others, so if I put in something like a
60 second delay, it'll drive people nuts...  =)  I don't know of any
other way to test this, but there is a perl library for RPM, so maybe
I should check that out and see if there's something in there that
will help... thanks for the feedback!

-- 
[EMAIL PROTECTED], OpenPGP key available on www.keyserver.net
// Danen Consulting Services    www.danen.net, www.freezer-burn.org
// MandrakeSoft, Inc.           www.linux-mandrake.com
1024D/FE6F2AFD   88D8 0D23 8D4B 3407 5BD7  66F9 2043 D0E5 FE6F 2AFD

Current Linux uptime: 2 days 22 hours 28 minutes.

Reply via email to