From 808602be3b2647eda3d0b9498a305632ccf537e3 Mon Sep 17 00:00:00 2001 From: Ivan Kapelyukhin Date: Wed, 27 Sep 2017 16:24:35 +0200 Subject: [PATCH 1/2] Use repo CATALOGID instead of ID in smt-staging (bsc#1058992) --- script/smt-staging | 4 ++-- www/perl-lib/SMT/Repositories.pm | 11 +++++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/script/smt-staging b/script/smt-staging index b4561a12..196f5f2f 100755 --- a/script/smt-staging +++ b/script/smt-staging @@ -275,7 +275,7 @@ if(! $testingdir) # get the repository from DB (all commands need it) my $rh = SMT::Repositories::new($dbh, $log); -my $repo = $rh->getRepository($reponameid) if (not defined $target); +my $repo = $rh->getRepository($reponameid, 'CATALOGID') if (not defined $target); my $repoid = undef; $rh->getAndClearErrorMessage(); @@ -349,7 +349,7 @@ else { SMT::Utils::printLog($log, $vblevel, LOG_DEBUG, sprintf "Found repository by CATALOGID '%s'.", $reponameid); - $repoid = $reponameid; + $repoid = $repo->{ID}; } # $repo and $repoid should always be defined at this point diff --git a/www/perl-lib/SMT/Repositories.pm b/www/perl-lib/SMT/Repositories.pm index 7867c6a7..956a068c 100644 --- a/www/perl-lib/SMT/Repositories.pm +++ b/www/perl-lib/SMT/Repositories.pm @@ -216,9 +216,10 @@ Examples: =cut -sub getAllRepositories ($$) { +sub getAllRepositories ($$;$) { my $self = shift; my $filter = shift || {}; + my $key_name = shift || 'ID'; $self->{REPOS} = undef; $self->{GOTALLREPOS} = 0; @@ -250,7 +251,7 @@ sub getAllRepositories ($$) { $row->{'TARGET'} = '' if (not defined $row->{'TARGET'}); $row->{'LAST_MIRROR'} = '' if (not defined $row->{'LAST_MIRROR'}); $row->{rownr} = $rownr; - $ret->{$row->{'ID'}} = $row; + $ret->{$row->{$key_name}} = $row; $rownr++; } @@ -266,7 +267,7 @@ Returns a hash of repository data for given repository ID. The hash keys correspond to Catalogs database table. =cut -sub getRepository($$) +sub getRepository($$;$) { my $self = shift; @@ -275,6 +276,8 @@ sub getRepository($$) return undef; }; + my $key_name = shift || SMT::Repositories::REPOSITORYID; # ID or CATALOGID + my $repo; if ($self->{GOTALLREPOS}) { @@ -283,7 +286,7 @@ sub getRepository($$) else { # Matches just one repository - my $repos = $self->getAllRepositories({SMT::Repositories::REPOSITORYID => $repository}); + my $repos = $self->getAllRepositories({ $key_name => $repository }, $key_name); $repo = $repos->{$repository} || undef; } From 782402ca79f7cfe0e1c69fa59dbb664636b58d76 Mon Sep 17 00:00:00 2001 From: Ivan Kapelyukhin Date: Wed, 4 Oct 2017 09:44:21 +0200 Subject: [PATCH 2/2] Bump up the version to 3.0.30 --- Makefile | 2 +- package/smt.changes | 7 +++++++ package/smt.spec | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 8a8fdb90..55b6c168 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ NAME = smt -VERSION = 3.0.29 +VERSION = 3.0.30 DESTDIR = / PERL ?= perl PERLMODDIR = $(shell $(PERL) -MConfig -e 'print $$Config{installvendorlib};') diff --git a/package/smt.changes b/package/smt.changes index 7264ed4a..7ee2f683 100644 --- a/package/smt.changes +++ b/package/smt.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Oct 4 07:43:16 UTC 2017 - ikapelyukhin@suse.com + +- version 3.0.30 +- Specify TLSv1 explicitly for older wget versions (bsc#1059943) +- Use repo CATALOGID instead of ID in smt-staging (bsc#1058992) + ------------------------------------------------------------------- Thu Aug 3 08:11:30 UTC 2017 - ikapelyukhin@suse.com diff --git a/package/smt.spec b/package/smt.spec index 64dc38ea..4bc0fcac 100644 --- a/package/smt.spec +++ b/package/smt.spec @@ -17,7 +17,7 @@ Name: smt -Version: 3.0.29 +Version: 3.0.30 Release: 0 Summary: Subscription Management Tool License: GPL-2.0+