On Wednesday 17 July 2013 09:15:13 Chen, Gui wrote:
> Hi list,
>
> I am trying to create a chroot with libzypp, and I found when I need to
> remove a package and this package is part of a pattern which will be
> installed, the dependencies of the package will stay there. For example, if
> 'A' and 'C' are in a pattern 'base', and 'A' requires 'B', 'C' requires
> 'D', I need to install pattern 'base', also I need to set 'A' uninstalled,
> but I end up having 'B', 'C', 'D' in my chroot. If I am not installing 'A',
> I definitely needn't 'B' installed.
> Is there any comment? should I file a bug?

How did you do it?

You can't 'install pattern:base' and 'remove A' in one step, 
because 'pattern:base requires A':

        'select pattern:base'
        'deselect A'
        'resolve pool'  (fails: pattern:base requires A')
        
What you describe could be created this way:
        'select pattern:base'
        'resolve pool'  (will select A C, B, D)
        'deselect A'
     Here 'D' is still selected, but just because 
     'resolve pool' was not called after changing 
     the selection.


However, if a 'resolve pool' fails, the Resolver provides list of 
'Resolver::problems()'. Each Problem usually has a list of solutions().
A ProblemSolution can be applied to the resolver.

        Problem 1:
        ====================================
        pattern:base requires A, but this requirement cannot be provided
        ------------------------------------

        Solutions for problem #1:
        ====================================
        do not ask to delete all solvables providing A
        ------------------------------------
        do not ask to install a solvable providing pattern:base
        ------------------------------------
   ==>  ignore some dependencies of pattern:base
        ------------------------------------

If I apply the last solution, then resolve again, I get C and D selected.

-- 

cu,
    Michael Andres

+------------------------------------------------------------------+
Key fingerprint = 2DFA 5D73 18B1 E7EF A862  27AC 3FB8 9E3A 27C6 B0E4
+------------------------------------------------------------------+
Michael Andres   SUSE LINUX Products GmbH, Development,   m...@suse.de
GF:Jeff Hawn,Jennifer Guild,Felix Imend├Ârffer, HRB16746(AG N├╝rnberg) 
Maxfeldstrasse 5, D-90409 Nuernberg, Germany, ++49 (0)911 - 740 53-0
+------------------------------------------------------------------+
--
To unsubscribe, e-mail: zypp-devel+unsubscr...@opensuse.org
To contact the owner, e-mail: zypp-devel+ow...@opensuse.org

Reply via email to