Mailinglist Archive: yast-commit (1088 mails)

< Previous Next >
[yast-commit] [ci_new_pac] JFYI yast2-registration -> sle12
Script 'mail_helper' called by ro
Hello packager,

This is just FYI. Your package was checked in in distribution "sle12"
by autobuild-member: ro.

Here comes the log...

---------------------------%<------------------------------
Hi,

here is the log from ci_new_pac /mounts/work_src_done/SLE12/yast2-registration
-> sle12



## BNC# 875839 : "Registration: Pool repositories are not enabled after
registration" (RESOLVED/FIXED)

Changes:
--------
--- /work/SRC/SUSE:SLE-12:GA/yast2-registration/yast2-registration.changes
2014-05-02 15:38:58.000000000 +0200
+++ /mounts/work_src_done/SLE12/yast2-registration/yast2-registration.changes
2014-05-05 16:03:09.000000000 +0200
@@ -1,0 +2,8 @@
+Mon May 5 13:33:21 UTC 2014 - lslezak@xxxxxxx
+
+- Update "enabled" and "autorefresh" repository flags according to
+ the registration response, e.g. enable -Pool repositories
+ (bnc#875839)
+- 3.1.43
+
+-------------------------------------------------------------------

calling whatdependson for sle12-i586
Packages directly triggered for rebuild:
- yast2-registration
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/SUSE:SLE-12:GA/yast2-registration (Old)
and /mounts/work_src_done/SLE12/yast2-registration (BS:build ID:37388
MAIL:yast-commit@xxxxxxxxxxxx) (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-registration", Maintainer is "yast-commit@xxxxxxxxxxxx"


Old:
----
yast2-registration-3.1.42.tar.bz2

New:
----
yast2-registration-3.1.43.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ yast2-registration.spec ++++++
--- /var/tmp/diff_new_pack.azJXnD/_old 2014-05-05 17:43:34.000000000 +0200
+++ /var/tmp/diff_new_pack.azJXnD/_new 2014-05-05 17:43:34.000000000 +0200
@@ -17,7 +17,7 @@


Name: yast2-registration
-Version: 3.1.42
+Version: 3.1.43
Release: 0

BuildRoot: %{_tmppath}/%{name}-%{version}-build

++++++ yast2-registration-3.1.42.tar.bz2 -> yast2-registration-3.1.43.tar.bz2
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-registration-3.1.42/package/yast2-registration.changes
new/yast2-registration-3.1.43/package/yast2-registration.changes
--- old/yast2-registration-3.1.42/package/yast2-registration.changes
2014-05-02 14:51:48.000000000 +0200
+++ new/yast2-registration-3.1.43/package/yast2-registration.changes
2014-05-05 16:01:23.000000000 +0200
@@ -1,4 +1,12 @@
-------------------------------------------------------------------
+Mon May 5 13:33:21 UTC 2014 - lslezak@xxxxxxx
+
+- Update "enabled" and "autorefresh" repository flags according to
+ the registration response, e.g. enable -Pool repositories
+ (bnc#875839)
+- 3.1.43
+
+-------------------------------------------------------------------
Fri May 2 12:01:45 UTC 2014 - lslezak@xxxxxxx

- ask user to import an unknown SSL certificate (bnc#874745)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-registration-3.1.42/package/yast2-registration.spec
new/yast2-registration-3.1.43/package/yast2-registration.spec
--- old/yast2-registration-3.1.42/package/yast2-registration.spec
2014-05-02 14:51:48.000000000 +0200
+++ new/yast2-registration-3.1.43/package/yast2-registration.spec
2014-05-05 16:01:23.000000000 +0200
@@ -17,7 +17,7 @@


Name: yast2-registration
-Version: 3.1.42
+Version: 3.1.43
Release: 0

BuildRoot: %{_tmppath}/%{name}-%{version}-build
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-registration-3.1.42/src/lib/registration/sw_mgmt.rb
new/yast2-registration-3.1.43/src/lib/registration/sw_mgmt.rb
--- old/yast2-registration-3.1.42/src/lib/registration/sw_mgmt.rb
2014-05-02 14:51:48.000000000 +0200
+++ new/yast2-registration-3.1.43/src/lib/registration/sw_mgmt.rb
2014-05-05 16:01:23.000000000 +0200
@@ -176,6 +176,10 @@
raise ::Registration::ServiceError.new(N_("Refreshing service '%s'
failed."), source.name)
end
end
+
+ # activate the requested repository setup
+ repos_enable(product_services.map(&:enabled).flatten)
+ repos_disable_autorefresh(product_services.map(&:norefresh).flatten)
ensure
Pkg.SourceSaveAll
end
@@ -223,6 +227,45 @@
end
end

+ # Disable specified repositories
+ # @param repo_aliases [Array<String>] list of repository aliases
+ def self.repos_enable(repo_aliases)
+ each_repo(repo_aliases) do |repo_alias|
+ log.info "Enabling repository #{repo_alias}"
+ Pkg.SourceSetEnabled(repo_alias, true)
+ end
+ end
+
+ # Disable autorefresh for specified repositories
+ # @param repo_aliases [Array<String>] list of repository aliases
+ def self.repos_disable_autorefresh(repo_aliases)
+ each_repo(repo_aliases) do |repo_alias|
+ log.info "Disabling autorefresh for #{repo_alias} repository"
+ Pkg.SourceSetAutorefresh(repo_alias, false)
+ end
+ end
+
+ # a helper method for iterating over repositories
+ # @param repo_aliases [Array<String>] list of repository aliases
+ # @param block block evaluated for each found repository
+ def self.each_repo(repo_aliases, &block)
+ all_repos = Pkg.SourceGetCurrent(false)
+
+ repo_aliases.each do |repo_alias|
+ # find the repository with the alias
+ repo = all_repos.find do |repo|
+ Pkg.SourceGeneralData(repo)["alias"] == repo_alias
+ end
+
+ if repo
+ yield(repo)
+ else
+ log.warning "Repository '#{repo_alias}' was not found, skipping"
+ end
+ end
+ end
+
+ private_class_method :each_repo
end
end

diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-registration-3.1.42/test/sw_mgmt_spec.rb
new/yast2-registration-3.1.43/test/sw_mgmt_spec.rb
--- old/yast2-registration-3.1.42/test/sw_mgmt_spec.rb 2014-05-02
14:51:48.000000000 +0200
+++ new/yast2-registration-3.1.43/test/sw_mgmt_spec.rb 2014-05-05
16:01:23.000000000 +0200
@@ -8,6 +8,48 @@
describe "Registration::SwMgmt" do
let(:yast_pkg) { double("Yast::Pkg") }

+ let(:service_name) { "SLES" }
+ let(:repos) do
+ {
+ # installation repository, not from registration
+ 0 => {
+ "alias"=>"SLES12", "autorefresh"=>false,
+ "base_urls"=>["cd:///"],
+ "enabled"=>true, "is_update_repo"=>false, "keeppackages"=>false,
+ "mirror_list"=>"", "name"=>"SLES12", "priority"=>99, "product_dir"=>"",
+ "service"=>"", "type"=>"SUSE",
+ "url"=>"cd:///"
+ },
+ # pool repo from service
+ 1 => {
+ "alias"=>"SLES:SLES12-Pool", "autorefresh"=>true,
+
"base_urls"=>["https://nu.novell.com/suse/x86_64/update/SLE-SERVER/12-POOL";],
+ "enabled"=>true, "is_update_repo"=>false, "keeppackages"=>false,
+ "mirror_list"=>"", "name"=>"SLES12-Pool", "priority"=>99,
"product_dir"=>"",
+ "service"=>service_name, "type"=>"YUM",
+ "url"=>"https://nu.novell.com/suse/x86_64/update/SLE-SERVER/12-POOL";
+ },
+ # update repo from service
+ 2 => {
+ "alias"=>"SLES:SLES12-Updates", "autorefresh"=>true,
+
"base_urls"=>["https://nu.novell.com/suse/x86_64/update/SLE-SERVER/12";],
+ "enabled"=>true, "is_update_repo"=>true, "keeppackages"=>false,
+ "mirror_list"=>"", "name"=>"SLES12-Updates", "priority"=>99,
"product_dir"=> "",
+ "service"=>service_name, "type"=>"YUM",
+ "url"=>"https://nu.novell.com/suse/x86_64/update/SLE-SERVER/12";
+ },
+ # update repo from a different service
+ 3 => {
+ "alias"=>"Another:SLES12-Updates", "autorefresh"=>true,
+
"base_urls"=>["https://nu.novell.com/suse/x86_64/update/SLE-SERVER/12";],
+ "enabled"=>true, "is_update_repo"=>true, "keeppackages"=>false,
+ "mirror_list"=>"", "name"=>"SLES12-Updates", "priority"=>99,
"product_dir"=> "",
+ "service"=> "Another", "type"=>"YUM",
+ "url"=>"https://nu.novell.com/suse/x86_64/update/SLE-SERVER/12";
+ }
+ }
+ end
+
before do
stub_yast_require
require "registration/sw_mgmt"
@@ -17,47 +59,6 @@

describe ".service_repos" do
let(:services) { double }
- let(:service_name) { "SLES" }
- let(:repos) do
- {
- # installation repository, not from registration
- 0 => {
- "alias"=>"SLES12", "autorefresh"=>false,
- "base_urls"=>["cd:///"],
- "enabled"=>true, "is_update_repo"=>false, "keeppackages"=>false,
- "mirror_list"=>"", "name"=>"SLES12", "priority"=>99,
"product_dir"=>"",
- "service"=>"", "type"=>"SUSE",
- "url"=>"cd:///"
- },
- # pool repo from service
- 1 => {
- "alias"=>"SLES:SLES12-Pool", "autorefresh"=>true,
-
"base_urls"=>["https://nu.novell.com/suse/x86_64/update/SLE-SERVER/12-POOL";],
- "enabled"=>true, "is_update_repo"=>false, "keeppackages"=>false,
- "mirror_list"=>"", "name"=>"SLES12-Pool", "priority"=>99,
"product_dir"=>"",
- "service"=>service_name, "type"=>"YUM",
- "url"=>"https://nu.novell.com/suse/x86_64/update/SLE-SERVER/12-POOL";
- },
- # update repo from service
- 2 => {
- "alias"=>"SLES:SLES12-Updates", "autorefresh"=>true,
-
"base_urls"=>["https://nu.novell.com/suse/x86_64/update/SLE-SERVER/12";],
- "enabled"=>true, "is_update_repo"=>true, "keeppackages"=>false,
- "mirror_list"=>"", "name"=>"SLES12-Updates", "priority"=>99,
"product_dir"=> "",
- "service"=>service_name, "type"=>"YUM",
- "url"=>"https://nu.novell.com/suse/x86_64/update/SLE-SERVER/12";
- },
- # update repo from a different service
- 3 => {
- "alias"=>"Another:SLES12-Updates", "autorefresh"=>true,
-
"base_urls"=>["https://nu.novell.com/suse/x86_64/update/SLE-SERVER/12";],
- "enabled"=>true, "is_update_repo"=>true, "keeppackages"=>false,
- "mirror_list"=>"", "name"=>"SLES12-Updates", "priority"=>99,
"product_dir"=> "",
- "service"=> "Another", "type"=>"YUM",
- "url"=>"https://nu.novell.com/suse/x86_64/update/SLE-SERVER/12";
- }
- }
- end

before do
service = double
@@ -93,25 +94,36 @@
let(:service_url) {
"https://example.com/foo/bar?credentials=TEST_credentials"; }
let(:credentials) { SUSE::Connect::Credentials.new("user", "password",
"file") }
let(:product_services) do
- SUSE::Connect::Service.new({"test" => service_url}, [], [])
+ SUSE::Connect::Service.new({service_name => service_url},
["SLES:SLES12-Pool"],
+ ["SLES:SLES12-Pool"])
end

before do
expect(yast_pkg).to receive(:SourceSaveAll).and_return(true).twice
- expect(yast_pkg).to
receive(:ServiceRefresh).with("test").and_return(true)
- expect(yast_pkg).to receive(:ServiceSave).with("test").and_return(true)
+ expect(yast_pkg).to
receive(:ServiceRefresh).with(service_name).and_return(true)
+ expect(yast_pkg).to
receive(:ServiceSave).with(service_name).and_return(true)
SUSE::Connect::Credentials.any_instance.should_receive(:write)
+
+ # 1 -> "SLES:SLES12-Pool"
+ expect(yast_pkg).to receive(:SourceSetEnabled).with(1,
true).and_return(true)
+ expect(yast_pkg).to receive(:SourceSetAutorefresh).with(1,
false).and_return(true)
+
+ allow(yast_pkg).to
receive(:SourceGetCurrent).with(false).and_return(repos.keys)
+ repos.each do |id, repo|
+ allow(yast_pkg).to
receive(:SourceGeneralData).with(id).and_return(repo)
+ end
end

it "it creates a new service if the service does not exist yet" do
expect(yast_pkg).to receive(:ServiceAliases).and_return([])
- expect(yast_pkg).to receive(:ServiceAdd).with("test",
service_url).and_return(true)
+ expect(yast_pkg).to receive(:ServiceAdd).with(service_name,
service_url).and_return(true)
expect { Registration::SwMgmt.add_services([product_services],
credentials) }.to_not raise_error
end

it "updates the existing service if the service already exists" do
- expect(yast_pkg).to receive(:ServiceAliases).and_return(["test"])
- expect(yast_pkg).to receive(:ServiceSet).with("test",
hash_including("url" => service_url)).and_return(true)
+ expect(yast_pkg).to receive(:ServiceAliases).and_return([service_name])
+ expect(yast_pkg).to receive(:ServiceSet).with(
+ service_name, hash_including("url" => service_url)).and_return(true)
expect { Registration::SwMgmt.add_services([product_services],
credentials) }.to_not raise_error
end
end

continue with "q"...


Checked in at Mon May 5 17:44:08 CEST 2014 by ro

Remember to have fun...

--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread