[Python-modules-commits] r8389 - in packages/python-django-tagging/trunk/debian (6 files)

hertzog at users.alioth.debian.org hertzog at users.alioth.debian.org
Fri May 8 10:30:44 UTC 2009


    Date: Friday, May 8, 2009 @ 10:30:43
  Author: hertzog
Revision: 8389

  Closes: #525770

Added:
  packages/python-django-tagging/trunk/debian/patches/
  packages/python-django-tagging/trunk/debian/patches/fix_calc_tag_weight
  packages/python-django-tagging/trunk/debian/patches/series
Modified:
  packages/python-django-tagging/trunk/debian/changelog
  packages/python-django-tagging/trunk/debian/control
  packages/python-django-tagging/trunk/debian/rules

Modified: packages/python-django-tagging/trunk/debian/changelog
===================================================================
--- packages/python-django-tagging/trunk/debian/changelog	2009-05-07 22:11:08 UTC (rev 8388)
+++ packages/python-django-tagging/trunk/debian/changelog	2009-05-08 10:30:43 UTC (rev 8389)
@@ -1,3 +1,10 @@
+python-django-tagging (0.2.1+svn154-2) unstable; urgency=low
+
+ * Apply patch to fix weight of tag when using logarithmic distribution.
+    Closes: #525770
+
+ -- Raphael Hertzog <hertzog at debian.org>  Fri, 08 May 2009 12:30:16 +0200
+
 python-django-tagging (0.2.1+svn154-1) unstable; urgency=low
 
   [ Sandro Tosi ]

Modified: packages/python-django-tagging/trunk/debian/control
===================================================================
--- packages/python-django-tagging/trunk/debian/control	2009-05-07 22:11:08 UTC (rev 8388)
+++ packages/python-django-tagging/trunk/debian/control	2009-05-08 10:30:43 UTC (rev 8389)
@@ -4,7 +4,7 @@
 Maintainer: Debian Python Modules Team <python-modules-team at lists.alioth.debian.org>
 Uploaders: Raphael Hertzog <hertzog at debian.org>, David Spreen <netzwurm at debian.org>
 Standards-Version: 3.8.1
-Build-Depends: debhelper (>= 7.0.50), python-dev
+Build-Depends: debhelper (>= 7.0.50), python-dev, quilt (>= 0.46-7)
 Build-Depends-Indep: python-support, python-docutils
 Vcs-Svn: svn://svn.debian.org/python-modules/packages/python-django-tagging/trunk/
 Vcs-Browser: http://svn.debian.org/viewsvn/python-modules/packages/python-django-tagging/trunk/

Added: packages/python-django-tagging/trunk/debian/patches/fix_calc_tag_weight
===================================================================
--- packages/python-django-tagging/trunk/debian/patches/fix_calc_tag_weight	                        (rev 0)
+++ packages/python-django-tagging/trunk/debian/patches/fix_calc_tag_weight	2009-05-08 10:30:43 UTC (rev 8389)
@@ -0,0 +1,19 @@
+Description: Fix tag_weight when using logarithmic distribution
+ When logarithmic distribution is used _calculate_tag_weight may
+ return weight greater than maximum threshold. Because of this the attribute
+ font_size of the most frequently used tag may be left unset.
+Upstream: http://code.google.com/p/django-tagging/issues/detail?id=91
+Debian: #525770
+
+--- django-tagging.old/tagging/utils.py	(revision 132)
++++ django-tagging/tagging/utils.py	(working copy)
+@@ -230,7 +230,7 @@
+     if distribution == LINEAR or max_weight == 1:
+         return weight
+     elif distribution == LOGARITHMIC:
+-        return math.log(weight) * max_weight / math.log(max_weight)
++        return min((max_weight, math.log(weight) * max_weight / math.log(max_weight)))
+     raise ValueError(_('Invalid distribution algorithm specified: %s.') % distribution)
+ 
+ def calculate_cloud(tags, steps=4, distribution=LOGARITHMIC):
+

Added: packages/python-django-tagging/trunk/debian/patches/series
===================================================================
--- packages/python-django-tagging/trunk/debian/patches/series	                        (rev 0)
+++ packages/python-django-tagging/trunk/debian/patches/series	2009-05-08 10:30:43 UTC (rev 8389)
@@ -0,0 +1 @@
+fix_calc_tag_weight

Modified: packages/python-django-tagging/trunk/debian/rules
===================================================================
--- packages/python-django-tagging/trunk/debian/rules	2009-05-07 22:11:08 UTC (rev 8388)
+++ packages/python-django-tagging/trunk/debian/rules	2009-05-08 10:30:43 UTC (rev 8389)
@@ -3,7 +3,7 @@
 PKG = $(shell dh_listpackages)
 
 %:
-	dh $@
+	dh --with quilt $@
 
 override_dh_installdocs:
 	dh_installdocs




More information about the Python-modules-commits mailing list