packages: python-urlgrabber/python-urlgrabber.spec, python-urlgrabber/urlgr...

glen glen at pld-linux.org
Wed Feb 3 23:37:26 CET 2010


Author: glen                         Date: Wed Feb  3 22:37:26 2010 GMT
Module: packages                      Tag: HEAD
---- Log message:
- builders /etc/resolv.conf hack; rel 2

---- Files affected:
packages/python-urlgrabber:
   python-urlgrabber.spec (1.17 -> 1.18) , urlgrabber-pycurl-resolv.conf-hack.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/python-urlgrabber/python-urlgrabber.spec
diff -u packages/python-urlgrabber/python-urlgrabber.spec:1.17 packages/python-urlgrabber/python-urlgrabber.spec:1.18
--- packages/python-urlgrabber/python-urlgrabber.spec:1.17	Wed Feb  3 23:03:03 2010
+++ packages/python-urlgrabber/python-urlgrabber.spec	Wed Feb  3 23:37:21 2010
@@ -1,15 +1,19 @@
 # $Revision$, $Date$
+# TODO
+# - find better solution for unreadable /etc/resolv.conf in pycurl
+#   the problem is actgually in curl-libs, util_curl_new() returns NULL in that case
 Summary:	A high-level cross-protocol url-grabber
 Summary(pl.UTF-8):	Wysokopoziomowa biblioteka do wychwytywania URL-i do wielu protokołów
 Name:		python-urlgrabber
 Version:	3.9.1
-Release:	1
+Release:	2
 Epoch:		1
 License:	LGPL v2.1+
 Group:		Libraries/Python
 Source0:	http://urlgrabber.baseurl.org/download/urlgrabber-%{version}.tar.gz
 # Source0-md5:	00c8359bf71062d0946bacea521f80b4
 Patch1:		urlgrabber-HEAD.patch
+Patch2:		urlgrabber-pycurl-resolv.conf-hack.patch
 URL:		http://urlgrabber.baseurl.org/
 BuildRequires:	python >= 1:2.5
 BuildRequires:	python-devel
@@ -35,6 +39,7 @@
 %prep
 %setup -q -n urlgrabber-%{version}
 %patch1 -p1
+%patch2 -p1
 
 %build
 %{__python} setup.py build
@@ -63,6 +68,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.18  2010/02/03 22:37:21  glen
+- builders /etc/resolv.conf hack; rel 2
+
 Revision 1.17  2010/02/03 22:03:03  glen
 - merge 3.9.1 from DEVEL (ok by arekm); rel 1
 

================================================================
Index: packages/python-urlgrabber/urlgrabber-pycurl-resolv.conf-hack.patch
diff -u /dev/null packages/python-urlgrabber/urlgrabber-pycurl-resolv.conf-hack.patch:1.1
--- /dev/null	Wed Feb  3 23:37:27 2010
+++ packages/python-urlgrabber/urlgrabber-pycurl-resolv.conf-hack.patch	Wed Feb  3 23:37:21 2010
@@ -0,0 +1,19 @@
+--- urlgrabber-3.9.1/urlgrabber/grabber.py~	2010-02-04 00:34:13.394410346 +0200
++++ urlgrabber-3.9.1/urlgrabber/grabber.py	2010-02-04 00:34:15.851263468 +0200
+@@ -1624,8 +1624,14 @@
+             urllib.addinfourl, via. urllib.URLopener.* """
+         return self.url
+         
+-_curl_cache = pycurl.Curl() # make one and reuse it over and over and over
+-
++try:
++	_curl_cache = pycurl.Curl() # make one and reuse it over and over and over
++except pycurl.error, e:
++	# in pld builders /etc/resolv.conf is not readable and curl throws an error
++	if str(e) == 'initializing curl failed':
++		print e
++	else:
++		raise
+ 
+ #####################################################################
+ # DEPRECATED FUNCTIONS
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/python-urlgrabber/python-urlgrabber.spec?r1=1.17&r2=1.18&f=u



More information about the pld-cvs-commit mailing list