Mailinglist Archive: zypp-devel (56 mails)
| < Previous | Next > |
Re: [zypp-devel] How to get a packages' depends and requires from libzypp
- From: Stefan Schubert <schubi@xxxxxxx>
- Date: Thu, 06 Dec 2007 11:54:47 +0100
- Message-id: <4757D4F7.9050600@xxxxxxx>
Duncan Mac-Vicar Prett schrieb:
So, if libsdl is not required by foo the solver will not blame the
requirements of
libsdl from mplayer.
Anyway, you need a solver run here. In this case you can use following
API of
the solver:
/**
* Gives information about WHO has pused an installation of an given
item.
*
* \param item Evaluate additional information for this resolvable.
* \return A list of structures which contains:
* item Item which has triggered the installation of the
given param item.
* cap Capability which has triggerd this installation
* capKind Kind of that capability (e.g.
Dep::REQUIRES,Dep::RECOMMENDS,... )
*
* Note: In order to have a result start a solver run before. Not
matter if it is valid or invalid.
*
*/
const solver::detail::ItemCapKindList isInstalledBy (const
PoolItem_Ref item);
/**
* Gives information about WHICH additional items will be installed
due the installation of an item.
*
* \param item Evaluate additional information for this resolvable.
* \return A list of structures which contains:
* item Item which will be installed due to the
installation of the given param item too.
* cap Capability which causes the installation
* capKind Kind of that capability (e.g.
Dep::REQUIRES,Dep::RECOMMENDS,... )
*
* Note: In order to have a result start a solver run before. Not
matter if it is valid or invalid.
*
*/
const solver::detail::ItemCapKindList installs (const PoolItem_Ref
item);
I am not sure if we can provide this information in the future by the
new SAT-solver. But we
will try it. :-)
The other way (without solving) has been already described by Michl
Andres on this mailing-list.
Greetings
Stefan
--
*******************************************************************************
Stefan Schubert
SUSE LINUX GmbH - Maxfeldstrasse 5 - D-90409 Nuernberg, Germany
e-mail: schubi@xxxxxxx
-------------------------------------------------------------------------------
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
--
To unsubscribe, e-mail: zypp-devel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-devel+help@xxxxxxxxxxxx
- Do a solver run for the case of installing a single package and see whichÄhm, the solver does regard dependencies of to be installed packages only.
packages the solver mark for installation (isToBeInstalled() isBySolver())
but this also would mark a broken requires for another package for
installation, like you have mplayer installed which depends on libsdl, but
libsdl was uninstalled by rpm -force, the solver will mark for installation
even if it is not a requires of foo, anyway I am not 100% sure if this is the
behavior libzypp does right now (moving the system automatically to a
consistant state).
So, if libsdl is not required by foo the solver will not blame the
requirements of
libsdl from mplayer.
Anyway, you need a solver run here. In this case you can use following
API of
the solver:
/**
* Gives information about WHO has pused an installation of an given
item.
*
* \param item Evaluate additional information for this resolvable.
* \return A list of structures which contains:
* item Item which has triggered the installation of the
given param item.
* cap Capability which has triggerd this installation
* capKind Kind of that capability (e.g.
Dep::REQUIRES,Dep::RECOMMENDS,... )
*
* Note: In order to have a result start a solver run before. Not
matter if it is valid or invalid.
*
*/
const solver::detail::ItemCapKindList isInstalledBy (const
PoolItem_Ref item);
/**
* Gives information about WHICH additional items will be installed
due the installation of an item.
*
* \param item Evaluate additional information for this resolvable.
* \return A list of structures which contains:
* item Item which will be installed due to the
installation of the given param item too.
* cap Capability which causes the installation
* capKind Kind of that capability (e.g.
Dep::REQUIRES,Dep::RECOMMENDS,... )
*
* Note: In order to have a result start a solver run before. Not
matter if it is valid or invalid.
*
*/
const solver::detail::ItemCapKindList installs (const PoolItem_Ref
item);
I am not sure if we can provide this information in the future by the
new SAT-solver. But we
will try it. :-)
The other way (without solving) has been already described by Michl
Andres on this mailing-list.
Greetings
Stefan
--
*******************************************************************************
Stefan Schubert
SUSE LINUX GmbH - Maxfeldstrasse 5 - D-90409 Nuernberg, Germany
e-mail: schubi@xxxxxxx
-------------------------------------------------------------------------------
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
--
To unsubscribe, e-mail: zypp-devel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-devel+help@xxxxxxxxxxxx
| < Previous | Next > |