Ubuntu Pastebin

Paste from Harald Sitter at Thu, 12 Mar 2015 16:03:30 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/env ruby

`gunzip *gz`

versions = []
logs = {}
Dir.glob('*.txt').each do |file|
  p file
  unless file.start_with?('buildlog_ubuntu-')
    fail "File does not start with buildlog_...: #{file}"
  end
  _prefix, id, version, _state = file.split('_')
  # ubuntu-vivid-i386.foo-bar
  architecture = id.split('.').first.split('-').last
  # 2.1.0.3 + git20150218.1003 + 15.04-0ubuntu0
  versions << version.split('+')[0..-2].join('+')
  logs[architecture] = file
end
fail 'No logs found' if logs.empty?
versions.uniq!
versions.sort!
fail "More than one version found #{versions.join(' ')}" if versions.size > 1

args = []
args << 'batchpatch'
args << '-v' << versions.first
args << '-c' << logs.keys.join(',')
args << logs.values.join(' ')

puts `pkgkde-symbolshelper #{args.join(' ')}`
Download as text