PyRRD upstream patch
authorJo-Philipp Wich <jow@openwrt.org>
Sun, 18 Mar 2012 20:56:30 +0000 (20:56 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Sun, 18 Mar 2012 20:56:30 +0000 (20:56 +0000)
re-submit upstream patch for pyrrd. this time it should not be mangled.

Signed-of-by: Roberto Riggio <roberto.riggio@create-net.org
SVN-Revision: 30992

lang/pyrrd/Makefile
lang/pyrrd/patches/200-fetch.patch [new file with mode: 0644]

index a5a3c96..c919cd7 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=pyrrd
 PKG_VERSION:=0.1.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=PyRRD-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://pypi.python.org/packages/source/P/PyRRD/
@@ -27,7 +27,7 @@ define Package/pyrrd
   CATEGORY:=Languages
   TITLE:=PyRRD - An Object-Oriented Python Interface for RRDTool
   URL:=http://code.google.com/p/pyrrd/
-  DEPENDS:=+python +distribute
+  DEPENDS:=+python +distribute +rrdtool
 endef
 
 define Package/pyrrd/description
diff --git a/lang/pyrrd/patches/200-fetch.patch b/lang/pyrrd/patches/200-fetch.patch
new file mode 100644 (file)
index 0000000..b547555
--- /dev/null
@@ -0,0 +1,31 @@
+--- a/pyrrd/backend/external.py    2011-10-19 05:33:13 +0000
++++ b/pyrrd/backend/external.py    2011-10-19 05:44:55 +0000
+@@ -262,7 +262,7 @@
+         data += [unicode(x) for x in obj.rra]
+         return (obj.filename, params + data)
+
+-    if function == 'update':
++    elif function == 'update':
+         validParams = ['template']
+         params = common.buildParameters(obj, validParams)
+         FIRST_VALUE = 0
+@@ -275,15 +275,15 @@
+             data = [data for data, nil in obj.values]
+         return (obj.filename, params + data)
+
+-    if function == 'fetch':
++    elif function == 'fetch':
+         validParams = ['resolution', 'start', 'end']
+         params = common.buildParameters(obj, validParams)
+-        return (obj.filename, obj.cf, params)
++        return (obj.filename, [obj.cf] + params)
+
+-    if function == 'info':
++    elif function == 'info':
+         return (obj.filename, obj)
+
+-    if function == 'graph':
++    elif function == 'graph':
+         validParams = ['start', 'end', 'step', 'title',
+             'vertical_label', 'width', 'height', 'only_graph',
+             'upper_limit', 'lower_limit', 'rigid', 'alt_autoscale',