[zypp-devel] libzypp: about 11.1 product handling and beloved zypp::ResTraits
The major change in 11.0 product handling (from the zypp POV) is the fact that products are again 'installed'. Good by repo refreshing and solver running just to figure out if a product is installed. Short details: The 'database' of installed products will be located in /etc/products.d. Release packages will put the products metadata there, when they are installed, and the data are removed again if the package gets removed. So within libzypp the relase Package and the Product are sort of different views to the same object. One can't be without the other. This tight connection is expressed by the fact, that both objects share the same ResStatus. I started to review zypper, pkg-bindings and the UIs, and adapt all code that refers to satisfied/broken/needed when dealing with Products. They are again, like Packages, installed. But I'd like you to forget this immediately ;) If a distinction has to be drawn between installed items (package, product) and verified items (pattern, patch), we'll provide this info as a property of ResKind. This leads to the 2nd topic: zypp::ResTraits I want to remove them at least outside libzypp. All that is used and needed outside libzyzypp is the kind of a resolvable: The Type is: class ResKind aka ResObject::Kind aka ResTraits<ResObject>::KindType And the kind strings are available as ResKind constants: zypp::ResKind::package zypp::ResKind::patch zypp::ResKind::pattern zypp::ResKind::product zypp::ResKind::srcpackage I think this is nicer to read and write than the traits way: zypp::ResTraitszypp::Package::kind zypp::ResTraitszypp::Patch::kind zypp::ResTraitszypp::Pattern::kind zypp::ResTraitszypp::Product::kind zypp::ResTraitszypp::SrcPackage::kind -- cu, Michael Andres +------------------------------------------------------------------+ Key fingerprint = 2DFA 5D73 18B1 E7EF A862 27AC 3FB8 9E3A 27C6 B0E4 +------------------------------------------------------------------+ Michael Andres YaST Development ma@novell.com SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg) Maxfeldstrasse 5, D-90409 Nuernberg, Germany, ++49 (0)911 - 740 53-0 +------------------------------------------------------------------+ -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
On Thu, Aug 07, Michael Andres wrote:
If a distinction has to be drawn between installed items (package, product) and verified items (pattern, patch), we'll provide this info as a property of ResKind.
/////////////////////////////////////////////////////////////////// namespace zypp { ///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////// namespace traits { ///////////////////////////////////////////////////////////////// /** Those are denoted to be installed, if the * solver verifies them as being satisfied. */ bool isPseudoInstalled( ResKind kind_r ) { return( kind_r == ResKind::patch || kind_r == ResKind::pattern ); } -- cu, Michael Andres +------------------------------------------------------------------+ Key fingerprint = 2DFA 5D73 18B1 E7EF A862 27AC 3FB8 9E3A 27C6 B0E4 +------------------------------------------------------------------+ Michael Andres YaST Development ma@novell.com SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg) Maxfeldstrasse 5, D-90409 Nuernberg, Germany, ++49 (0)911 - 740 53-0 +------------------------------------------------------------------+ -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
Michael Andres wrote:
The major change in 11.0 product handling (from the zypp POV) is the fact that products are again 'installed'. Good by repo refreshing and solver running just to figure out if a product is installed.
Short details: The 'database' of installed products will be located in /etc/products.d. Release packages will put the products metadata there, when they are installed, and the data are removed again if the package gets removed.
So within libzypp the relase Package and the Product are sort of different views to the same object. One can't be without the other. This tight connection is expressed by the fact, that both objects share the same ResStatus.
If the realease package (i installed openSUSE-factory product, openSUSE-release package) does not install the product, what do i need to put there so that zypp thinks the product is installed?
I started to review zypper, pkg-bindings and the UIs, and adapt all code that refers to satisfied/broken/needed when dealing with Products. They are again, like Packages, installed.
I'm trying to adapt zypper right now. cheers, jano -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
* Jan Kupec
If the realease package (i installed openSUSE-factory product, openSUSE-release package) does not install the product, what do i need to put there so that zypp thinks the product is installed?
See http://en.opensuse.org/Product_Management/Code11/installed and http://en.opensuse.org/Build_Service/Product_Definition/products_file Klaus -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
Klaus Kaempf wrote:
* Jan Kupec
[Sep 09. 2008 16:11]: If the realease package (i installed openSUSE-factory product, openSUSE-release package) does not install the product, what do i need to put there so that zypp thinks the product is installed? See http://en.opensuse.org/Product_Management/Code11/installed and http://en.opensuse.org/Build_Service/Product_Definition/products_file
Thanx! I tried to adapt one of the example xmls there, but rpmdb2solv fails: rpmdb2solv -r '/' -p '/etc/products.d' '/var/cache/zypp/solv/@System/solv' > '/var/cache/zypp/solv/@System/solvyxzLXu' into unknown: [3]vendor (from: 2, state 1) Which suggest it does no expect the <vendor> tag there.. -----my--openSUSE-factory.prod---------- <?xml version="1.0" encoding="UTF-8"?> <product schemeversion="0.0"> <vendor>Novell</vendor> <name>openSUSE-factory</name> <version>11.1</version> <release>0</release> ... </product> -----my--openSUSE-factory.prod---END---- j. -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
* Jan Kupec
Klaus Kaempf wrote:
* Jan Kupec
[Sep 09. 2008 16:11]: If the realease package (i installed openSUSE-factory product, openSUSE-release package) does not install the product, what do i need to put there so that zypp thinks the product is installed? See http://en.opensuse.org/Product_Management/Code11/installed and http://en.opensuse.org/Build_Service/Product_Definition/products_file
Thanx! I tried to adapt one of the example xmls there, but rpmdb2solv fails:
rpmdb2solv -r '/' -p '/etc/products.d' '/var/cache/zypp/solv/@System/solv'
'/var/cache/zypp/solv/@System/solvyxzLXu' into unknown: [3]vendor (from: 2, state 1)
Which suggest it does no expect the <vendor> tag there..
-----my--openSUSE-factory.prod---------- <?xml version="1.0" encoding="UTF-8"?> <product schemeversion="0.0">
<general> is missing here !
<vendor>Novell</vendor> <name>openSUSE-factory</name> <version>11.1</version> <release>0</release> ...
</general> is missing here !
</product> -----my--openSUSE-factory.prod---END----
j. -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
participants (3)
-
Jan Kupec
-
Klaus Kaempf
-
Michael Andres