Commit caa6b08a authored by Leo Iannacone's avatar Leo Iannacone

Merge remote-tracking branch 'github/master' into portable

parents fb1d237e eb9f0a2a
# unreleased # unreleased
* [new] [module] add parser for blhc log file
* [new] show file size for package files * [new] show file size for package files
* [new] disable autoscroll pressing on "back on top" panel * [new] disable autoscroll pressing on "back on top" panel
* [fix] [module] use readline while parsing piuparts log file
* [fix] add support to sourceupload.changes
* [fix] add support to source format 1.0 - closes #6
# 1.0.0 (2014-07-23) # 1.0.0 (2014-07-23)
* Migrate to coffee-script, code refactory * Migrate to coffee-script, code refactory
......
...@@ -120,7 +120,7 @@ class DebomaticModule_JSONLogger: ...@@ -120,7 +120,7 @@ class DebomaticModule_JSONLogger:
infofd.write(json + '\n') infofd.write(json + '\n')
def _get_human_size(self, num): def _get_human_size(self, num):
for x in ['b', 'KB', 'MB', 'GB', 'TB']: for x in ['B ', 'KB', 'MB', 'GB', 'TB']:
if num < 1024.0: if num < 1024.0:
return "%3.1f %s" % (num, x) return "%3.1f %s" % (num, x)
num /= 1024.0 num /= 1024.0
...@@ -180,6 +180,8 @@ class LogParser(): ...@@ -180,6 +180,8 @@ class LogParser():
result = self.parse_autopkgtest() result = self.parse_autopkgtest()
elif self.extension == 'piuparts': elif self.extension == 'piuparts':
result = self.parse_piuparts() result = self.parse_piuparts()
elif self.extension == 'blhc':
result = self.parse_blhc()
return result return result
def parse_lintian(self): def parse_lintian(self):
...@@ -218,6 +220,17 @@ class LogParser(): ...@@ -218,6 +220,17 @@ class LogParser():
return 'E' return 'E'
return None return None
def parse_blhc(self):
tags = defaultdict(int)
with open(self.file, 'r') as fd:
for line in fd:
info = line.split()
if info[1] != 'missing':
continue
tag = info[0].replace('FLAGS', '')
tags[tag] += 1
return sorted(list(tags.keys()))
def _from_tags_to_result(self, tags): def _from_tags_to_result(self, tags):
keys = sorted(list(tags.keys())) keys = sorted(list(tags.keys()))
result = ["%s%s" % (k, tags[k]) for k in keys] result = ["%s%s" % (k, tags[k]) for k in keys]
......
...@@ -21,12 +21,14 @@ get_files_list_from_package = (data, callback) -> ...@@ -21,12 +21,14 @@ get_files_list_from_package = (data, callback) ->
file.name = f.split("_")[0] file.name = f.split("_")[0]
if file.extension in ["deb", "ddeb", "udeb"] if file.extension in ["deb", "ddeb", "udeb"]
data.package.debs.push(file) data.package.debs.push(file)
else if file.extension in ["changes", "dsc"] or f.indexOf('.tar') > 0 else if file.extension in ["changes", "dsc"] or f.indexOf('.tar.') > 0 or f.indexOf('.diff.') > 0
file.name = f.replace(data.package.orig_name + ".", "") file.name = f.replace(data.package.orig_name + ".", "")
if file.extension is "changes" if file.extension is "changes"
file.name = file.extension file.name = f.split('_').pop()
else if f.indexOf('.orig.tar') > 0 else if f.indexOf('.orig.tar') > 0
file.name = "orig." + f.split(".orig.").pop() file.name = "orig." + f.split(".orig.").pop()
else if f.indexOf('.diff.') > 0
file.name = "diff." + f.split(".diff.").pop()
data.package.sources.push(file) data.package.sources.push(file)
else else
file.name = file.extension file.name = file.extension
......
...@@ -75,7 +75,7 @@ aside .nav-pills li { ...@@ -75,7 +75,7 @@ aside .nav-pills li {
#sidebar .fixed { #sidebar .fixed {
position: fixed; position: fixed;
width: 220px !important; min-width: 220px !important;
top: 0; top: 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment