sysdeps 0.0.5 → 0.0.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.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/bin/sysdeps +10 -10
  3. data/changelog +7 -2
  4. data/lib/sysdeps.rb +3 -1
  5. metadata +4 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4215119bde35d18ba1ba03adef23017b02c4fcc912c057a9218d6ba96b22ea6f
4
- data.tar.gz: 9a5d37cecf51848a314d6cf2576d86399182f6558e5331b04890e939068e49a1
3
+ metadata.gz: 12746c2ddf702510440de402f406f3079cb9fd6be551c38de245123d4d9a428e
4
+ data.tar.gz: b8bf4401086b5cfee95362c3773a5f2847237638b0ddb68eb4647897364b3f33
5
5
  SHA512:
6
- metadata.gz: b53d2241bb2edd4f7cdc91020764ddfcbdcfd4a62af11d97c8a42177c3ed018c97e48b1d355932f37a17f888d5d0fbda3f1320469e59e96f651fd6330f23f486
7
- data.tar.gz: 88926dac634285fa0353c6b7ba165b259dd07b378c1faddf3455cb4a0f5b61a95c410c463df016aeafea12d57d688c533c64eeaabad562d21ba2a63b8051b016
6
+ metadata.gz: ee340267f45ece6746b75826964dd293545fdb4c66e6a269d4c640742c3b34cb020f05e432523bd7457258cf5a72533e8a001818c7bfe39c70839a03178abb49
7
+ data.tar.gz: eb37503e553e676c0d35b6ebf2f6c57472ce19526430b0601cfa3cd1117578dd45a85574a290aeb768b4f6f359145d103793fad68c22e5a8c3ca4d02d2fa53e9
@@ -19,7 +19,7 @@ require 'json'
19
19
 
20
20
  include SysDeps
21
21
 
22
- VERSION = '0.0.5'
22
+ VERSION = '0.0.6'
23
23
  CACHE_PATH = ENV['HOME'] + '/.sysdeps_cache.json'
24
24
 
25
25
  KDEPENDENCIES = 'dependencies'.freeze
@@ -48,20 +48,20 @@ help = ->() {
48
48
 
49
49
 
50
50
  build_cache = ->() {
51
- STDERR.print 'Collecting system libs infos ... '
52
- syslibs = SysDeps.get_syslibs ['/proc', '/sys', '/dev']
53
- STDERR.puts 'done'
51
+ STDERR.print 'Building cache ... '
54
52
 
55
- STDERR.print 'Collecting dependencies of programs ... '
56
- prog_deps = get_programs_dependencies
57
- STDERR.puts 'done'
53
+ syslibs = Thread.new { SysDeps.get_syslibs ['/proc', '/sys', '/dev'] }
54
+ prog_deps = Thread.new { get_programs_dependencies }
55
+
56
+ syslibs.join
57
+ lib_deps = Thread.new { get_libraries_dependencies syslibs.value }
58
+ prog_deps.join
59
+ lib_deps.join
58
60
 
59
- STDERR.print 'Collecting dependencies of libraries ... '
60
- lib_deps = get_libraries_dependencies syslibs
61
61
  STDERR.puts 'done'
62
62
 
63
63
  File.open(CACHE_PATH, 'w+') { |f|
64
- f.write({syslibs: syslibs, prog_deps: prog_deps, lib_deps: lib_deps}.to_json) }}
64
+ f.write({syslibs: syslibs.value, prog_deps: prog_deps.value, lib_deps: lib_deps.value}.to_json) }}
65
65
 
66
66
 
67
67
  get_data_from_cache = ->(path) {
data/changelog CHANGED
@@ -9,9 +9,14 @@
9
9
  0.0.4:
10
10
  - fixed dead links
11
11
  - added -v option
12
- - scan the entire system for libraries instead of restricting search to specific
13
- paths, to support a wide set of linux distros
12
+ - scan the entire system for libraries instead of
13
+ restricting search to specific paths,
14
+ to support a wide set of linux distros
14
15
 
15
16
  0.0.5:
16
17
  - fixed utf-8 encoding error
17
18
  - do not scan only /proc, /sys, and /dev
19
+
20
+ 0.0.6:
21
+ - fixed error crash when building cache
22
+ - added minimal threading when collecting infos
@@ -40,7 +40,9 @@ get_syslibs = ->(excluded) {
40
40
 
41
41
  unless res.valid_encoding?
42
42
  res.encode("UTF-8", :invalid=>:replace, :replace=>"?")
43
- end .split
43
+ end
44
+
45
+ res .split
44
46
  .select { |l| l[sopat] && File.exist?(l) }
45
47
  .map { |l|
46
48
  if File.ftype(l) == LINK
metadata CHANGED
@@ -1,11 +1,11 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sysdeps
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Francesco Palumbo
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
  date: 2020-05-25 00:00:00.000000000 Z
@@ -29,7 +29,7 @@ homepage: https://gitlab.com/phranz/sysdeps
29
29
  licenses:
30
30
  - CC0-1.0
31
31
  metadata: {}
32
- post_install_message:
32
+ post_install_message:
33
33
  rdoc_options: []
34
34
  require_paths:
35
35
  - lib
@@ -45,7 +45,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
45
45
  version: '0'
46
46
  requirements: []
47
47
  rubygems_version: 3.1.2
48
- signing_key:
48
+ signing_key:
49
49
  specification_version: 4
50
50
  summary: Linux system dependencies helper
51
51
  test_files: []