zypper-upgraderepo 1.6.1 → 1.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +40 -27
- data/lib/zypper/upgraderepo/repository.rb +5 -2
- data/lib/zypper/upgraderepo/traversable.rb +2 -2
- data/lib/zypper/upgraderepo/version.rb +1 -1
- data/lib/zypper/upgraderepo/view.rb +17 -1
- data/lib/zypper/upgraderepo.rb +2 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c70f8e680b1c6c86d0c556a6761cb0738dc3b39422109a679ccaeee34d1a0d26
|
4
|
+
data.tar.gz: edc57ec51daa46b5443f4cf928af1884b5cbdbd5779b687eec38dd98d021f9ef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 15495fdd8f2619194293bc2ab113043c343c11f5aada78d8db338937f65365b9b475f4f7725dbcfe4f207df452705e80b8a8dd991338003982784db7154a4251
|
7
|
+
data.tar.gz: 6de4b17c55d6693f7c020eeb7226524e738be9ef1ca1e1e166cb0cfd14ecef53eef32952c371e75cd5d20c15fa1de88894b6dc63d12a1c1871f7f481489122be
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,51 +1,64 @@
|
|
1
1
|
# Zypper-Upgraderepo
|
2
2
|
|
3
|
-
Zypper-Upgraderepo helps to check and upgrade the repositories used in your system
|
4
|
-
|
3
|
+
Zypper-Upgraderepo helps to check and upgrade the repositories used in your system for the
|
4
|
+
current, next or a custom valid version, reporting the errors and trying to find a replacement
|
5
|
+
when possible.
|
5
6
|
|
6
|
-
It can be
|
7
|
+
It can be also be installed as Zypper plugin using the [Zypper Upgraderepo Plugin][zypper_upgraderepo_plugin].
|
7
8
|
|
8
9
|
## Installation
|
9
10
|
|
10
|
-
|
11
|
+
There are several options to install the service menus listed in this repository.
|
11
12
|
|
12
|
-
|
13
|
+
### Rubygem
|
13
14
|
|
14
|
-
|
15
|
+
Install it as a regular Ruby gem with:
|
16
|
+
```shell
|
17
|
+
$ gem install zypper-upgraderepo
|
18
|
+
```
|
19
|
+
|
20
|
+
### From the openSUSE Build Service repository
|
21
|
+
|
22
|
+
This application has been packaged in my personal OBS repository so you can install It
|
23
|
+
as a common RPM package:
|
24
|
+
- Add the repository URL in your list;
|
25
|
+
- install the package from Yast or Zypper.
|
26
|
+
|
27
|
+
Being the repository URL slightly changing from a version to another, I included all the steps
|
28
|
+
in the related [project page][project_page] on my blog.
|
15
29
|
|
16
30
|
## Usage
|
17
31
|
|
18
32
|
To check the availability of the current repositories:
|
19
|
-
|
20
|
-
|
33
|
+
```shell
|
34
|
+
$ zypper-upgraderepo
|
35
|
+
```
|
21
36
|
|
22
37
|
To check the availability of the next version repositories:
|
23
|
-
|
24
|
-
|
38
|
+
```shell
|
39
|
+
$ zypper-upgraderepo --check-next
|
40
|
+
```
|
25
41
|
|
26
42
|
To upgrade the repositories to the next version:
|
27
|
-
|
28
|
-
|
43
|
+
```shell
|
44
|
+
$ sudo zypper-upgraderepo --upgrade
|
45
|
+
```
|
29
46
|
|
30
47
|
## Get help
|
31
48
|
|
32
49
|
Where to start:
|
50
|
+
```shell
|
51
|
+
$ zypper-upgraderepo --help
|
52
|
+
```
|
33
53
|
|
34
|
-
|
35
|
-
|
36
|
-
More Help:
|
37
|
-
|
38
|
-
- The wiki page: https://github.com/fabiomux/zypper-upgraderepo
|
39
|
-
- openSUSE Lizards: https://lizards.opensuse.org/2018/08/07/zypper-upgraderepo-plugin-is-here/
|
40
|
-
|
41
|
-
## Related projects
|
42
|
-
|
43
|
-
- zypper-upgraderepo-plugin project: https://github.com/fabiomux/zypper-upgraderepo-plugin
|
44
|
-
|
45
|
-
## Contributing
|
54
|
+
## More Help:
|
46
55
|
|
47
|
-
|
56
|
+
More info is available at:
|
57
|
+
- the [Zypper-Upgraderepo GitHub wiki][zypper_upgraderepo_wiki];
|
58
|
+
- the article [Upgrading with Zypper][upgrading_with_zypper] on Freeaptitude blog.
|
48
59
|
|
49
|
-
## Code of Conduct
|
50
60
|
|
51
|
-
|
61
|
+
[zypper_upgraderepo_plugin]: https://github.com/fabiomux/zypper-upgraderepo-plugin "Zypper-Upgraderepo Plugin GitHub page"
|
62
|
+
[project_page]: https://freeaptitude.altervista.org/projects/zypper-upgraderepo.html "Zypper-Upgraderepo project page"
|
63
|
+
[zypper_upgraderepo_wiki]: https://github.com/fabiomux/zypper-upgraderepo/wiki "Zypper-Upgraderepo wiki page on GitHub"
|
64
|
+
[upgrading_with_zypper]: https://freeaptitude.altervista.org/articles/upgrading-opensuse-with-zypper.html "Upgrading openSUSE with Zypper"
|
@@ -20,6 +20,7 @@ module Zypper
|
|
20
20
|
@overrides = options.overrides
|
21
21
|
@upgrade_options = {alias: options.alias, name: options.name}
|
22
22
|
@list = []
|
23
|
+
@cpu_arch, @arch = `rpm --eval "%cpu_arch;%_arch"`.tr("\n", '').split(';')
|
23
24
|
|
24
25
|
Dir.glob(File.join(REPOSITORY_PATH, '*.repo')).each do |i|
|
25
26
|
r = Request.build(Repository.new(i), options.timeout)
|
@@ -31,7 +32,7 @@ module Zypper
|
|
31
32
|
|
32
33
|
@list.sort_by! { |x| x[:repo].send(options.sort_by) } if options.sort_by != :alias
|
33
34
|
|
34
|
-
load_overrides(options.
|
35
|
+
load_overrides(options.overrides_filename) if options.overrides_filename
|
35
36
|
end
|
36
37
|
|
37
38
|
def only_enabled?
|
@@ -67,6 +68,8 @@ module Zypper
|
|
67
68
|
r.url = r.url.gsub(/\$releasever_major/, version.split('.')[0])
|
68
69
|
.gsub(/\$releasever_minor/, version.split('.')[1])
|
69
70
|
.gsub(/\$releasever/, version)
|
71
|
+
.gsub(/\$basearch/, @arch)
|
72
|
+
.gsub(/\$arch/, @cpu_arch)
|
70
73
|
end
|
71
74
|
end
|
72
75
|
|
@@ -89,7 +92,7 @@ module Zypper
|
|
89
92
|
if x = ini["repository_#{num}"]
|
90
93
|
repo.enable!(x['enabled'])
|
91
94
|
raise UnmatchingOverrides, { num: num, ini: x, repo: repo } if repo.url != x['old_url']
|
92
|
-
if (
|
95
|
+
if (only_enabled?)
|
93
96
|
raise MissingOverride, { num: num, ini: x } unless x['url'] || x['enabled'] =~ /no|false|0/i
|
94
97
|
else
|
95
98
|
raise MissingOverride, { num: num, ini: x } unless x['url']
|
@@ -22,6 +22,11 @@ module Zypper
|
|
22
22
|
self.info(repo)
|
23
23
|
end
|
24
24
|
|
25
|
+
def self.forbidden(num, repo, max_col)
|
26
|
+
puts " #{num.to_s.rjust(2).bold.red} | Status: #{'Forbidden Path'.bold.red}"
|
27
|
+
self.info(repo)
|
28
|
+
end
|
29
|
+
|
25
30
|
def self.alternative(num, repo, max_col, alt)
|
26
31
|
puts " #{num.to_s.rjust(2).bold.red} | Status: #{'Not Found'.bold.red}"
|
27
32
|
puts " #{' ' * 2} | Hint: #{alt[:message].bold.yellow}"
|
@@ -98,7 +103,11 @@ module Zypper
|
|
98
103
|
end
|
99
104
|
|
100
105
|
def self.not_found(num, repo, max_col)
|
101
|
-
Messages.error("| #{num.to_s.rjust(2)} | #{repo.name.ljust(max_col, ' ')} | #{repo.enabled? ? ' Y ' : ' N '.yellow} |")
|
106
|
+
Messages.error("| #{num.to_s.rjust(2)} | #{repo.name.ljust(max_col, ' ')} | #{repo.enabled? ? ' Y ' : ' N '.yellow} | #{'Not Found'.bold.red}")
|
107
|
+
end
|
108
|
+
|
109
|
+
def self.forbidden(num, repo, max_col)
|
110
|
+
Messages.error("| #{num.to_s.rjust(2)} | #{repo.name.ljust(max_col, ' ')} | #{repo.enabled? ? ' Y ' : ' N '.yellow} | #{'Forbidden path'.bold.red}")
|
102
111
|
end
|
103
112
|
|
104
113
|
def self.alternative(num, repo, max_col, alt)
|
@@ -155,6 +164,9 @@ module Zypper
|
|
155
164
|
def self.not_found(num, repo, max_col)
|
156
165
|
end
|
157
166
|
|
167
|
+
def self.forbidden(num, repo, max_col)
|
168
|
+
end
|
169
|
+
|
158
170
|
def self.alternative(num, repo, max_col, alt)
|
159
171
|
end
|
160
172
|
|
@@ -198,6 +210,10 @@ module Zypper
|
|
198
210
|
self.info num, 'Not Found', repo, false
|
199
211
|
end
|
200
212
|
|
213
|
+
def self.forbidden(num, repo, max_col)
|
214
|
+
self.info num, 'Forbidden Path', repo, false
|
215
|
+
end
|
216
|
+
|
201
217
|
def self.alternative(num, repo, max_col, alt)
|
202
218
|
self.info num, 'Not Found', repo, false
|
203
219
|
puts "hint=#{alt[:message]}"
|
data/lib/zypper/upgraderepo.rb
CHANGED
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.7.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: 2022-
|
11
|
+
date: 2022-10-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -116,7 +116,7 @@ licenses:
|
|
116
116
|
metadata:
|
117
117
|
bug_tracker_uri: https://github.com/fabiomux/zypper-upgraderepo/issues
|
118
118
|
changelog_uri: https://freeaptitude.altervista.org/projects/zypper-upgraderepo.html#changelog
|
119
|
-
documentation_uri: https://www.rubydoc.info/gems/zypper-upgraderepo/1.
|
119
|
+
documentation_uri: https://www.rubydoc.info/gems/zypper-upgraderepo/1.7.0
|
120
120
|
homepage_uri: https://freeaptitude.altervista.org/projects/zypper-upgraderepo.html
|
121
121
|
source_code_uri: https://github.com/fabiomux/zypper-upgraderepo
|
122
122
|
wiki_uri: https://github.com/fabiomux/zypper-upgraderepo/wiki
|