Mailinglist Archive: yast-devel (61 mails)

< Previous Next >
[yast-devel] New Repository and Products classes
  • From: Imobach González Sosa <igonzalezsosa@xxxxxxx>
  • Date: Wed, 11 May 2016 12:45:02 +0100
  • Message-id: <4935801.tTNNcsJEQM@gofio>
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: yast-devel+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: yast-devel+owner@xxxxxxxxxxxx

< Previous Next >
Follow Ups