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

Re: Ordering



Hi,
>>"Jason" == Jason Gunthorpe <jgg@gpu.srv.ualberta.ca> writes:

Jason> On 8 Mar 1998, Manoj Srivastava wrote:

>> Hi, "Jason" == Jason Gunthorpe <jgg@gpu.srv.ualberta.ca> writes:

>> I think you need to have another layer in between ordering and
>> execution.
>> 
>> Let the ordering order all the unpacks and pass the list to a post
>> processing step.
>> 
>> When it gets there, evrything is in the correct order: even the
>> predependents dependents dependents ad infinitum.

Jason> This is where I started. But it does not handle Removal very
Jason> well, consider what the current algo does:

Jason> Notice it unpacked, but did not confugure dpkg-ftp to remove
Jason> the dependancy on libnet so that libnet could be removed
Jason> without a forcing option. Doing this with a single order pass
Jason> did not work out. I think it is more flexable to do the two
Jason> ordering stages, because it advoids most
Jason> depends+predepends+conflicts loops (depends are ignored during
Jason> unpacking)

	I don't understand this. What are the two passes again? 

>> Now, start unpacking, looking for flags. As soon as you hit a
>> configure now package (maybe becuase it is essential), you
>> configure everything to that point.

Jason> You can't because something may have been unpacked that cannot
Jason> yet be configured, ie dpkg-ftp in the above example. You have
Jason> to progressively consider each package to see if it's deps are
Jason> now met.
 
	This is bad. If I understand you correctly, this is an
 accident waiting to happen (but I may very easily be just very
 confused)
	
	Eiher the packages are ordered for install, or they are
 not. If they are not yet ordered, do no unpack anything.

	If they are indeed ordered, then yuo can stop at any point and
 configure everything upto that point; with the exception of a
 conflicts depends loop, which requires forcing.


Jason> No, I just let them fall wherever, if there is a loop (ie that
Jason> perl thing) then it will have to be solved in some way external
Jason> to the ordering code. If there is a straight depends/configure
Jason> loop then it is ignored, what can you do?
>>  Try and ignore the edge that is least critical? like ignore an
>> extra package in favour of a important package?

Jason> I wouldn't be sure how to go about finding them to decide using
Jason> your 2nd algorithm.

	You do this implicitly, by descending the children in the
 order of importance of the dependency. So you try descending
 predepends first, then you decend depends links, and optionally the
 weaker relationships can be descended.
 
Jason> Hm, again, run a recommends+depends ordering pass before the
Jason> depends before the conflits+predepends pass, that would take
Jason> care of most problems I think?

>> Before? I am confused. Each pass gets more strict? I have to
>> examine the multiple passes better.

Jason> Each pass orders different, the end result from a pass is a
Jason> fully correct order for the requirements in the pass. By
Jason> pre-ordering you take advantage of that fact that very few
Jason> packages actually have conflicts+predepends that require
Jason> attention.

	You can not actually take action on a conflicts/predepends
 pass, since you can have ordered the packages in an order that can
 not be installed.

	You have to consider all dependencies in any ordering pass
 that has to produce a valid, working order.

	This increases the possibilities of loops, yes, but you have
 to handle loops, not just ognore them.

Jason> Now, the question of the day is: how do you handle the
Jason> perl/perl-base loop? Can you just dpkg --remove perl;dpkg
Jason> --install perl-base;dpkg --unpack perl; ? Doing autodeconfigure
Jason> will probably cause problems, maybe we should use a --force
Jason> option ro remove perl?

	We use force. However, we check *all* relationships at one
 pass, so the ordering is *correct*

	It is my experience that you can not do partial ordering.

	manoj
-- 
 "Live or die, I'll make a million." Reebus Kneebus, before his jump
 to the center of the earth, Firesign Theater
Manoj Srivastava  <srivasta@acm.org> <http://www.datasync.com/%7Esrivasta/>
Key C7261095 fingerprint = CB D9 F4 12 68 07 E4 05  CC 2D 27 12 1D F5 E8 6E


Reply to: