From: Luca Falavigna Date: Thu, 16 Aug 2012 09:35:34 +0000 (+0000) Subject: Do not show absolute filenames in examine-packages X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=22b21084cc3a93f8745413a5d31eb8fecbdaab16;p=dak.git Do not show absolute filenames in examine-packages Signed-off-by: Luca Falavigna --- diff --git a/dak/examine_package.py b/dak/examine_package.py index cbe78274..b56785bd 100755 --- a/dak/examine_package.py +++ b/dak/examine_package.py @@ -107,7 +107,7 @@ def headline(s, level=2, bodyelement=None): if bodyelement: return """ %(title)s (click to toggle) - \n"""%{"bodyelement":bodyelement,"title":utils.html_escape(s)} + \n"""%{"bodyelement":bodyelement,"title":utils.html_escape(os.path.basename(s))} else: return "%s\n" % (level, utils.html_escape(s), level) else: @@ -478,11 +478,11 @@ def get_copyright (deb_filename): copyrightmd5 = md5.md5(cright).hexdigest() res = "" - if printed.copyrights.has_key(copyrightmd5) and printed.copyrights[copyrightmd5] != "%s (%s)" % (package, deb_filename): + if printed.copyrights.has_key(copyrightmd5) and printed.copyrights[copyrightmd5] != "%s (%s)" % (package, os.path.basename(deb_filename)): res += formatted_text( "NOTE: Copyright is the same as %s.\n\n" % \ (printed.copyrights[copyrightmd5])) else: - printed.copyrights[copyrightmd5] = "%s (%s)" % (package, deb_filename) + printed.copyrights[copyrightmd5] = "%s (%s)" % (package, os.path.basename(deb_filename)) return res+formatted_text(cright) def get_readme_source (dsc_filename):