Hi all,

Just as a "side-effect" of FATE#320494[1] I've added two new classes to YaST 
packages library that can be used to query basic data from repositories (or 
even enabling/disabling them) in a more object oriented way. For example:

repos = Packages::Repository.all
repo = Packages::Repository.find(1)
repo.products
repo.disable! if repo.enabled?

I've added only what I needed to implement the FATE, but we could extend it in 
the future (adding support for packages instead of only products, for 
example).

Regards,
Imobach

[1] 
https://trello.com/c/D5TL53ov/508-5-sle-12-sp2-p8-i-feature-320494-disable-installation-source-after-installation-if-we-register-system
[2] https://github.com/yast/yast-yast2/blob/master/library/packages/src/lib/
packages/repository.rb
[3] https://github.com/yast/yast-yast2/blob/master/library/packages/src/lib/
packages/product.rb

-- 
Imobach González Sosa
YaST team at SUSE LINUX GmbH
--
To unsubscribe, e-mail: [email protected]
To contact the owner, e-mail: [email protected]

Reply via email to