zypper-upgraderepo 1.6.2 → 1.7.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 18cc5891a28448cb736aa7fb11771dd56ff3d4d16aa64f6de3cc9ff0f7e911ba
4
- data.tar.gz: 49941c4d37e829af7ab6ae5ca373b17dacd767de6f134f61977c1b8877674ac4
3
+ metadata.gz: c70f8e680b1c6c86d0c556a6761cb0738dc3b39422109a679ccaeee34d1a0d26
4
+ data.tar.gz: edc57ec51daa46b5443f4cf928af1884b5cbdbd5779b687eec38dd98d021f9ef
5
5
  SHA512:
6
- metadata.gz: 933bc9d1a6d59ef83dd79f68691fee9cc1bb8cb27b30162d2c21d413bbeb21e71c47511bb22cc2324d2b8fec4ca6a3176b7028b36bc445bc402220cdc8ba12ac
7
- data.tar.gz: 55080a22376510952bba606f34f6d804561a1fa5106706cc84262fe2c0163f265100f667aff0d54a03b2cf523c21fe8586ef283f259cd961d3945ac7fe4d9a0e
6
+ metadata.gz: 15495fdd8f2619194293bc2ab113043c343c11f5aada78d8db338937f65365b9b475f4f7725dbcfe4f207df452705e80b8a8dd991338003982784db7154a4251
7
+ data.tar.gz: 6de4b17c55d6693f7c020eeb7226524e738be9ef1ca1e1e166cb0cfd14ecef53eef32952c371e75cd5d20c15fa1de88894b6dc63d12a1c1871f7f481489122be
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- zypper-upgraderepo (1.6.2)
4
+ zypper-upgraderepo (1.7.0)
5
5
  iniparse
6
6
  minitar
7
7
 
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
- without have to do it manually.
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 used stand-alone or installed as _zypper_ plugin.
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
- Install it as:
11
+ There are several options to install the service menus listed in this repository.
11
12
 
12
- $ gem install zypper-upgraderepo
13
+ ### Rubygem
13
14
 
14
- If you want to install it as zypper plugin watch the _zypper-upgraderepo-plugin_ project linked below.
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
- $ zypper-upgraderepo --check-current
33
+ ```shell
34
+ $ zypper-upgraderepo
35
+ ```
21
36
 
22
37
  To check the availability of the next version repositories:
23
-
24
- $ zypper-upgraderepo --check-next
38
+ ```shell
39
+ $ zypper-upgraderepo --check-next
40
+ ```
25
41
 
26
42
  To upgrade the repositories to the next version:
27
-
28
- $ sudo zypper-upgraderepo --upgrade
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
- $ zypper-upgraderepo --help
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
- Bug reports and pull requests are welcome on GitHub at https://github.com/fabiomux/zypper-upgraderepo. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
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
- Everyone interacting in the Zypper::Upgraderepo project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/fabiomux/zypper-upgraderepo/blob/master/CODE_OF_CONDUCT.md).
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)
@@ -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
 
@@ -1,5 +1,5 @@
1
1
  module Zypper
2
2
  module Upgraderepo
3
- VERSION = "1.6.2"
3
+ VERSION = "1.7.0"
4
4
  end
5
5
  end
@@ -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]}"
@@ -100,6 +100,8 @@ module Zypper
100
100
  else
101
101
  @view_class.not_found num, repo, @repos.max_col
102
102
  end
103
+ elsif repo.forbidden?
104
+ @view_class.forbidden num, repo, @repos.max_col
103
105
  elsif repo.timeout?
104
106
  @view_class.timeout num, repo, @repos.max_col
105
107
  end
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.6.2
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-06-21 00:00:00.000000000 Z
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.6.2
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