From a23562a20ff6cfd79825e7e8284e5025a6b0630c Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Wed, 23 Apr 2008 00:04:55 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/osc?expand=0&rev=21 --- bug-378421_osc_cookiejar_fix.diff | 21 +++++++++++++++++++++ osc.changes | 5 +++++ osc.spec | 6 +++++- 3 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 bug-378421_osc_cookiejar_fix.diff diff --git a/bug-378421_osc_cookiejar_fix.diff b/bug-378421_osc_cookiejar_fix.diff new file mode 100644 index 0000000..a04b4f3 --- /dev/null +++ b/bug-378421_osc_cookiejar_fix.diff @@ -0,0 +1,21 @@ +Index: osc/core.py +=================================================================== +--- osc/core.py (Revision 3704) ++++ osc/core.py (Arbeitskopie) +@@ -1385,11 +1385,12 @@ + raise + + +- fd = urllib2.urlopen(req, data=data) ++ try: ++ fd = urllib2.urlopen(req, data=data) ++ finally: ++ if hasattr(conf.cookiejar, 'save'): ++ conf.cookiejar.save(ignore_discard=True) + +- if hasattr(conf.cookiejar, 'save'): +- conf.cookiejar.save(ignore_discard=True) +- + if filefd: filefd.close() + + # this code is for debugging empty responses from api.opensuse.org diff --git a/osc.changes b/osc.changes index 56e8424..de8ae3a 100644 --- a/osc.changes +++ b/osc.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sat Apr 12 07:36:40 CEST 2008 - adrian@suse.de + +- add patch from abauer to fix cookie handling bnc#378421 + ------------------------------------------------------------------- Wed Apr 2 16:36:40 CEST 2008 - poeml@suse.de diff --git a/osc.spec b/osc.spec index fb36e26..a8b374c 100644 --- a/osc.spec +++ b/osc.spec @@ -14,13 +14,14 @@ Name: osc BuildRequires: python-devel Version: 0.99 -Release: 36 +Release: 40 Group: Development/Tools/Other License: GPL v2 or later BuildRoot: %{_tmppath}/%{name}-%{version}-build Url: https://forgesvn1.novell.com/svn/opensuse/trunk/buildservice/src/clientlib/python/osc/ # v=0.99; svn export https://forgesvn1.novell.com/svn/opensuse/trunk/buildservice/src/clientlib/python/osc osc-$v; tar czf osc-$v.tar.gz osc-$v Source: osc-%{version}.tar.gz +Patch: bug-378421_osc_cookiejar_fix.diff Summary: openSUSE (build service) commander Requires: python-urlgrabber # @@ -59,6 +60,7 @@ Authors: %prep %setup -q -n osc-%{version} +%patch %build CFLAGS="%{optflags}" \ @@ -80,6 +82,8 @@ mkdir -p %{buildroot}/var/lib/osc-plugins %doc README TODO NEWS %changelog +* Sat Apr 12 2008 adrian@suse.de +- add patch from abauer to fix cookie handling bnc#378421 * Wed Apr 02 2008 poeml@suse.de - update to r3614: - osc commit: implement committing with keeping links (to commit