plat4m 1.1.3 → 1.1.4

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: 15ad6738f1fff758126da46f89b408b099562c7b63eed44adac9ff1337af8515
4
- data.tar.gz: 86e6a9b2dcff17fde635ec71a9b4bf461ced8243d9068e00adef7ed04c83f512
3
+ metadata.gz: '0568f72f0ee486986fb69681365388282d6a3ebce70cdd6aa7124b2c5ec7286e'
4
+ data.tar.gz: 9c6b999ec6a913a576a1ce05f242f6a6a8e8bcff45a9ed67ef81ce0db7f177b7
5
5
  SHA512:
6
- metadata.gz: c52d3410ee2d848bf2f8506dc00b2c5aea509ec9c58f32058316f9a3caf8a50411d97be36675ced3d1606e8e67f5e055e717492723e00f8a8c9a7759d07fd5d6
7
- data.tar.gz: 194f8f5eb5e11358738a11ea72a2f979f65db4286ee01c3103d9afa840adbd9caf23fb23b3d292ec87db4b110ff4e31b26e791078db4deeb4c63a761585f3a17
6
+ metadata.gz: a1bf2e5b82143028990f8dc384228ab58d4bf861d7d2ee826ad40e1b734e7dc86748b0d0ed4ccc298fa56064c889e21ca82148faaf00d7ba831a86915d58ea1e
7
+ data.tar.gz: e06c38c1caa125f661446fec555ce6da4541259419fe680c4474de1a89a96e21d7dcdc37e4ffc71acf490b2fe722bd35c4e13f2b0939cdda847fdd1aa12d5ef0
@@ -94,8 +94,9 @@ module Plat4m
94
94
 
95
95
  class NixManager < PkgManager
96
96
 
97
- def initialize(_distro)
97
+ def initialize(distro)
98
98
  super()
99
+ @distro = distro
99
100
  @has_sudo = system('command -v sudo > /dev/null')
100
101
  end
101
102
 
@@ -176,7 +177,13 @@ module Plat4m
176
177
  class Dnf < NixManager
177
178
 
178
179
  def installed?(pkg)
179
- system("dnf list installed #{pkg} >/dev/null 2>&1")
180
+ if @distro[:release] >= '41'
181
+ # dnf v5
182
+ system("dnf list --installed #{pkg} >/dev/null 2>&1")
183
+ else
184
+ # dnf <= v4
185
+ system("dnf list installed #{pkg} >/dev/null 2>&1")
186
+ end
180
187
  end
181
188
 
182
189
  def available?(pkg)
@@ -8,6 +8,6 @@
8
8
  module Plat4m
9
9
 
10
10
  # Current Plat4m version.
11
- VERSION = '1.1.3'
11
+ VERSION = '1.1.4'
12
12
 
13
13
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: plat4m
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.3
4
+ version: 1.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Corino
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-10-08 00:00:00.000000000 Z
11
+ date: 2024-11-01 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Plat4m is a simple runtime system platform scouting and support library.
14
14
  email: mcorino@m2c-software.nl