summaryrefslogtreecommitdiff
path: root/dedup
diff options
context:
space:
mode:
Diffstat (limited to 'dedup')
-rw-r--r--dedup/debpkg.py9
-rw-r--r--dedup/templates/binary.html9
-rw-r--r--dedup/templates/compare.html14
-rw-r--r--dedup/templates/hash.html2
4 files changed, 19 insertions, 15 deletions
diff --git a/dedup/debpkg.py b/dedup/debpkg.py
index dbee849..cd8616f 100644
--- a/dedup/debpkg.py
+++ b/dedup/debpkg.py
@@ -20,8 +20,13 @@ def process_control(control_contents):
depends = set(dep[0]["name"].split(u':', 1)[0].encode("ascii")
for dep in control.relations.get("depends", ())
if len(dep) == 1)
- return dict(package=package, source=source, version=version,
- architecture=architecture, depends=depends)
+ ret = dict(package=package, source=source, version=version,
+ architecture=architecture, depends=depends)
+ try:
+ ret["multiarch"] = control["multi-arch"].encode("ascii")
+ except KeyError:
+ pass
+ return ret
class MultiHash(object):
def __init__(self, *hashes):
diff --git a/dedup/templates/binary.html b/dedup/templates/binary.html
index 46c4fa6..bf9aad8 100644
--- a/dedup/templates/binary.html
+++ b/dedup/templates/binary.html
@@ -1,6 +1,7 @@
{% extends "base.html" %}
-{% block title %}duplication of {{ package|e }}{% endblock %}
-{% block content %}<h1>{{ package|e }}</h1>
+{% block title %}duplication of {{ package|e }}:{{ architecture|e }}{% endblock %}
+{% block content %}<h1>{{ package|e }}:{{ architecture|e }}</h1>
+<p>Package: {{ package|e }}</p>
<p>Version: {{ version|e }}</p>
<p>Architecture: {{ architecture|e }}</p>
<p>Number of files: {{ num_files }}</p>
@@ -11,8 +12,8 @@
<table border='1'><tr><th>package</th><th>files shared</th><th>data shared</th></tr>
{%- for entry in sharing|sort(attribute="savable", reverse=true) -%}
<tr><td{% if not entry.package or entry.package in dependencies %} class="dependency"{% endif %}>
- {%- if entry.package %}<a href="{{ entry.package|e }}"><span class="binary-package">{{ entry.package|e }}</span></a>{% else %}self{% endif %}
- <a href="../compare/{{ package|e }}/{{ entry.package|default(package, true)|e }}">compare</a></td>
+ {%- if entry.package %}<a href="./{{ entry.package|e }}:{{ entry.architecture|e }}"><span class="binary-package">{{ entry.package|e }}:{{ entry.architecture|e}}</span></a>{% else %}self{% endif %}
+ <a href="../compare/{{ package|e }}:{{ architecture|e }}/{{ entry.package|default(package, true)|e }}:{{ entry.architecture|default(architecture, true)|e }}">compare</a></td>
<td>{{ entry.duplicate }} ({{ (100 * entry.duplicate / num_files)|int }}%)</td>
<td>{{ entry.savable|filesizeformat }} ({{ (100 * entry.savable / total_size)|int }}%)</td></tr>
{%- endfor -%}
diff --git a/dedup/templates/compare.html b/dedup/templates/compare.html
index f78e80f..7d4564c 100644
--- a/dedup/templates/compare.html
+++ b/dedup/templates/compare.html
@@ -1,14 +1,12 @@
{% extends "base.html" %}
-{% block title %}sharing between {{ details1.package|e }} and {{ details2.package|e }}{% endblock%}
+{% block title %}sharing between {{ details1.package|e }}:{{ details1.architecture|e }} and {{ details2.package|e }}:{{ details2.architecture|e }}{% endblock%}
{% block content %}
-<h1><a href="../../binary/{{ details1.package|e }}">{{ details1.package|e }}</a> &lt;-&gt; <a href="../../binary/{{ details2.package|e }}">{{ details2.package|e }}</a></h1>
-<p>Version of {{ details1.package|e }}: {{ details1.version|e }}</p>
-<p>Architecture of {{ details1.package|e }}: {{ details1.architecture|e }}</p>
-{%- if details1.package != details2.package -%}
-<p>Version of {{ details2.package|e }}: {{ details2.version|e }}</p>
-<p>Architecture of {{ details2.package|e }}: {{ details2.architecture|e }}</p>
+<h1><a href="../../binary/{{ details1.package|e }}:{{ details1.architecture|e }}">{{ details1.package|e }}:{{ details1.architecture|e }}</a> &lt;-&gt; <a href="../../binary/{{ details2.package|e }}:{{ details2.architecture|e }}">{{ details2.package|e }}:{{ details2.architecture|e }}</a></h1>
+<p>Version of {{ details1.package|e }}:{{ details1.architecture|e }}: {{ details1.version|e }}</p>
+{%- if details1.package != details2.package or details1.architecture != details2.architecture -%}
+<p>Version of {{ details2.package|e }}:{{ details2.architecture|e }}: {{ details2.version|e }}</p>
{%- endif -%}
-<table border='1'><tr><th colspan="2">{{ details1.package|e }}</th><th colspan="2">{{ details2.package|e }}</th></tr>
+<table border='1'><tr><th colspan="2">{{ details1.package|e }}:{{ details1.architecture|e }}</th><th colspan="2">{{ details2.package|e }}:{{ details2.architecture|e }}</th></tr>
<tr><th>size</th><th>filename</th><th>hash functions</th><th>filename</th></tr>
{%- for entry in shared -%}
<tr><td{% if entry.matches|length > 1 %} rowspan={{ entry.matches|length }}{% endif %}>{{ entry.size|filesizeformat }}</td><td{% if entry.matches|length > 1 %} rowspan={{ entry.matches|length }}{% endif %}>
diff --git a/dedup/templates/hash.html b/dedup/templates/hash.html
index 7141f96..f700309 100644
--- a/dedup/templates/hash.html
+++ b/dedup/templates/hash.html
@@ -4,7 +4,7 @@
<h1>{{ function|e }} {{ hashvalue|e }}</h1>
<table border='1'><tr><th>package</th><th>filename</th><th>size</th><th>different function</th></tr>
{%- for entry in entries -%}
- <tr><td><a href="../../binary/{{ entry.package|e }}"><span class="binary-package">{{ entry.package|e }}</span></a></td>
+ <tr><td><a href="../../binary/{{ entry.package|e }}:{{ entry.architecture|e }}"><span class="binary-package">{{ entry.package|e }}:{{ entry.architecture|e }}</span></a></td>
<td><span class="filename">{{ entry.filename|e }}</span></td><td>{{ entry.size|filesizeformat }}</td>
<td>{% if function != entry.function %}{{ entry.function|e }}{% endif %}</td></tr>
{%- endfor -%}