diff options
author | Guido Guenther <agx@sigxcpu.org> | 2006-09-09 17:16:14 +0200 |
---|---|---|
committer | Guido Guenther <agx@bogon.sigxcpu.org> | 2006-09-09 17:16:14 +0200 |
commit | 919779e2f12062d4dc6e6fa2f59c2d53e1c782f6 (patch) | |
tree | 59ae56f6a5bcbe67fad9b29b8e4347ebbc5ecb85 /debian/patches | |
parent | 0f963fa4c3d05e0f8b297aeb20aa5d719f7ab31d (diff) |
add debian dir
Diffstat (limited to 'debian/patches')
-rw-r--r-- | debian/patches/base.patch | 74 | ||||
-rw-r--r-- | debian/patches/disable-ez_setup.diff | 15 | ||||
-rw-r--r-- | debian/patches/icalendar.patch | 83 | ||||
-rw-r--r-- | debian/patches/series | 2 |
4 files changed, 174 insertions, 0 deletions
diff --git a/debian/patches/base.patch b/debian/patches/base.patch new file mode 100644 index 0000000..cd3b4bf --- /dev/null +++ b/debian/patches/base.patch @@ -0,0 +1,74 @@ +Index: src/vobject/base.py +=================================================================== +--- src/vobject/base.py (revision 147) ++++ src/vobject/base.py (working copy) +@@ -1,5 +1,6 @@ + """vobject module for reading vCard and vCalendar files.""" + ++import copy + import re + import sys + import logging +@@ -56,6 +57,12 @@ + self.parentBehavior = None + self.isNative = False + ++ def copy(self, copyit): ++ self.group = copyit.group ++ self.behavior = copyit.behavior ++ self.parentBehavior = copyit.parentBehavior ++ self.isNative = copyit.isNative ++ + def validate(self, *args, **kwds): + """Call the behavior's validate method, or return True.""" + if self.behavior: +@@ -250,6 +257,21 @@ + if qp: + self.value = str(self.value).decode('quoted-printable') + ++ @classmethod ++ def duplicate(clz, copyit): ++ newcopy = clz('', {}, '') ++ newcopy.copy(copyit) ++ return newcopy ++ ++ def copy(self, copyit): ++ super(ContentLine, self).copy(copyit) ++ self.name = copyit.name ++ self.value = copy.copy(copyit.value) ++ self.encoded = self.encoded ++ self.params = copy.copy(copyit.params) ++ self.singletonparams = copy.copy(copyit.singletonparams) ++ self.lineNumber = copyit.lineNumber ++ + def __eq__(self, other): + try: + return (self.name == other.name) and (self.params == other.params) and (self.value == other.value) +@@ -361,6 +383,27 @@ + + self.autoBehavior() + ++ @classmethod ++ def duplicate(clz, copyit): ++ newcopy = clz() ++ newcopy.copy(copyit) ++ return newcopy ++ ++ def copy(self, copyit): ++ super(Component, self).copy(copyit) ++ ++ # deep copy of contents ++ self.contents = {} ++ for key, lvalue in copyit.contents.items(): ++ newvalue = [] ++ for value in lvalue: ++ newitem = value.duplicate(value) ++ newvalue.append(newitem) ++ self.contents[key] = newvalue ++ ++ self.name = copyit.name ++ self.useBegin = copyit.useBegin ++ + def setProfile(self, name): + """Assign a PROFILE to this unnamed component. + diff --git a/debian/patches/disable-ez_setup.diff b/debian/patches/disable-ez_setup.diff new file mode 100644 index 0000000..7349871 --- /dev/null +++ b/debian/patches/disable-ez_setup.diff @@ -0,0 +1,15 @@ +Index: python-vobject-154/setup.py +=================================================================== +--- python-vobject-154.orig/setup.py 2006-09-06 11:16:58.000000000 +0200 ++++ python-vobject-154/setup.py 2006-09-06 11:17:14.000000000 +0200 +@@ -6,10 +6,6 @@ + Requires dateutil (https://moin.conectiva.com.br/DateUtil) 0.9 or later.
+ """
+
+-# not using setuptools until Chandler's ready for eggs
+-from ez_setup import use_setuptools
+-use_setuptools()
+-
+ from setuptools import setup, find_packages
+
+ #from distutils.core import setup
diff --git a/debian/patches/icalendar.patch b/debian/patches/icalendar.patch new file mode 100644 index 0000000..92322f1 --- /dev/null +++ b/debian/patches/icalendar.patch @@ -0,0 +1,83 @@ +Index: src/vobject/icalendar.py +=================================================================== +--- src/vobject/icalendar.py (revision 147) ++++ src/vobject/icalendar.py (working copy) +@@ -374,8 +374,17 @@ + try: + dtstart = self.dtstart.value + except AttributeError, KeyError: +- # if there's no dtstart, just return None +- return None ++ # Special for VTODO - try DUE property instead ++ try: ++ if self.name == "VTODO": ++ dtstart = self.due.value ++ else: ++ # if there's no dtstart, just return None ++ return None ++ except AttributeError, KeyError: ++ # if there's no due, just return None ++ return None ++ + # rrulestr complains about unicode, so cast to str + rule = dateutil.rrule.rrulestr(str(line.value), + dtstart=dtstart) +@@ -380,7 +389,7 @@ + rule = dateutil.rrule.rrulestr(str(line.value), + dtstart=dtstart) + until = rule._until +- if until is not None and until.tzinfo != dtstart.tzinfo: ++ if until is not None and isinstance(dtstart, datetime.datetime) and (until.tzinfo != dtstart.tzinfo): + # dateutil converts the UNTIL date to a datetime, + # check to see if the UNTIL parameter value was a date + vals = dict(pair.split('=') for pair in +@@ -417,7 +426,16 @@ + return rruleset + + def setrruleset(self, rruleset): +- dtstart = self.dtstart.value ++ ++ # Get DTSTART from component (or DUE if no DTSTART in a VTODO) ++ try: ++ dtstart = self.dtstart.value ++ except AttributeError, KeyError: ++ if self.name == "VTODO": ++ dtstart = self.due.value ++ else: ++ raise ++ + isDate = datetime.date == type(dtstart) + if isDate: + dtstart = datetime.datetime(dtstart.year,dtstart.month, dtstart.day) +@@ -573,6 +591,8 @@ + if obj.value.tzinfo is None: + obj.params['X-VOBJ-FLOATINGTIME-ALLOWED'] = ['TRUE'] + if obj.params.get('TZID'): ++ # Keep a copy of the original TZID around ++ obj.params['X-VOBJ-ORIGINAL-TZID'] = obj.params['TZID'] + del obj.params['TZID'] + return obj + +@@ -585,6 +605,10 @@ + obj.value = dateTimeToString(obj.value, cls.forceUTC) + if not cls.forceUTC and tzid is not None: + obj.tzid_param = tzid ++ if obj.params.get('X-VOBJ-ORIGINAL-TZID'): ++ if not hasattr(obj, 'tzid_param'): ++ obj.tzid_param = obj.params['X-VOBJ-ORIGINAL-TZID'] ++ del obj.params['X-VOBJ-ORIGINAL-TZID'] + + return obj + +@@ -605,7 +629,10 @@ + obj.value=str(obj.value) + obj.value=parseDtstart(obj) + if getattr(obj, 'value_param', 'DATE-TIME').upper() == 'DATE-TIME': +- if hasattr(obj, 'tzid_param'): del obj.tzid_param ++ if hasattr(obj, 'tzid_param'): ++ # Keep a copy of the original TZID around ++ obj.params['X-VOBJ-ORIGINAL-TZID'] = obj.tzid_param ++ del obj.tzid_param + return obj + + @staticmethod diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..e576710 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1,2 @@ +base.patch -p0 +icalendar.patch -p0 |