simp-rake-helpers 2.5.3 → 2.5.4

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
  SHA1:
3
- metadata.gz: 634a98e0e356154a6e3b6b7de9ff0d9eb770567c
4
- data.tar.gz: 489dd7824a61d2653f834c7b8aa439cc72d54af0
3
+ metadata.gz: a40b24af8acd6375996bbff04bae317ca1ca14ef
4
+ data.tar.gz: 0e7e32fa2e9b89c52835d7aa927f33155cd6ef9c
5
5
  SHA512:
6
- metadata.gz: 6fc82f8926ba09add101cbf6c25ac1af2e35d0e41b85eb36c5cae3b4aa315540b105148d7e14cdbe748187109bcd4c6a99663c0a640aeb18d92901ee23f0690d
7
- data.tar.gz: 8b15e4d15e6370e5ecbb56f380b51c49ff3b660dcb039242dacfe980abf67c816ae7212515a84ce3e4292d2d553cc619675e370f031056bc3e6699305da8d43e
6
+ metadata.gz: 4dfaa320cba4dced53633da150e2c172dd96b79f071df22299f2f858ecc7b760dd39847a4429e13d4c055f2b3d220f4f190afe36074563a260ae6b381f17db14
7
+ data.tar.gz: 37b47d3eedbf0e30b3dc8f94932b82f7e7a10cff047193e5a8dcecc4017d0f49a7fadcb64f94e79ee482dd7a0a111bfd665af6377ac9afa696e28e71b2d933ec
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ### 2.5.4 / 2016-09-12
2
+ * Several fixes for building on systems that are connected to the Red Hat
3
+ Network directly. Tested on AWS.
4
+
1
5
  ### 2.5.3 / 2016-08-31
2
6
  * Bumped the requirement for puppet-lint to >= 1.0 and < 3.0
3
7
 
data/lib/simp/rake.rb CHANGED
@@ -22,13 +22,7 @@ module Simp::Rake
22
22
 
23
23
  @puppetfile.each_module do |mod|
24
24
  path = mod[:path]
25
- if Dir.exists?(path)
26
- @module_paths.push(path)
27
- end
28
- end
29
-
30
- if @module_paths.empty?
31
- fail("Error: Could not find any module paths in 'Puppetfile.#{method}'")
25
+ @module_paths.push(path)
32
26
  end
33
27
  end
34
28
  end
@@ -98,6 +98,14 @@ module Simp::Rake::Build
98
98
  do_unpack = ENV['SIMP_BUILD_unpack'] != 'no'
99
99
  full_iso_name = ENV.fetch('SIMP_BUILD_iso_name', false)
100
100
  iso_name_tag = ENV.fetch('SIMP_BUILD_iso_tag', false)
101
+
102
+ # Skip a bunch of unnecessary stuff if we're passed a tarball
103
+ if tarball
104
+ do_docs = false
105
+ do_checkout = false
106
+ do_bundle = false
107
+ end
108
+
101
109
  @dirty_repos = nil
102
110
  @simp_output_iso = nil
103
111
 
@@ -50,6 +50,9 @@ module Simp::Rake::Build
50
50
  ) do |mod|
51
51
 
52
52
  status = true
53
+
54
+ fail("Could not find directory #{mod}") unless Dir.exist?(mod)
55
+
53
56
  next unless File.exists?(File.join(mod,'Gemfile'))
54
57
  puts "\n#{mod}\n" if verbose
55
58
  Dir.chdir(mod) do
@@ -182,7 +185,17 @@ module Simp::Rake::Build
182
185
  full_pkg = source.split('/').last
183
186
  unless File.exist?(full_pkg)
184
187
  puts("Downloading: #{full_pkg}")
185
- %x(curl -L --max-redirs 10 -s -o "#{full_pkg}" -k "#{source}")
188
+ unless @use_yumdownloader
189
+ %x(curl -L --max-redirs 10 -s -o "#{full_pkg}" -k "#{source}")
190
+ unless %x(file #{full_pkg}).include?('RPM')
191
+ @use_yumdownloader = true
192
+ FileUtils.rm(full_pkg)
193
+ end
194
+ end
195
+
196
+ if @use_yumdownloader
197
+ %x(yumdownloader -c #{yum_conf} #{File.basename(full_pkg,'.rpm')} 2>/dev/null )
198
+ end
186
199
 
187
200
  unless $?.success?
188
201
  raise(SIMPBuildException,"Could not download")
@@ -270,7 +283,7 @@ module Simp::Rake::Build
270
283
  end
271
284
  end
272
285
 
273
- return yum_conf
286
+ return File.absolute_path(yum_conf)
274
287
  end
275
288
 
276
289
  def get_known_packages(target_dir=Dir.pwd)
@@ -244,7 +244,7 @@ module Simp::Rake::Build
244
244
 
245
245
  r10k_helper.each_module do |mod|
246
246
  unless File.directory?(mod[:path])
247
- $stderr.puts("Warning: '#{mod[:path]}' is not a module...skipping")
247
+ $stderr.puts("Warning: '#{mod[:path]}' is not a module...skipping") if File.exist?(mod[:path])
248
248
  next
249
249
  end
250
250
 
@@ -643,6 +643,9 @@ protect=1
643
643
  try_build = true
644
644
  while(try_build) do
645
645
  begin
646
+
647
+ fail("Could not find directory #{dir}") unless Dir.exist?(dir)
648
+
646
649
  Dir.chdir(dir) do
647
650
  if File.exist?('Rakefile')
648
651
  unique_build = (get_cpu_limit != 1)
@@ -2,5 +2,5 @@ module Simp; end
2
2
  module Simp::Rake; end
3
3
 
4
4
  class Simp::Rake::Helpers
5
- VERSION = '2.5.3'
5
+ VERSION = '2.5.4'
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simp-rake-helpers
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.3
4
+ version: 2.5.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Tessmer
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-08-31 00:00:00.000000000 Z
12
+ date: 2016-09-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler