]> git.pld-linux.org Git - packages/python-urlgrabber.git/commitdiff
- builders /etc/resolv.conf hack; rel 2 auto/th/python-urlgrabber-3_9_1-2
authorElan Ruusamäe <glen@pld-linux.org>
Wed, 3 Feb 2010 22:37:21 +0000 (22:37 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    python-urlgrabber.spec -> 1.18
    urlgrabber-pycurl-resolv.conf-hack.patch -> 1.1

python-urlgrabber.spec
urlgrabber-pycurl-resolv.conf-hack.patch [new file with mode: 0644]

index a8eb7f5cffc7ccd14ca1f537cc1705b575db3763..f9522d048cf402b31f349632f394c1e36c6ed780 100644 (file)
@@ -1,14 +1,18 @@
+# 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
@@ -34,6 +38,7 @@ uwierzytelnianie, proxy itp.
 %prep
 %setup -q -n urlgrabber-%{version}
 %patch1 -p1
+%patch2 -p1
 
 %build
 %{__python} setup.py build
diff --git a/urlgrabber-pycurl-resolv.conf-hack.patch b/urlgrabber-pycurl-resolv.conf-hack.patch
new file mode 100644 (file)
index 0000000..7a25dab
--- /dev/null
@@ -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
This page took 0.083943 seconds and 4 git commands to generate.