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 +4 -4
- data/lib/plat4m/sniff/linux.rb +9 -2
- data/lib/plat4m/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '0568f72f0ee486986fb69681365388282d6a3ebce70cdd6aa7124b2c5ec7286e'
|
4
|
+
data.tar.gz: 9c6b999ec6a913a576a1ce05f242f6a6a8e8bcff45a9ed67ef81ce0db7f177b7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a1bf2e5b82143028990f8dc384228ab58d4bf861d7d2ee826ad40e1b734e7dc86748b0d0ed4ccc298fa56064c889e21ca82148faaf00d7ba831a86915d58ea1e
|
7
|
+
data.tar.gz: e06c38c1caa125f661446fec555ce6da4541259419fe680c4474de1a89a96e21d7dcdc37e4ffc71acf490b2fe722bd35c4e13f2b0939cdda847fdd1aa12d5ef0
|
data/lib/plat4m/sniff/linux.rb
CHANGED
@@ -94,8 +94,9 @@ module Plat4m
|
|
94
94
|
|
95
95
|
class NixManager < PkgManager
|
96
96
|
|
97
|
-
def initialize(
|
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
|
-
|
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)
|
data/lib/plat4m/version.rb
CHANGED
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.
|
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-
|
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
|