from daklib.regexes import html_escaping, re_html_escaping, re_version, re_spacestrip, \
re_contrib, re_nonfree, re_localhost, re_newlinespace, \
re_package, re_doc_directory
from daklib.regexes import html_escaping, re_html_escaping, re_version, re_spacestrip, \
re_contrib, re_nonfree, re_localhost, re_newlinespace, \
re_package, re_doc_directory
package_relations = {} #: Store relations of packages for later output
# default is to not output html.
package_relations = {} #: Store relations of packages for later output
# default is to not output html.
'nonfree': ('<span style="color: red">',"</span>"),
'arch': ('<span style="color: green">',"</span>"),
'bold': ('<span style="font-weight: bold">',"</span>"),
'nonfree': ('<span style="color: red">',"</span>"),
'arch': ('<span style="color: green">',"</span>"),
'bold': ('<span style="font-weight: bold">',"</span>"),
- 'maintainer': ('<span style="color: green">',"</span>")}
+ 'maintainer': ('<span style="color: green">',"</span>"),
+ 'distro': ('<span style="font-weight: bold; background-color: red">',"</span>")}
elif k == "architecture":
if (dsc["architecture"] != "any"):
dsc['architecture'] = colour_output(dsc["architecture"], 'arch')
elif k == "architecture":
if (dsc["architecture"] != "any"):
dsc['architecture'] = colour_output(dsc["architecture"], 'arch')
elif k in ("files","changes","description"):
if use_html:
dsc[k] = formatted_text(dsc[k], strip=True)
elif k in ("files","changes","description"):
if use_html:
dsc[k] = formatted_text(dsc[k], strip=True)
def create_depends_string (suite, depends_tree, session = None):
result = ""
if suite == 'experimental':
def create_depends_string (suite, depends_tree, session = None):
result = ""
if suite == 'experimental':
- res = get_binary_from_name_suite(d['name'], suite_where, session)
- if res.rowcount > 0:
- i = res.fetchone()
-
+ component = get_component_by_package_suite(d['name'], suite_list, \
+ session = session)
+ if component is not None:
result += colour_output(adepends, "nonfree")
else :
result += colour_output(adepends, "main")
result += colour_output(adepends, "nonfree")
else :
result += colour_output(adepends, "main")
return do_command("lintian --show-overrides --color always", filename, 1)
def get_copyright (deb_filename):
return do_command("lintian --show-overrides --color always", filename, 1)
def get_copyright (deb_filename):
package = re_package.sub(r'\1', deb_filename)
o = os.popen("dpkg-deb -c %s | egrep 'usr(/share)?/doc/[^/]*/copyright' | awk '{print $6}' | head -n 1" % (deb_filename))
package = re_package.sub(r'\1', deb_filename)
o = os.popen("dpkg-deb -c %s | egrep 'usr(/share)?/doc/[^/]*/copyright' | awk '{print $6}' | head -n 1" % (deb_filename))
return foldable_output(changes_filename, "changes", changes, norow=True)
def check_changes (changes_filename):
return foldable_output(changes_filename, "changes", changes, norow=True)
def check_changes (changes_filename):