Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Nov 2003 12:28:48 -0600 (CST)
From:      Jeremy Messenger <mezz7@cox.net>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/59561: Maintainer update: astro/gdesklets-goodweather, fix a bug for clock at 12.
Message-ID:  <200311211828.hALISmlY005757@ns1.mezzweb.com>
Resent-Message-ID: <200311211900.hALJ0RSs097325@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         59561
>Category:       ports
>Synopsis:       Maintainer update: astro/gdesklets-goodweather, fix a bug for clock at 12.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Fri Nov 21 11:00:27 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     Mezz
>Release:        FreeBSD 5.1-CURRENT i386
>Organization:
>Environment:
System: FreeBSD ns1.mezzweb.com 5.1-CURRENT FreeBSD 5.1-CURRENT #0: Wed Aug 13
22:39:47 CDT 2003 mezz@mezz.mezzweb.com:/usr/obj/usr/src/sys/BSDROCKS i386

>Description:
When the clock is at 12am and it will crash.

Reported by:	Franz Klammer <klammer@webonaut.com>

>How-To-Repeat:
n/a

>Fix:
Add a new file:
	- files/GoodWeather::weather.py

--- gdesklets-goodweather.diff begins here ---
diff -urN gdesklets-goodweather.orig/Makefile gdesklets-goodweather/Makefile
--- gdesklets-goodweather.orig/Makefile	Tue Nov 18 23:21:31 2003
+++ gdesklets-goodweather/Makefile	Fri Nov 21 12:47:03 2003
@@ -7,7 +7,7 @@
 
 PORTNAME=	goodweather
 PORTVERSION=	0.1
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	astro gnome
 MASTER_SITES=	http://gdesklets.gnomedesktop.org/files/ \
 		http://people.roqe.org/kr/misc/
@@ -31,6 +31,7 @@
 do-build:
 	@${WRKSRC}/Install_${NAME}_Sensor.bin --nomsg ${WRKSRC}
 	@${PATCH} ${WRKSRC}/${NAME}/__init__.py < ${FILESDIR}/${NAME}::__init__.py
+	@${PATCH} ${WRKSRC}/${NAME}/weather.py < ${FILESDIR}/${NAME}::weather.py
 	@${FIND} ${WRKSRC} -name '*.orig' -delete
 
 do-install:
diff -urN gdesklets-goodweather.orig/files/GoodWeather::weather.py gdesklets-goodweather/files/GoodWeather::weather.py
--- gdesklets-goodweather.orig/files/GoodWeather::weather.py	Wed Dec 31 18:00:00 1969
+++ gdesklets-goodweather/files/GoodWeather::weather.py	Thu Nov 20 16:30:56 2003
@@ -0,0 +1,14 @@
+--- GoodWeather/weather.py.orig	Thu Nov 20 16:29:11 2003
++++ GoodWeather/weather.py	Thu Nov 20 16:30:24 2003
+@@ -321,8 +321,9 @@
+         if m :
+             #print m
+             if m.upper() == 'AM':
+-                if int(self._hour) > 11:
+-                    raise ValueError ('AM hour can not be over 11 ['+ self._hour +']')
++                if int(self._hour) > 12:
++                    raise ValueError ('AM hour can not be over 12 ['+ self._hour +']')
++	        if int(self._hour) == 12: self._hour = str(0)
+             if m.upper() == 'PM':
+                 if int(self._hour) > 12:
+                     raise ValueError ('PM hour can not be over 12 ['+ self._hour +']')
--- gdesklets-goodweather.diff ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200311211828.hALISmlY005757>