crash-watch 1.1.9 → 1.1.10

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.
data.tar.gz.asc CHANGED
@@ -2,11 +2,11 @@
2
2
  Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
3
3
  Comment: GPGTools - http://gpgtools.org
4
4
 
5
- iQEcBAABAgAGBQJRoN3dAAoJECrHRaUKISqMtOUH/R3vYMTrTqNcqd02b9UJPERb
6
- G+kYMIND2e4zoGbsIUL+WcFohf3PphAyh0VQLW71T6e1k9O1mBNaleuU95ephruQ
7
- gfzA/dzcKk3dHD7xQTRm1MKJZS5b/zCowq1DSw9oPYl60tcTDELzw6G6DF1Kgq10
8
- Df8jXKzzbrRW/RQHbpAB1HItjTpXcy50FLiPGA1svMk4nUY0ssBtGX3yi0PDPGK3
9
- Mn5YqbVx/Q+rgJ9kBIBtqrn2/BPRN8et7SgWoy1nebVJNipf+0lbTk7daqVT55cb
10
- mNbNryT8oZFmC/1OICygSKT8aiwc7EsGptkXfRfO01Dfc5cTjgtEY/8VdF7ZUvU=
11
- =4hv1
5
+ iQEcBAABAgAGBQJSOVUqAAoJECrHRaUKISqMvdgH/iDoUNTq++b6Li7HaiXdhRV/
6
+ 6+EaBghhauYYxoUNAxsJTETbNKt0Hluw3acpkxCWJG8FAkmgHH0QzQYLAg4sDKQ3
7
+ I1V0ej0U8NeVm0eFbcATaZzBaj9fKKI+isWlx8JtBFWdaiRd6pLopPIR2F4YLYou
8
+ 4KTyQlqNzPE/arCLbzcqAMUxx6BchB1pbrp1iBNCKIhJnYIMrp9KKTd6KoEn0gto
9
+ 7tZlP+2gdEZgKq1bLfrjMDAc3SXR36rHVDQz7KC2//YgheLCEfl6CPJQpF1lc+7o
10
+ R0oCrV/7x3DSTV5WRg4xrWkllqnHMzfWqI+xI+e5CVm7dJ9TVcILY8RWfca0m+Q=
11
+ =yvSC
12
12
  -----END PGP SIGNATURE-----
data/Rakefile CHANGED
@@ -51,7 +51,7 @@ end
51
51
 
52
52
  PKG_DIR = string_option('PKG_DIR', "pkg")
53
53
  DEBIAN_NAME = PACKAGE_NAME
54
- ALL_DISTRIBUTIONS = ["raring", "precise", "lucid"]
54
+ ALL_DISTRIBUTIONS = string_option('DEBIAN_DISTROS', 'raring precise lucid').split(/[ ,]/)
55
55
  ORIG_TARBALL_FILES = lambda do
56
56
  require 'crash_watch/packaging'
57
57
  Dir[*CRASH_WATCH_FILES] - Dir[*CRASH_WATCH_EXCLUDE_FILES]
@@ -87,6 +87,7 @@ end
87
87
  # * Text inside #if/#elif/#else are automatically unindented.
88
88
  class Preprocessor
89
89
  def initialize
90
+ require 'erb' if !defined?(ERB)
90
91
  @indentation_size = 4
91
92
  @debug = boolean_option('DEBUG')
92
93
  end
@@ -100,10 +101,11 @@ class Preprocessor
100
101
  end
101
102
  the_binding = create_binding(variables)
102
103
  context = []
104
+ @filename = filename
103
105
  @lineno = 1
104
106
  @indentation = 0
105
107
 
106
- each_line(filename) do |line|
108
+ each_line(filename, the_binding) do |line|
107
109
  debug("context=#{context.inspect}, line=#{line.inspect}")
108
110
 
109
111
  name, args_string, cmd_indentation = recognize_command(line)
@@ -174,6 +176,8 @@ class Preprocessor
174
176
  else
175
177
  terminate "#endif is not allowed outside #if block"
176
178
  end
179
+ when "DEBHELPER"
180
+ output.puts(line)
177
181
  when "", nil
178
182
  # Either a comment or not a preprocessor command.
179
183
  case context.last
@@ -210,12 +214,18 @@ private
210
214
  "raring" => "13.04",
211
215
  "saucy" => "13.10"
212
216
  }
217
+ DEBIAN_DISTRIBUTIONS = {
218
+ "squeeze" => "20110206",
219
+ "wheezy" => "20130504"
220
+ }
213
221
 
214
222
  # Provides the DSL that's accessible within.
215
223
  class Evaluator
216
224
  def _infer_distro_table(name)
217
225
  if UBUNTU_DISTRIBUTIONS.has_key?(name)
218
226
  return UBUNTU_DISTRIBUTIONS
227
+ elsif DEBIAN_DISTRIBUTIONS.has_key?(name)
228
+ return DEBIAN_DISTRIBUTIONS
219
229
  end
220
230
  end
221
231
 
@@ -234,6 +244,7 @@ private
234
244
  table2 = _infer_distro_table(name)
235
245
  raise "Distribution name #{@distribution.inspect} not recognized" if !table1
236
246
  raise "Distribution name #{name.inspect} not recognized" if !table2
247
+ return false if table1 != table2
237
248
  v1 = table1[@distribution]
238
249
  v2 = table2[name]
239
250
 
@@ -257,16 +268,14 @@ private
257
268
  end
258
269
  end
259
270
 
260
- def each_line(filename)
261
- File.open(filename, 'r') do |f|
262
- while true
263
- begin
264
- line = f.readline.chomp
265
- rescue EOFError
266
- break
267
- end
268
- yield line
269
- end
271
+ def each_line(filename, the_binding)
272
+ data = File.open(filename, 'r') do |f|
273
+ erb = ERB.new(f.read, nil, "-")
274
+ erb.filename = filename
275
+ erb.result(the_binding)
276
+ end
277
+ data.each_line do |line|
278
+ yield line.chomp
270
279
  end
271
280
  end
272
281
 
@@ -274,7 +283,15 @@ private
274
283
  if line =~ /^([\s\t]*)#(.+)/
275
284
  indentation_str = $1
276
285
  command = $2
286
+
287
+ # Declare tabs as equivalent to 4 spaces. This is necessary for
288
+ # Makefiles in which the use of tabs is required.
289
+ indentation_str.gsub!("\t", " ")
290
+
277
291
  name = command.scan(/^\w+/).first
292
+ # Ignore shebangs and comments.
293
+ return if name.nil?
294
+
278
295
  args_string = command.sub(/^#{Regexp.escape(name)}[\s\t]*/, '')
279
296
  return [name, args_string, indentation_str.to_s.size]
280
297
  else
@@ -308,9 +325,24 @@ private
308
325
 
309
326
  def unindent(line)
310
327
  line =~ /^([\s\t]*)/
311
- found = $1.to_s.size
328
+ # Declare tabs as equivalent to 4 spaces. This is necessary for
329
+ # Makefiles in which the use of tabs is required.
330
+ found = $1.to_s.gsub("\t", " ").size
331
+
312
332
  if found >= @indentation
313
- return line[@indentation .. -1]
333
+ # Tab-friendly way to remove indentation.
334
+ remaining = @indentation
335
+ line = line.dup
336
+ while remaining > 0
337
+ if line[0..0] == " "
338
+ remaining -= 1
339
+ else
340
+ # This is a tab.
341
+ remaining -= 4
342
+ end
343
+ line.slice!(0, 1)
344
+ end
345
+ return line
314
346
  else
315
347
  terminate "wrong indentation: found #{found} characters, should be at least #{@indentation}"
316
348
  end
@@ -321,7 +353,7 @@ private
321
353
  end
322
354
 
323
355
  def terminate(message)
324
- abort "*** ERROR: line #{@lineno}: #{message}"
356
+ abort "*** ERROR: #{@filename} line #{@lineno}: #{message}"
325
357
  end
326
358
  end
327
359
 
@@ -376,7 +408,7 @@ def create_debian_package_dir(distribution)
376
408
  end
377
409
 
378
410
  task 'debian:orig_tarball' do
379
- if File.exist?("#{PKG_DIR}/#{DEBIAN_NAME}.orig.tar.gz")
411
+ if File.exist?("#{PKG_DIR}/#{DEBIAN_NAME}_#{PACKAGE_VERSION}.orig.tar.gz")
380
412
  puts "Debian orig tarball #{PKG_DIR}/#{DEBIAN_NAME}_#{PACKAGE_VERSION}.orig.tar.gz already exists."
381
413
  else
382
414
  sh "rm -rf #{PKG_DIR}/#{DEBIAN_NAME}_#{PACKAGE_VERSION}"
@@ -408,8 +440,18 @@ task 'debian:dev' do
408
440
  end
409
441
  end
410
442
 
411
- desc "Build Debian source packages to be uploaded to repositories"
412
- task 'debian:production' => 'debian:orig_tarball' do
443
+ desc "Build Debian source packages"
444
+ task 'debian:source_packages' => 'debian:orig_tarball' do
445
+ ALL_DISTRIBUTIONS.each do |distribution|
446
+ create_debian_package_dir(distribution)
447
+ end
448
+ ALL_DISTRIBUTIONS.each do |distribution|
449
+ sh "cd #{PKG_DIR}/#{distribution} && debuild -S -us -uc"
450
+ end
451
+ end
452
+
453
+ desc "Build Debian source packages to be uploaded to Launchpad"
454
+ task 'debian:launchpad' => 'debian:orig_tarball' do
413
455
  ALL_DISTRIBUTIONS.each do |distribution|
414
456
  create_debian_package_dir(distribution)
415
457
  sh "cd #{PKG_DIR}/#{distribution} && dpkg-checkbuilddeps"
@@ -46,7 +46,7 @@ $LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__) + "/../lib"))
46
46
  require 'crash_watch/gdb_controller'
47
47
  begin
48
48
  gdb = CrashWatch::GdbController.new
49
- rescue GdbWatch::Error => e
49
+ rescue CrashWatch::Error => e
50
50
  abort e.message
51
51
  end
52
52
  begin
@@ -1,3 +1,3 @@
1
1
  module CrashWatch
2
- VERSION_STRING = '1.1.9'
2
+ VERSION_STRING = '1.1.10'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: crash-watch
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.9
4
+ version: 1.1.10
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-05-25 00:00:00.000000000 Z
12
+ date: 2013-09-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: ffi
metadata.gz.asc CHANGED
@@ -2,11 +2,11 @@
2
2
  Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
3
3
  Comment: GPGTools - http://gpgtools.org
4
4
 
5
- iQEcBAABAgAGBQJRoN3dAAoJECrHRaUKISqMrRAH/0UTheexryuP9bNSJUEwzhra
6
- AONBxRrOkHS+LCVIhCMQuoGUearG+m1gFUAP3DCtqUtWC+0MAy6/8U+ncxvr7bwk
7
- /qqksKofHQPNCzuixjy7tY+uY4Dg/llXZd0PnzI2N/o8/N7epX8cud7Sw4/FUCS6
8
- Eia8sIu6LjvxVeWiX9dOepkTZGikmBhiE0m/LsTpeKPxs5qMq3ZSuNub0vqDNjhD
9
- n0SSOMTiFRWAnsmV3ldDLicoY9pB25eSYWshgbwBPky+rhsk4EO6EMFiwc1KsH6C
10
- vtgb5OCAFmEMpgITae8YMFcKQTZ/Jn6AznYMlQiY5Uh7cQdjpmX9HQJzrwfhDgo=
11
- =IW9j
5
+ iQEcBAABAgAGBQJSOVUqAAoJECrHRaUKISqMAksH/2xeLbe3E8gxUoPHNKu8xjFS
6
+ PIRCFVLleZMYmNNS6PsGmU+1zoqdT2jSIkM+ABDhTrrm0PsK62SnY+DNi1F61rH0
7
+ ECTHXbW34qd0nmQTVzxLFrjFdXoVavexqyXMW0DnFj3BJxNrb9Lud08oZRhQoxLu
8
+ 2bYHAvj0TNEBSQiQbLX/vo/ayQoY8UVDl68rhbyhAmdoDSbs3lqZSUzRzcJugtIC
9
+ eMxiHR9iTaUV02QBYrWwBOuK2vo+bJtePuGadxVCRGj0KY0KWVcbqlHQpfuh+cwU
10
+ jjSjBT/AnnusrGg3CtET7edDCmSRGIvRjojbIxa/t9bkHW+ZlcWdF3OmdNWTDUY=
11
+ =vLgH
12
12
  -----END PGP SIGNATURE-----