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

Re: apt-get libsolv



(Re-send to list)

On Tue, Jun 17, 2014 at 5:44 PM, Michael Vogt <mvo@debian.org> wrote:
> On Tue, Jun 10, 2014 at 04:56:52PM +0100, Diarmuid O Briain wrote:
>> Hi,
> Hi,
>
>> I was asked as part of a course I am doing to look at DNF/Libsolv as is
>> part of the migration path for YUM in Fedora and if Debian based OS apt-get
>> / Aptitude needs replacement or adaption to incorporate hawkey/libsolv.
>>
>> I was wondering what are the thoughts of Debian developers in this ? What
>> is the development roadmap for apt-get etc...
>>
>> I would appreciate the thoughts of someone who knows something about this.
>
> The actual question was answered already by other but I would be
> interessted if something like libsolv could be used to order the
> install/upgrade too? Given that we run into various ordering problems
> every now and then it would be nice to have a different approach for
> this based on something like libsolv.

Yes you can.

The problem is encoding the ordering. My basic idea was to create n^2
different packages, where n is the number of actions. You then have
n^2 tuples (position, action) that define which action should be taken
at which position in the queue. Then you add the dependency
information. You can then encode the tuples as packages and the
constraints as Recommends.

Example. If a Pre-Depends on b, you want e.g. to have

(k, configure a) recommend n (k-1, configure b) OR (k-2, configure b)
OR (k-3, configure b) OR ... OR (0, configure b)

If a Conflicts with b you want to have

(k, unpack a) recommend n (k-1, remove b) OR (k-2, remove b) OR (k-3,
remove b) OR ... OR (0, remove b)

and maximise the number of recommends satisfied. You can do the same
for Depends and even Recommends, and just assign a larger weight to
the cases where the order does not matter that much, for example if a
depends on b, then you want to have "configure a" after "configure b",
but it is less important than having configure "a after unpack b". For
this to work, you do need to encode this directly in your target
representation and skip the packages idea, as we only have one level
(or maybe two, depending on solver) of optional dependencies for ESDP
interfaces.

-- 
Julian Andres Klode  - Debian Developer, Ubuntu Member

See http://wiki.debian.org/JulianAndresKlode and http://jak-linux.org/.


Reply to: