origen 0.9.1 → 0.10.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/origen +24 -30
- data/bin/update +23 -0
- data/config/version.rb +1 -1
- metadata +5 -5
- data/bin/copy_system_gems +0 -60
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a74d6c5e91701aa0a8f1c90b52ae3fc3414b6403
|
4
|
+
data.tar.gz: 5736a47e4479517d364734301c98aa36f099a6a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e5b2083ade87f88644af98ec619de196fd688b49d162c54f89a3af19a71cddcef7a86860e240fd4b07b4ac8c14432991eba7b6b4ed6c845e3760e9552c81bc9f
|
7
|
+
data.tar.gz: dc4cf50f16fab69fe59d6108fb90ed7e5fb840a74d26230f102828820e3c3e83398540f019542368b0b0b32ee68a2c9d896fdee993996bbc89aae0ae1b39f3c2
|
data/bin/origen
CHANGED
@@ -51,20 +51,32 @@ if origen_root
|
|
51
51
|
ENV['BUNDLE_PATH'] = File.expand_path(Origen.site_config.gem_install_dir)
|
52
52
|
ENV['BUNDLE_BIN'] = File.join(origen_root, 'lbin')
|
53
53
|
|
54
|
-
|
55
|
-
|
56
|
-
# is helpful in a corporate environment with no sudo access to the Ruby installation
|
57
|
-
#
|
58
|
-
# This is invoked from an external process so that it can step out of this bundled environment
|
59
|
-
# and have visibility of the system gems
|
60
|
-
if Origen.site_config.gem_manage_bundler && Origen.site_config.gem_use_from_system
|
61
|
-
exe = File.expand_path('../copy_system_gems', __FILE__)
|
62
|
-
gems = Origen.site_config.gem_use_from_system.map { |g,v| "#{g} #{v}" }.join(' ')
|
54
|
+
if ARGV.first == 'update'
|
55
|
+
ARGV.shift
|
63
56
|
local_gem_dir = "#{ENV['BUNDLE_PATH']}/ruby/#{Pathname.new(Gem.dir).basename}"
|
57
|
+
updater_dir = Dir.glob("#{local_gem_dir}/gems/origen_updater-*").sort.last
|
58
|
+
exe = File.expand_path('../update', __FILE__)
|
64
59
|
require 'bundler'
|
60
|
+
|
61
|
+
args = ARGV.join(' ')
|
62
|
+
|
63
|
+
on_updated_callback = lambda do
|
64
|
+
Bundler.with_clean_env do
|
65
|
+
system "#{exe} #{origen_root} #{updater_dir}/lib/origen_updater/on_updated #{args}"
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
# This is invoked from an external process so that it can step out of this bundled environment
|
70
|
+
# and have visibility of the system gems
|
65
71
|
Bundler.with_clean_env do
|
66
|
-
system "#{exe} #{
|
72
|
+
system "#{exe} #{origen_root} #{updater_dir}/lib/origen_updater/update #{args}"
|
73
|
+
end
|
74
|
+
|
75
|
+
# Now fall through and act like 'origen -v'
|
76
|
+
while ARGV.size > 0 do
|
77
|
+
ARGV.pop
|
67
78
|
end
|
79
|
+
ARGV << '-v'
|
68
80
|
end
|
69
81
|
|
70
82
|
# If it looks like a bundled binstub of origen exists, and we have not been invoked through that,
|
@@ -145,13 +157,7 @@ if origen_root && File.exist?(ENV['BUNDLE_GEMFILE']) && Origen.site_config.gem_m
|
|
145
157
|
end
|
146
158
|
end
|
147
159
|
if result
|
148
|
-
|
149
|
-
# RGen and a new version running Origen
|
150
|
-
origen = File.join(ENV['BUNDLE_BIN'], 'origen')
|
151
|
-
rgen = File.join(ENV['BUNDLE_BIN'], 'rgen')
|
152
|
-
if File.exist?(rgen) && !File.exist?(origen) && Origen.os.linux?
|
153
|
-
exec "ln -s #{rgen} #{origen}"
|
154
|
-
end
|
160
|
+
on_updated_callback.call if on_updated_callback
|
155
161
|
exec "origen #{ARGV.join(' ')}"
|
156
162
|
exit 0
|
157
163
|
else
|
@@ -165,6 +171,7 @@ if origen_root && File.exist?(ENV['BUNDLE_GEMFILE']) && Origen.site_config.gem_m
|
|
165
171
|
Bundler.setup
|
166
172
|
end
|
167
173
|
end
|
174
|
+
on_updated_callback.call if on_updated_callback
|
168
175
|
require 'bundler/setup'
|
169
176
|
require 'origen'
|
170
177
|
else
|
@@ -172,19 +179,6 @@ else
|
|
172
179
|
require 'origen'
|
173
180
|
end
|
174
181
|
|
175
|
-
# This is a shim to help NXP run regression tests between an old version of an app running
|
176
|
-
# RGen and a new version running Origen
|
177
|
-
# If RGen < 3 is present then abort the process here and execute the rgen bin file instead
|
178
|
-
begin
|
179
|
-
require 'rgen'
|
180
|
-
if RGen.version.major == 2
|
181
|
-
exec Gem.ruby, "#{RGen.top}/bin/rgen", *ARGV
|
182
|
-
exit 0
|
183
|
-
end
|
184
|
-
rescue LoadError
|
185
|
-
# No problem, RGen not present
|
186
|
-
end
|
187
|
-
|
188
182
|
begin
|
189
183
|
# If this script has been invoked from within an Origen application then open
|
190
184
|
# up all commands, if not then only allow the command to create a new Origen
|
data/bin/update
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
$VERBOSE = nil # Don't care about world writable dir warnings and the like
|
3
|
+
|
4
|
+
require 'pathname'
|
5
|
+
#require 'byebug' # Un-comment to debug this file
|
6
|
+
|
7
|
+
# Keep a note of the pwd at the time when Origen was first loaded, this is initially used
|
8
|
+
# by the site_config lookup.
|
9
|
+
$_origen_invocation_pwd ||= Pathname.pwd
|
10
|
+
|
11
|
+
load File.expand_path('../../lib/origen/operating_systems.rb', __FILE__)
|
12
|
+
load File.expand_path('../../lib/origen/site_config.rb', __FILE__)
|
13
|
+
|
14
|
+
origen_root = ARGV.shift
|
15
|
+
|
16
|
+
# Force everyone to have a consistent way of installing gems with bundler
|
17
|
+
ENV['BUNDLE_GEMFILE'] = File.join(origen_root, 'Gemfile')
|
18
|
+
ENV['BUNDLE_PATH'] = File.expand_path(Origen.site_config.gem_install_dir)
|
19
|
+
ENV['BUNDLE_BIN'] = File.join(origen_root, 'lbin')
|
20
|
+
|
21
|
+
require ARGV.shift
|
22
|
+
|
23
|
+
|
data/config/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: origen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.10.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stephen McGinty
|
@@ -86,14 +86,14 @@ dependencies:
|
|
86
86
|
requirements:
|
87
87
|
- - '='
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: 1.7.2
|
89
|
+
version: 1.6.7.2
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - '='
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: 1.7.2
|
96
|
+
version: 1.6.7.2
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: rspec
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -346,8 +346,8 @@ executables:
|
|
346
346
|
extensions: []
|
347
347
|
extra_rdoc_files: []
|
348
348
|
files:
|
349
|
-
- bin/copy_system_gems
|
350
349
|
- bin/origen
|
350
|
+
- bin/update
|
351
351
|
- config/application.rb
|
352
352
|
- config/boot.rb
|
353
353
|
- config/commands.rb
|
@@ -583,7 +583,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
583
583
|
version: 1.8.11
|
584
584
|
requirements: []
|
585
585
|
rubyforge_project:
|
586
|
-
rubygems_version: 2.
|
586
|
+
rubygems_version: 2.5.1
|
587
587
|
signing_key:
|
588
588
|
specification_version: 4
|
589
589
|
summary: The Semiconductor Developer's Kit
|
data/bin/copy_system_gems
DELETED
@@ -1,60 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
$VERBOSE = nil # Don't care about world writable dir warnings and the like
|
3
|
-
#require 'byebug' # Un-comment to debug this file
|
4
|
-
require 'fileutils'
|
5
|
-
require 'pathname'
|
6
|
-
|
7
|
-
local_gem_dir = ARGV.shift
|
8
|
-
|
9
|
-
unless ARGV.empty?
|
10
|
-
%w(bin cache extensions gems specifications).each do |subdir|
|
11
|
-
d = "#{local_gem_dir}/#{subdir}"
|
12
|
-
FileUtils.mkdir_p(d) unless File.exist?(d)
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
|
-
ARGV.each_slice(2) do |gem, version|
|
17
|
-
begin
|
18
|
-
spec = Gem::Specification.find_by_name(gem, version)
|
19
|
-
begin
|
20
|
-
(spec.executables || []).each do |bin|
|
21
|
-
unless File.exist?("#{local_gem_dir}/bin/#{bin}")
|
22
|
-
FileUtils.cp("#{spec.bin_dir}/#{bin}", "#{local_gem_dir}/bin")
|
23
|
-
end
|
24
|
-
end
|
25
|
-
p = Pathname.new(spec.cache_file)
|
26
|
-
unless File.exist?("#{local_gem_dir}/cache/#{p.basename}")
|
27
|
-
FileUtils.cp(spec.cache_file, "#{local_gem_dir}/cache")
|
28
|
-
end
|
29
|
-
if spec.extension_dir && File.exist?(spec.extension_dir)
|
30
|
-
spec.extension_dir =~ /.*extensions(.*)/
|
31
|
-
sub_dir = Pathname.new(Regexp.last_match(1)).dirname.to_s
|
32
|
-
local_ext_dir = "#{local_gem_dir}/extensions/#{sub_dir}"
|
33
|
-
FileUtils.mkdir_p(local_ext_dir) unless File.exist?(local_ext_dir)
|
34
|
-
|
35
|
-
# If the file exists in the extensions directory, skip copying it over.
|
36
|
-
p = Pathname.new(spec.extension_dir)
|
37
|
-
unless File.exist?("#{local_ext_dir}/#{p.basename}")
|
38
|
-
FileUtils.cp_r(spec.extension_dir, local_ext_dir)
|
39
|
-
end
|
40
|
-
end
|
41
|
-
|
42
|
-
# If the file exists in the gem directory, skip copying it over.
|
43
|
-
p = Pathname.new(spec.gem_dir)
|
44
|
-
unless File.exist?("#{local_gem_dir}/gems/#{p.basename}")
|
45
|
-
FileUtils.cp_r(spec.gem_dir, "#{local_gem_dir}/gems")
|
46
|
-
end
|
47
|
-
# If the file exists in the specifications directory, skip copying it over.
|
48
|
-
p = Pathname.new(spec.spec_file)
|
49
|
-
unless File.exist?("#{local_gem_dir}/specifications/#{p.basename}")
|
50
|
-
FileUtils.cp(spec.spec_file, "#{local_gem_dir}/specifications")
|
51
|
-
end
|
52
|
-
rescue
|
53
|
-
puts "Had problems installing #{spec.name} from your system Ruby, proceeding with fingers crossed..."
|
54
|
-
end
|
55
|
-
|
56
|
-
rescue Gem::LoadError
|
57
|
-
# This just means that one of the gems that should be copied from the system
|
58
|
-
# was not actually installed in the system, so nothing we can do about that here
|
59
|
-
end
|
60
|
-
end
|