On Wed, 2 Jul 2003 18:27:29 +1200
Michael Adams <[EMAIL PROTECTED]> wrote:

> On 01 Jul 2003 15:51:18 -0700
> James Sparenberg <[EMAIL PROTECTED]> wrote:
> 
> > On Tue, 2003-07-01 at 14:57, Pierre Fortin wrote:
> > > On 01 Jul 2003 14:45:24 -0700 James Sparenberg
> > > <[EMAIL PROTECTED]> wrote:
> > > 
> > > > On Tue, 2003-07-01 at 13:37, Pierre Fortin wrote:
> > > > > On 01 Jul 2003 12:52:33 -0700 James Sparenberg
> > > > > <[EMAIL PROTECTED]> wrote:
> > > > > 
> > > > > > It works as expected.. the parent automatically dies and the
> > > > > > child continues it's run... Problem is when I put a similar
> > > > > > case into an RPM and it runs it.  It hangs.  RPM will not
> > > > > > continue until child runs it's course.  And all the time that
> > > > > > rpm #1 is open I can't start installing rpm #2 (the rpm
> > > > > > database does not multi-task.) grrrr.  Although rpm uses bash
> > > > > > shell scripts it sure doesn't use them correctly.
> > > > > 
> > > > > Sorry, I don't follow all the threads...  From what you say
> > > > > here, I think what you are up against is DB locking...  and that
> > > > > won't be solved with multiple threads unless the DB allows it,
> > > > > which I doubt. Kinda sounds like the rpm DB is Linux' "registry"
> > > > > in this respect...
> > > > 
> > > > correct and if I can figure out how to make rpm start the auto
> > > > install script ... then release it to continue on it's merry way I
> > > > can cut installation time for my company by 40% Or at least the
> > > > time required to find out if all rpms install correctly.  (the rpm
> > > > in question takes about 80% of the total install time just waiting
> > > > for the script is spawns to run.) Not to disimilar to the
> > > > situation where you install a new  kernel.  It runs a number of
> > > > commands (such as install_kernel) that if there was a way to run
> > > > them ... then let the rpm command finish while they continue on
> > > > their own.  The system would be able to begin installing the next
> > > > rpm while the install_kernel command etc finished on it's own. 
> > > > You know the old theory ... you can do anything with software...
> > > > we'll, I'm trying to prove just that. *grin*
> > > 
> > > So you're gonna rip rpm apart and have it use separate DBs aligned
> > > with the package categories already defined by Mdk...  Cool!  :^)
> > > :^)
> > 
> > 
> > Not quite.... I'm trying to find a way to make rpm -Uvh spawn off
> > processes that allow the first rpm -Uvh to end, freeing up the rpmdb
> > to accept a new rpm -Uvh.  kinda like 
> > 
> > 
> >                     _ installation script for rpm1 running.
> >                    /
> >                   /
> > rpm -Uvh rpm1.rpm (rpm complets)         _ installation script rpm2
> >                     \                     /
> >                      \                   /
> >                       - rpm -Uvh rpm2.rpm (rpm completes)
> >                                             \
> >                                              \
> >                                               - rpm -Uvh rpm3.rpm
> > 
> > 
> > instead of the more linear process it is now.  I don't want to get
> > into rpm itself... but rather figure out how to spawn independent
> > processes rather than dependent ones.   Right now if in the rpm I put 
> > 
> > %postin
> > nohup /usr/local/bin/autoinstallscript1 > & 
> > 
> >  
> > 
> > RPM itself will wait no matter what for that command string to finish.
> > 
> > I don't want it to wait.  I want it to do anything else it has to do,
> > finish and not care what happens to the above command string.  I can
> > do this from a command line ... but for reasons beyond my ken when
> > bash commands are used in rpm they act differently.  
> > 
> > On your point.. yes ... I agree that rpm could more affectively handle
> > the database.  There is no reason why it should lock the db after it
> > figures out if all dependencies are met unless it's actively writing
> > to the db.  Data can be gathered and written asynchronously as easily
> > as it could be done synchronously so why not... but that's another
> > battle for another day.  
> > 
> > James
> > 
> 
> Wouldn't you run into trouble with databases. There is a built in
> interlock which only allows one instance to have rw access to a record
> at a time. Others may have read but not read-write access.
> 
> I'll explain it further with a joint bank account.
> Balance = $155.00
> 
> Scenario 1
> 12:55.02 - He accesses the account with his Eftpos card to pay for a
> bussiness lunch of $130.00 - Eftpos grabs the balance of $155.00 and
> prepares the transaction. 12:55.04 - She is at the 'ladies club' and
> also tries to pay for lunch at $125.00 - Eftpos grabs the balance of
> $155.00 and prepares teh transaction. 12:55.06 - His transaction
> completes and the balance is ammended. Now there is $25.00 in the
> account. 12:55.08 - Her transaction completes and the balance is
> ammended. $155.00 - $125.00 = $25.00 gets written back to the account as
> the balance overwriting the previous transaction and the bank is out of
> pocket. He gets a free lunch.
>  
> Scenario 2
> 12:55.02 - He accesses the account with his Eftpos card to pay for a
> bussiness lunch - a lock is placed until transaction completes. 12:55.04
> - She is at the 'ladies club' and also tries to pay for lunch. Read
> access only so the Eftpos says, try again. 12:55.06 - His transaction
> completes and the balance is ammended. Now there is $25.00 in the
> account. 12:55.11 - She tries again and finds there is only $25.00 in
> the cheque account so has to use the savings account.



Heh heh heh. I almost went to the USA, several years ago. Unfortunately
scenario 2 put paid to that idea. And the savings account was not in a
position to help out at that time. If anyone manages to work out how to
get around this locked db problem then I want to be the first to know!

You guys crack me up!


Janet Blankfield


"The ideal love affair is one conducted by post." JBS


-----------------------------
[EMAIL PROTECTED]
   ... life's a beach ...
-----------------------------

Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com

Reply via email to