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

Re: Again problem with pkg-order



Hi,
>>"Roman" == Roman Hodek <rnhodek@faui22c.informatik.uni-erlangen.de> writes:

>> Hmm. I don't think pkg-order takes care of replaces (or any kinds
>> of deinstalls, for that matter) directly.

Roman> In other words: pkg-order currently doesn't care that the same
Roman> package is in $installed and $candidates, right?

	Right. It looks first in the $candidates lists, so the
 dependency shall be satisfied with the $candidates package first (and
 there is a special cased warning if the $candidates lists is not
 internally consistent). The problem lies with conflicts, because a
 non-conflict with a candidates package does not register (it is a
 non-event), and then it goes and checks the $installed packages for a
 conflict, and bingo.

Roman> I already thought about removing the package from the
Roman> $installed list if it is also in $candidates, as a workaround.

	That would work, but I think that a ``ignore'' flag is
 cleaner, and maybe I can use it later for other things. Removing it
 may also be a problem for others who do not maintain a separate copy
 of the lists.

>> I guess for each package to be upgraded, and for all packages
>> removed because of a conflict & replace, all the installed packages
>> should be marked in some way so that they do not take part in
>> dependency checking, or in conflicts.
>> 
>> So, the idea is to present the list to the user, and if they cause
>> installed packages to be marked for deletion, call
>> $installed->mark("Package" => libreadline2, "Mark" => "delete");
>> (Note that this is not yet implemented).

Roman> This is basically the same as my workaround, except that the
Roman> objects aren't really deleted, only flagged so that they're
Roman> ignored. (It's for me no problem to re-add them later, because
Roman> I have second lists of the installed/to-be-installed packages.)

>> After one or more calls to mark, the pkg-ordering routine should be
>> run again to reflect the new status.

Roman> I do that anyway after each change to one of the lists. This is
Roman> slow and expensive, yes, but I currently don't see any other
Roman> way to get proper results... I guess it would be very hard to
Roman> do a "selective" dependency recalculation, right?

	Hard is an understatement. At the moment I can't think how it
 can be done (even theoretically). 

	I'm moving into my new house tomorrow, so this may take a
 while to get done (like a week or so).  

	manoj

-- 
 When a man who has been away a long time at last comes home safely
 from far away, his family, friends and acquaintances rejoice to see
 him back. In the same way, when a man who has done good goes from
 this world to the next, his good deeds receive him like relations
 welcoming a loved one back again. 219, 220
Manoj Srivastava               <url:mailto:srivasta@acm.org>
Mobile, Alabama USA            <url:http://www.datasync.com/%7Esrivasta/>


Reply to: