zypper-upgraderepo 1.3.0 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/FUNDING.yml +13 -0
- data/Gemfile.lock +6 -6
- data/lib/zypper/upgraderepo.rb +18 -43
- data/lib/zypper/upgraderepo/cli.rb +28 -26
- data/lib/zypper/upgraderepo/repository.rb +57 -9
- data/lib/zypper/upgraderepo/request.rb +4 -0
- data/lib/zypper/upgraderepo/utils.rb +40 -2
- data/lib/zypper/upgraderepo/version.rb +1 -1
- data/lib/zypper/upgraderepo/view.rb +31 -11
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d4760ab0872714ea6449ab9f0ece3864e26c8c240f9b11633006fb12dd817499
|
4
|
+
data.tar.gz: 20adbb9f4e555758247171702c7adbd3513f94025cb4f02259b9c9fd2ed58de4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8450283c28d80056aa8f9bc7c97f40e7778a728b200b04dacf38cd3697ab76da59332314f4de5d23328e11283d9365088d9d212cb5cfdab837b2954d306cb87e
|
7
|
+
data.tar.gz: 478fdd3fa080ae63049b077bc8ddf73a5d1d87655da3a1c17f0588c944766b09aba44b5f6b62ecbdd62cc641e7dcf0486a4a45ae25e04773502c3c99acc8546f
|
data/.github/FUNDING.yml
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
# These are supported funding model platforms
|
2
|
+
|
3
|
+
github: [fabiomux]
|
4
|
+
#patreon: # Replace with a single Patreon username
|
5
|
+
#open_collective: # Replace with a single Open Collective username
|
6
|
+
#ko_fi: # Replace with a single Ko-fi username
|
7
|
+
#tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
8
|
+
#community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
9
|
+
#liberapay: # Replace with a single Liberapay username
|
10
|
+
#issuehunt: # Replace with a single IssueHunt username
|
11
|
+
#otechie: # Replace with a single Otechie username
|
12
|
+
#custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
13
|
+
custom: ['https://www.buymeacoffee.com/DCkNYFg']
|
data/Gemfile.lock
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
zypper-upgraderepo (1.
|
4
|
+
zypper-upgraderepo (1.4.0)
|
5
5
|
iniparse
|
6
6
|
minitar
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
diff-lcs (1.
|
11
|
+
diff-lcs (1.4.4)
|
12
12
|
iniparse (1.5.0)
|
13
13
|
minitar (0.9)
|
14
14
|
rake (13.0.1)
|
@@ -16,15 +16,15 @@ GEM
|
|
16
16
|
rspec-core (~> 3.9.0)
|
17
17
|
rspec-expectations (~> 3.9.0)
|
18
18
|
rspec-mocks (~> 3.9.0)
|
19
|
-
rspec-core (3.9.
|
20
|
-
rspec-support (~> 3.9.
|
21
|
-
rspec-expectations (3.9.
|
19
|
+
rspec-core (3.9.2)
|
20
|
+
rspec-support (~> 3.9.3)
|
21
|
+
rspec-expectations (3.9.2)
|
22
22
|
diff-lcs (>= 1.2.0, < 2.0)
|
23
23
|
rspec-support (~> 3.9.0)
|
24
24
|
rspec-mocks (3.9.1)
|
25
25
|
diff-lcs (>= 1.2.0, < 2.0)
|
26
26
|
rspec-support (~> 3.9.0)
|
27
|
-
rspec-support (3.9.
|
27
|
+
rspec-support (3.9.3)
|
28
28
|
|
29
29
|
PLATFORMS
|
30
30
|
ruby
|
data/lib/zypper/upgraderepo.rb
CHANGED
@@ -17,14 +17,9 @@ module Zypper
|
|
17
17
|
@print_hint = options.hint
|
18
18
|
@view_class = Zypper::Upgraderepo::View.const_get options.view.to_s.capitalize
|
19
19
|
|
20
|
-
@overrides = options.overrides
|
21
|
-
@upgrade_options = { alias: options.alias, name: options.name }
|
22
|
-
|
23
20
|
@backup_path = options.backup_path
|
24
21
|
|
25
22
|
@exit_on_fail = options.exit_on_fail
|
26
|
-
|
27
|
-
@filename = options.filename
|
28
23
|
end
|
29
24
|
|
30
25
|
def backup
|
@@ -43,27 +38,24 @@ module Zypper
|
|
43
38
|
|
44
39
|
def check_next
|
45
40
|
raise AlreadyUpgraded, 'latest' if @os_release.last?
|
46
|
-
@repos.
|
41
|
+
@repos.upgrade!(@os_release.next)
|
47
42
|
check_repos(@os_release.next)
|
48
43
|
end
|
49
44
|
|
50
45
|
def check_to
|
51
|
-
@repos.
|
46
|
+
@repos.upgrade!(@os_release.custom)
|
52
47
|
check_repos(@os_release.custom)
|
53
48
|
end
|
54
49
|
|
55
|
-
def check_from_file
|
56
|
-
load_overrides
|
57
|
-
check_repos(@os_release.next)
|
58
|
-
end
|
59
|
-
|
60
50
|
def upgrade
|
61
51
|
raise AlreadyUpgraded, 'latest' if @os_release.last?
|
52
|
+
@repos.upgrade!(@os_release.next)
|
62
53
|
upgrade_repos(@os_release.next)
|
63
54
|
end
|
64
55
|
|
65
56
|
def upgrade_to
|
66
57
|
raise AlreadyUpgraded, @os_release.custom if @os_release.current?(@os_release.custom)
|
58
|
+
@repos.upgrade!(@os_release.custom)
|
67
59
|
upgrade_repos(@os_release.custom)
|
68
60
|
end
|
69
61
|
|
@@ -71,45 +63,30 @@ module Zypper
|
|
71
63
|
upgrade_repos(@os_release.current)
|
72
64
|
end
|
73
65
|
|
74
|
-
def upgrade_from_file
|
75
|
-
load_overrides
|
76
|
-
upgrade_repos(@os_release.next)
|
77
|
-
end
|
78
|
-
|
79
66
|
|
80
67
|
private
|
81
68
|
|
82
|
-
def load_overrides
|
83
|
-
ini = IniParse.parse(File.read(@filename))
|
84
|
-
@repos.each_with_index do |r, i|
|
85
|
-
x = ini["Repository_#{i.next}"]
|
86
|
-
raise UnmatchingOverrides, { num: i.next, ini: x, repo: r } if r.url != x['OldURL']
|
87
|
-
raise MissingOverride, { num: i.next, ini: x } unless x['URL']
|
88
|
-
@overrides[i.next] = x['URL']
|
89
|
-
end
|
90
|
-
end
|
91
|
-
|
92
69
|
def check_repos(version)
|
93
70
|
@view_class.header(@repos.max_col)
|
94
71
|
|
95
|
-
@repos.
|
72
|
+
@repos.each_with_number do |repo, num|
|
96
73
|
|
97
74
|
@view_class.separator
|
98
75
|
|
99
|
-
if
|
100
|
-
@view_class.available
|
76
|
+
if repo.available?
|
77
|
+
@view_class.available num, repo, @repos.max_col
|
101
78
|
else
|
102
|
-
raise UnableToUpgrade, {num:
|
103
|
-
if
|
104
|
-
@view_class.redirected
|
105
|
-
elsif
|
79
|
+
raise UnableToUpgrade, { num: num, repo: repo } if @exit_on_fail
|
80
|
+
if repo.redirected?
|
81
|
+
@view_class.redirected num, repo, @repos.max_col, repo.redirected_to
|
82
|
+
elsif repo.not_found?
|
106
83
|
if @print_hint
|
107
|
-
@view_class.alternative
|
84
|
+
@view_class.alternative num, repo, @repos.max_col, repo.evaluate_alternative(version)
|
108
85
|
else
|
109
|
-
@view_class.not_found
|
86
|
+
@view_class.not_found num, repo, @repos.max_col
|
110
87
|
end
|
111
|
-
elsif
|
112
|
-
@view_class.timeout
|
88
|
+
elsif repo.timeout?
|
89
|
+
@view_class.timeout num, repo, @repos.max_col
|
113
90
|
end
|
114
91
|
end
|
115
92
|
end
|
@@ -120,16 +97,14 @@ module Zypper
|
|
120
97
|
def upgrade_repos(version)
|
121
98
|
@view_class.header(@repos.max_col, true)
|
122
99
|
|
123
|
-
@repos.
|
100
|
+
@repos.each_with_number do |repo, num|
|
124
101
|
|
125
102
|
@view_class.separator
|
126
103
|
|
127
|
-
repo.upgrade(version, @upgrade_options.merge(url_override: @overrides[i.next]))
|
128
|
-
|
129
104
|
if repo.upgraded?
|
130
|
-
@view_class.upgraded
|
105
|
+
@view_class.upgraded num, repo, @repos.max_col
|
131
106
|
else
|
132
|
-
@view_class.untouched
|
107
|
+
@view_class.untouched num, repo, @repos.max_col
|
133
108
|
end
|
134
109
|
end
|
135
110
|
|
@@ -24,7 +24,8 @@ module Zypper
|
|
24
24
|
options.only_repo = nil
|
25
25
|
options.timeout = 10.0
|
26
26
|
options.exit_on_fail = false
|
27
|
-
options.
|
27
|
+
options.overrides_filename = nil
|
28
|
+
options.only_invalid = false
|
28
29
|
|
29
30
|
opt_parser = OptionParser.new do |opt|
|
30
31
|
|
@@ -56,11 +57,6 @@ module Zypper
|
|
56
57
|
options.operation = :check_to
|
57
58
|
end
|
58
59
|
|
59
|
-
opt.on('-f', '--check-from-file <FILENAME>', 'Check the URLs in the exported FILENAME') do |f|
|
60
|
-
options.filename = f
|
61
|
-
options.operation = :check_from_file
|
62
|
-
end
|
63
|
-
|
64
60
|
opt.on('-R', '--reset', 'Reset the repositories to the current OS version.') do |v|
|
65
61
|
options.operation = :reset
|
66
62
|
end
|
@@ -74,26 +70,9 @@ module Zypper
|
|
74
70
|
options.operation = :upgrade_to
|
75
71
|
end
|
76
72
|
|
77
|
-
opt.on('-F', '--upgrade-from-file <FILENAME>', 'Upgrade from FILENAME') do |f|
|
78
|
-
options.filename = f
|
79
|
-
options.operation = :upgrade_from_file
|
80
|
-
end
|
81
|
-
|
82
73
|
opt.separator ''
|
83
74
|
opt.separator 'Options:'
|
84
75
|
|
85
|
-
opt.on('--exit-on-fail', 'Exit with error when a repository upgrade check fails') do |o|
|
86
|
-
options.exit_on_fail = true
|
87
|
-
end
|
88
|
-
|
89
|
-
opt.on('--only-enabled', 'Include only the enabled repositories') do |o|
|
90
|
-
options.only_enabled = true
|
91
|
-
end
|
92
|
-
|
93
|
-
opt.on('--only-repo <NUMBER>[,NUMBER2,...]', 'Include only the repositories specified by NUMBER') do |o|
|
94
|
-
options.only_repo = o.split(',').map(&:to_i)
|
95
|
-
end
|
96
|
-
|
97
76
|
opt.on('--no-name', 'Don\'t upgrade the name') do |o|
|
98
77
|
options.name = false
|
99
78
|
end
|
@@ -102,18 +81,41 @@ module Zypper
|
|
102
81
|
options.alias = false
|
103
82
|
end
|
104
83
|
|
105
|
-
opt.on('--no-hint', 'Don\'t find a working
|
84
|
+
opt.on('--no-hint', 'Don\'t find a working URL when the current is invalid') do |o|
|
106
85
|
options.hint = false
|
107
86
|
end
|
108
87
|
|
109
|
-
opt.on('--override-url <NUMBER>,<URL>', Array, 'Overwrite the repository
|
88
|
+
opt.on('--override-url <NUMBER>,<URL>', Array, 'Overwrite the repository NUMBER with URL') do |r|
|
110
89
|
options.overrides[r[0].to_i] = r[1]
|
111
90
|
end
|
112
91
|
|
92
|
+
opt.on('--load-overrides <FILENAME>', 'Check the URLs in the exported FILENAME') do |f|
|
93
|
+
options.overrides_filename = f
|
94
|
+
end
|
95
|
+
|
96
|
+
opt.on('--exit-on-fail', 'Exit with error when a repository upgrade check fails') do |o|
|
97
|
+
options.exit_on_fail = true
|
98
|
+
end
|
99
|
+
|
113
100
|
opt.on('--timeout <SECONDS>', "Adjust the waiting SECONDS used to catch an HTTP Timeout Error (Default: #{options.timeout})") do |o|
|
114
101
|
options.timeout = o.to_f
|
115
102
|
end
|
116
103
|
|
104
|
+
opt.separator ''
|
105
|
+
opt.separator 'Filter options:'
|
106
|
+
|
107
|
+
opt.on('--only-enabled', 'Include only the enabled repositories') do |o|
|
108
|
+
options.only_enabled = true
|
109
|
+
end
|
110
|
+
|
111
|
+
opt.on('--only-repo <NUMBER>[,NUMBER2,...]', 'Include only the repositories specified by NUMBER') do |o|
|
112
|
+
options.only_repo = o.split(',').map(&:to_i)
|
113
|
+
end
|
114
|
+
|
115
|
+
opt.on('--only-invalid', 'Show only invalid repositories') do |o|
|
116
|
+
options.only_invalid = true
|
117
|
+
end
|
118
|
+
|
117
119
|
opt.separator ''
|
118
120
|
opt.separator 'View options:'
|
119
121
|
|
@@ -178,7 +180,7 @@ module Zypper
|
|
178
180
|
Upgraderepo::Builder.new(options).send(options.operation)
|
179
181
|
rescue => e
|
180
182
|
Messages.error e
|
181
|
-
exit
|
183
|
+
exit e.error_code
|
182
184
|
end
|
183
185
|
end
|
184
186
|
end
|
@@ -14,24 +14,47 @@ module Zypper
|
|
14
14
|
@alias = options.alias
|
15
15
|
@name = options.name
|
16
16
|
@only_repo = options.only_repo
|
17
|
+
@only_enabled = options.only_enabled
|
18
|
+
@only_invalid = options.only_invalid
|
19
|
+
@overrides = options.overrides
|
20
|
+
@upgrade_options = {alias: options.alias, name: options.name}
|
17
21
|
@list = []
|
18
22
|
|
19
23
|
Dir.glob(File.join(REPOSITORY_PATH, '*.repo')).each do |i|
|
20
24
|
r = RepositoryRequest.new(Repository.new(i), options.timeout)
|
21
|
-
next if options.only_enabled && (!r.enabled?)
|
22
25
|
@list << r
|
23
26
|
end
|
24
|
-
@max_col = @list.max_by { |
|
27
|
+
@max_col = @list.max_by { |r| r.name.length }.name.length
|
25
28
|
|
26
|
-
@list.sort_by
|
27
|
-
|
29
|
+
@list = @list.sort_by { |r| r.alias }.map.with_index(1) { |r, i| { num: i, repo: r } }
|
30
|
+
|
31
|
+
@list.sort_by! { |x| x[:repo].send(options.sort_by) } if options.sort_by != :alias
|
32
|
+
|
33
|
+
load_overrides(options.filename) if options.filename
|
28
34
|
end
|
29
35
|
|
30
|
-
def
|
31
|
-
@
|
32
|
-
|
36
|
+
def only_enabled?
|
37
|
+
@only_enabled
|
38
|
+
end
|
33
39
|
|
34
|
-
|
40
|
+
def upgrade!(version)
|
41
|
+
each_with_number(only_invalid: false) do |repo, num|
|
42
|
+
repo.upgrade! version, @upgrade_options.merge(url_override: @overrides[num])
|
43
|
+
repo.cache!
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
def each_with_number(options = {})
|
48
|
+
only_repo = options[:only_repo].nil? ? @only_repo : options[:only_repo]
|
49
|
+
only_enabled = options[:only_enabled].nil? ? @only_enabled : options[:only_enabled]
|
50
|
+
only_invalid = options[:only_invalid].nil? ? @only_invalid : options[:only_invalid]
|
51
|
+
|
52
|
+
@list.each do |x|
|
53
|
+
next if only_repo && !only_repo.include?(x[:num])
|
54
|
+
next if only_enabled && !x[:repo].enabled?
|
55
|
+
next if only_invalid && x[:repo].available?
|
56
|
+
|
57
|
+
yield x[:repo], x[:num] if block_given?
|
35
58
|
end
|
36
59
|
end
|
37
60
|
|
@@ -40,6 +63,27 @@ module Zypper
|
|
40
63
|
i.save
|
41
64
|
end
|
42
65
|
end
|
66
|
+
|
67
|
+
|
68
|
+
private
|
69
|
+
|
70
|
+
def load_overrides(filename)
|
71
|
+
raise FileNotFound, filename unless File.exist?(filename)
|
72
|
+
ini = IniParse.parse(File.read(filename))
|
73
|
+
each_with_number(only_invalid: false) do |repo, num|
|
74
|
+
if x = ini["repository_#{num}"]
|
75
|
+
repo.enable!(x['enabled'])
|
76
|
+
raise UnmatchingOverrides, { num: num, ini: x, repo: repo } if repo.url != x['old_url']
|
77
|
+
if (@repos.only_enabled?)
|
78
|
+
raise MissingOverride, { num: num, ini: x } unless x['url'] || x['enabled'] =~ /no|false|0/i
|
79
|
+
else
|
80
|
+
raise MissingOverride, { num: num, ini: x } unless x['url']
|
81
|
+
end
|
82
|
+
@overrides[num] = x['url'] if x['url']
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
43
87
|
end
|
44
88
|
|
45
89
|
|
@@ -59,6 +103,10 @@ module Zypper
|
|
59
103
|
@repo[@key]['enabled'].to_i == 1
|
60
104
|
end
|
61
105
|
|
106
|
+
def enable!(value = true)
|
107
|
+
@repo[@key]['enabled'] = (value.to_s =~ /true|1|yes/i) ? 1 : 0
|
108
|
+
end
|
109
|
+
|
62
110
|
def type
|
63
111
|
@repo[@key]['type']
|
64
112
|
end
|
@@ -92,7 +140,7 @@ module Zypper
|
|
92
140
|
@key = get_key
|
93
141
|
end
|
94
142
|
|
95
|
-
def upgrade(version, args = {})
|
143
|
+
def upgrade!(version, args = {})
|
96
144
|
@old_url ||= self.url
|
97
145
|
@old_alias ||= self.alias
|
98
146
|
@old_name ||= self.name
|
@@ -25,6 +25,11 @@ module Zypper
|
|
25
25
|
def new_line; "\n#{self}" end
|
26
26
|
end
|
27
27
|
|
28
|
+
class ::StandardError
|
29
|
+
def error_code
|
30
|
+
1
|
31
|
+
end
|
32
|
+
end
|
28
33
|
|
29
34
|
class Messages
|
30
35
|
|
@@ -48,6 +53,11 @@ module Zypper
|
|
48
53
|
|
49
54
|
end
|
50
55
|
|
56
|
+
class FileNotFound < StandardError
|
57
|
+
def initialize(filename)
|
58
|
+
super "The File #{filename} doesn't exist."
|
59
|
+
end
|
60
|
+
end
|
51
61
|
|
52
62
|
class ReleaseFileNotFound < StandardError
|
53
63
|
def initialize
|
@@ -65,29 +75,49 @@ module Zypper
|
|
65
75
|
def initialize(filename)
|
66
76
|
super "Don't have the right permission to write #{filename}"
|
67
77
|
end
|
78
|
+
|
79
|
+
def error_code
|
80
|
+
4
|
81
|
+
end
|
68
82
|
end
|
69
83
|
|
70
84
|
class SystemUpdateRunning < StandardError
|
71
85
|
def initialize(args)
|
72
86
|
super "The application #{args[:process].bold} with pid #{args[:pid].bold} is running a system update!"
|
73
87
|
end
|
88
|
+
|
89
|
+
def error_code
|
90
|
+
5
|
91
|
+
end
|
74
92
|
end
|
75
93
|
|
76
94
|
class UnableToUpgrade < StandardError
|
77
95
|
def initialize(args)
|
78
96
|
super "The repository n.#{args[:num].to_s.bold.red} named #{args[:repo].name.bold.red} can't be upgraded, a manual check is required!"
|
79
97
|
end
|
98
|
+
|
99
|
+
def error_code
|
100
|
+
7
|
101
|
+
end
|
80
102
|
end
|
81
103
|
|
82
104
|
class MissingOverride < StandardError
|
83
105
|
def initialize(args)
|
84
|
-
super "The repository n.#{args[:num].to_s.bold.red} named #{args[:ini]['
|
106
|
+
super "The repository n.#{args[:num].to_s.bold.red} named #{args[:ini]['name'].bold.red} doesn't contain the URL key!"
|
107
|
+
end
|
108
|
+
|
109
|
+
def error_code
|
110
|
+
8
|
85
111
|
end
|
86
112
|
end
|
87
113
|
|
88
114
|
class UnmatchingOverrides < StandardError
|
89
115
|
def initialize(args)
|
90
|
-
super "The repository n.#{args[:num]} named #{args[:repo].name.bold.red} doesn't match with the repository named #{args[:ini]['
|
116
|
+
super "The repository n.#{args[:num]} named #{args[:repo].name.bold.red} doesn't match with the repository named #{args[:ini]['name'].bold.red} in the ini file"
|
117
|
+
end
|
118
|
+
|
119
|
+
def error_code
|
120
|
+
9
|
91
121
|
end
|
92
122
|
end
|
93
123
|
|
@@ -95,12 +125,20 @@ module Zypper
|
|
95
125
|
def initialize(version)
|
96
126
|
super "The system is already upgraded to the #{version} version"
|
97
127
|
end
|
128
|
+
|
129
|
+
def error_code
|
130
|
+
2
|
131
|
+
end
|
98
132
|
end
|
99
133
|
|
100
134
|
class NoConnection < StandardError
|
101
135
|
def initialize
|
102
136
|
super 'Internet connection has some trouble'
|
103
137
|
end
|
138
|
+
|
139
|
+
def error_code
|
140
|
+
6
|
141
|
+
end
|
104
142
|
end
|
105
143
|
|
106
144
|
class Interruption < StandardError
|
@@ -160,7 +160,7 @@ module Zypper
|
|
160
160
|
|
161
161
|
def self.redirected(num, repo, max_col, redirected)
|
162
162
|
self.info num, 'Redirected', repo, false
|
163
|
-
puts "
|
163
|
+
puts "redirected_to=#{redirected}"
|
164
164
|
end
|
165
165
|
|
166
166
|
def self.not_found(num, repo, max_col)
|
@@ -169,8 +169,8 @@ module Zypper
|
|
169
169
|
|
170
170
|
def self.alternative(num, repo, max_col, alt)
|
171
171
|
self.info num, 'Not Found', repo, false
|
172
|
-
puts "
|
173
|
-
puts "
|
172
|
+
puts "hint=#{alt[:message]}"
|
173
|
+
puts "suggested_url=#{alt[:url]}" unless alt[:url].to_s.empty?
|
174
174
|
end
|
175
175
|
|
176
176
|
def self.timeout(num, repo, max_col)
|
@@ -200,14 +200,34 @@ module Zypper
|
|
200
200
|
|
201
201
|
def self.info(num, status, repo, valid = true)
|
202
202
|
@@number = num
|
203
|
-
puts "[
|
204
|
-
puts "
|
205
|
-
puts "
|
206
|
-
puts "
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
203
|
+
puts "[repository_#{num}]"
|
204
|
+
puts "name=#{repo.name}"
|
205
|
+
puts "alias=#{repo.alias}"
|
206
|
+
puts "old_url=#{repo.old_url}"
|
207
|
+
if valid
|
208
|
+
puts "url=#{repo.url}"
|
209
|
+
elsif repo.enabled?
|
210
|
+
puts <<-'HEADER'.gsub(/^ +/, '')
|
211
|
+
# The interpolated URL is invalid, try overriding with the one suggested
|
212
|
+
# in the fields below or find it manually starting from the old_url.
|
213
|
+
# The alternatives are:
|
214
|
+
# 1. Waiting for a repository upgrade;
|
215
|
+
# 2. Change the provider for the related installed packages;
|
216
|
+
# 3. Disable the repository putting the enabled status to 'No'.
|
217
|
+
#
|
218
|
+
url=
|
219
|
+
HEADER
|
220
|
+
else
|
221
|
+
puts <<-'HEADER'.gsub(/^ +/, '')
|
222
|
+
# The interpolated URL is invalid, but being the repository disabled you can
|
223
|
+
# keep the old_url in the field below, it will be ignored anyway during the
|
224
|
+
# normal update and upgrade process.
|
225
|
+
HEADER
|
226
|
+
puts "url=#{repo.old_url}"
|
227
|
+
end
|
228
|
+
puts "priority=#{repo.priority}"
|
229
|
+
puts "enabled=#{repo.enabled? ? 'Yes' : 'No'}"
|
230
|
+
puts "status=#{status}"
|
211
231
|
end
|
212
232
|
end
|
213
233
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zypper-upgraderepo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fabio Mucciante
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-07-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -89,6 +89,7 @@ executables:
|
|
89
89
|
extensions: []
|
90
90
|
extra_rdoc_files: []
|
91
91
|
files:
|
92
|
+
- ".github/FUNDING.yml"
|
92
93
|
- ".gitignore"
|
93
94
|
- ".rspec"
|
94
95
|
- ".travis.yml"
|
@@ -115,7 +116,7 @@ licenses:
|
|
115
116
|
- GPL-3.0
|
116
117
|
metadata:
|
117
118
|
bug_tracker_uri: https://github.com/fabiomux/zypper-upgraderepo/issues
|
118
|
-
documentation_uri: https://www.rubydoc.info/gems/zypper-upgraderepo/1.
|
119
|
+
documentation_uri: https://www.rubydoc.info/gems/zypper-upgraderepo/1.4.0
|
119
120
|
homepage_uri: https://github.com/fabiomux/zypper-upgraderepo
|
120
121
|
source_code_uri: https://github.com/fabiomux/zypper-upgraderepo
|
121
122
|
wiki_uri: https://github.com/fabiomux/zypper-upgraderepo/wiki
|