[zypp-devel] We're going to loose resolvables of kind 'Language'.
We're going to loose resolvables of kind 'Language'. The sat solver allows to handle language supporting packages the way as e.g. hardware supporting packages, via namespaces. So there is no more need to create those dummy language-resolvables. That's nice because the satpool does not allow to have solvables without a repository. So we don't have to create a dummy repository just to maintain those dummy resolvables. The zypp interface will basically stay the same: void setRequestedLocales( const LocaleSet & locales_r ); LocaleSet getRequestedLocales() const; LocaleSet getAvailableLocales() const; May be we add some convenience methods. -- 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
We're going to loose resolvables of kind 'Language'.
The sat solver allows to handle language supporting packages the way as e.g. hardware supporting packages, via namespaces.
I hope this does not mean that we should remove filtering packages by language from (all 3) package selectors. Or will there be any convenient methods in zypp: i) returning an iterator over all available languages ii) for selected language, returning an it. over all its related packages ? If so, could you please post them to this list together with some examples of usage? Thanks frozenB. -- \\\\\ Katarina Machalkova \\\\\\\__o YaST developer __\\\\\\\'/_ & hedgehog painter
On Tue, Jan 29, Katarina Machalkova wrote:
We're going to loose resolvables of kind 'Language'.
The sat solver allows to handle language supporting packages the way as e.g. hardware supporting packages, via namespaces.
I hope this does not mean that we should remove filtering packages by language from (all 3) package selectors. Or will there be any convenient methods in zypp: i) returning an iterator over all available languages ii) for selected language, returning an it. over all its related packages ?
The Pool will provide access to a collection of items providing an interface like: { Locale locale() const; bool isRequested() const; bool isAvailable() const; bool setRequested( bool yesno ); } The related items will either be available via an iterator provided by this class, or as pool query, or both. Anyway, it will be a collection of something Locale-like and no longer a collection of ResObjects.
If so, could you please post them to this list together with some examples of usage?
As soon as they are available. -- 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
* Katarina Machalkova <kmachalkova@suse.cz> [Jan 29. 2008 18:51]:
We're going to loose resolvables of kind 'Language'.
The sat solver allows to handle language supporting packages the way as e.g. hardware supporting packages, via namespaces.
I hope this does not mean that we should remove filtering packages by language from (all 3) package selectors. Or will there be any convenient methods in zypp: i) returning an iterator over all available languages ii) for selected language, returning an it. over all its related packages ?
The application api should not (resp. must not) depend on the underlying implementation. libzypp will provide the convenience methods you mentioned. Klaus -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
On Tue, Jan 29, Katarina Machalkova wrote:
i) returning an iterator over all available languages
Basic interface is in class ResPool const LocaleSet & ResPool::getAvailableLocales() const;
ii) for selected language, returning an it. over all its related packages ?
See class sat::LocaleSupport Example: const LocaleSet & avlocales( ResPool::instance().getAvailableLocales() ); for_( it, avlocales.begin(), avlocales.end() ) { sat::LocaleSupport myLocale( *it ); if ( ! myLocale.isRequested() ) { MIL << "Will enable support for locale '" << myLocale.locale() << "'." << endl; myLocale.setRequested( true ); } MIL << "Packages supporting locale '" << myLocale.locale() << "':" << endl; for_( it, myLocale.begin(), myLocale.end() ) { // iterate over sat::Solvables: // MIL << " " << *it << endl; // or get the PoolItems: PoolItem pi(*it); MIL << " " << pi << endl; } } Is it ok for the UIs to construct the PoolItem (ASAP as well the Selectable) from the sat::Solvable (inside the loop)? Or would you prefer to have a transform iterator like: for_( it, poolItemIterator(myLocale.begin()), poolItemIterator(myLocale.end()) ) { // *it now is a PoolItem } for_( it, selectableIterator(myLocale.begin()), selectableIterator(myLocale.end()) ) { // *it now is a ui::Selectable } A selectableIterator would also visit each Selectable only once, even if multiple PoolItems refer to it. -- 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
participants (3)
-
Katarina Machalkova
-
Klaus Kaempf
-
Michael Andres