plat4m 1.1.5 → 1.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6c906e715c39405f297449cf7b02ee3503ae7aea84beb5c51c5705c6ca105e4c
4
- data.tar.gz: d3363054965588d0b904d01e15d2e1c0f05c0c26509e258d0c3c7274f53f1948
3
+ metadata.gz: d6bca919c92aa255cfcf8e1996eb7eedfe1bc7943982ac476c671521d17fc6c2
4
+ data.tar.gz: d36e3c5fadea55755eb420b1b362bfd7aa77fbc365f9f950c595ee90e5a151ec
5
5
  SHA512:
6
- metadata.gz: bebb7ce20b33d4e1a56e187dc9155a690be7f3f77c6fd6715b487b467f7d1dd59c95c3a95f168fec3732df56c5db5941efcdf53517f673a3b17e28ec4ed6de2c
7
- data.tar.gz: e2706a64af4d84ff9c20cdfa88d62f3004bc5e1d82014f88bf271434d8ec80b4e15490e4c9f8ac6673b9e4801590a118874cd2d9926850197010d76b0417b082
6
+ metadata.gz: 0c8192c2f6ba80b85ec725f51049c49491b796aa0cf1ece235aef691f07e715509e2a46fdd9fde25d81cbabd949dc99777bf8554c870103606784a1d54361919
7
+ data.tar.gz: 2eebd3fe3e7ea893d95a18d8762a99cf0bbf440a4398efd1bc3ed01c92e6a3d7a5884baf72a0da1780269540c3fd4ec4ac301fba803517fde9b53f2c08f9a9cc
@@ -88,7 +88,11 @@ module Plat4m
88
88
  when :suse
89
89
  Zypper.new(distro)
90
90
  when :arch
91
- Pacman.new(distro)
91
+ if distro[:distro] == 'manjaro'
92
+ Pamac.new(distro)
93
+ else
94
+ Pacman.new(distro)
95
+ end
92
96
  end
93
97
  distro
94
98
  end
@@ -261,6 +265,30 @@ module Plat4m
261
265
 
262
266
  end
263
267
 
268
+ class Pamac < NixManager
269
+
270
+ def installed?(pkg)
271
+ res = `pamac search -iq ^#{pkg}$ 2>&1`.chomp.split
272
+ !!(res.size == 1 && res.first =~ /^#{pkg}$/)
273
+ end
274
+
275
+ def available?(pkg)
276
+ res = `pamac search -rq ^#{pkg}$ 2>&1`.chomp.split
277
+ !!(res.size == 1 && res.first =~ /^#{pkg}$/)
278
+ end
279
+
280
+ protected
281
+
282
+ def get_install_command(*pkgs)
283
+ "pamac install --no-confirm #{ pkgs.join(' ') }"
284
+ end
285
+
286
+ def get_uninstall_command(*pkgs)
287
+ "pamac remove --no-confirm -u #{ pkgs.join(' ') }"
288
+ end
289
+
290
+ end
291
+
264
292
  end
265
293
 
266
294
  end
@@ -8,6 +8,6 @@
8
8
  module Plat4m
9
9
 
10
10
  # Current Plat4m version.
11
- VERSION = '1.1.5'.freeze
11
+ VERSION = '1.1.6'.freeze
12
12
 
13
13
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: plat4m
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.5
4
+ version: 1.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Corino
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-01-11 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
11
  dependencies: []
12
12
  description: Plat4m is a simple runtime system platform scouting and support library.
13
13
  email: mcorino@m2c-software.nl
@@ -46,7 +46,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  requirements: []
49
- rubygems_version: 3.6.2
49
+ rubygems_version: 3.6.9
50
50
  specification_version: 4
51
51
  summary: Runtime system detection.
52
52
  test_files: []