Mailinglist Archive: zypp-commit (266 mails)

< Previous Next >
[zypp-commit] r11656 - in /trunk/libzypp: VERSION.cmake package/libzypp.changes zypp/media/MediaCurl.cc
  • From: mlandres@xxxxxxxxxxxxxxxx
  • Date: Wed, 12 Nov 2008 13:37:58 -0000
  • Message-id: <20081112133759.0BAC1339F8@xxxxxxxxxxxxxxxx>
Author: mlandres
Date: Wed Nov 12 14:37:58 2008
New Revision: 11656

URL: http://svn.opensuse.org/viewcvs/zypp?rev=11656&view=rev
Log:
- Take care to always reset CURLOPT_TIMECONDITION to prevent incomplete
downloads. (bnc #444109)

Modified:
trunk/libzypp/VERSION.cmake
trunk/libzypp/package/libzypp.changes
trunk/libzypp/zypp/media/MediaCurl.cc

Modified: trunk/libzypp/VERSION.cmake
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/VERSION.cmake?rev=11656&r1=11655&r2=11656&view=diff
==============================================================================
--- trunk/libzypp/VERSION.cmake (original)
+++ trunk/libzypp/VERSION.cmake Wed Nov 12 14:37:58 2008
@@ -63,6 +63,6 @@
SET(LIBZYPP_MINOR "23")
SET(LIBZYPP_PATCH "0")
#
-# LAST RELEASED: 5.22.0 (21)
+# LAST RELEASED: 5.23.0 (23)
# (The number in parenthesis is LIBZYPP_COMPATMINOR)
#=======

Modified: trunk/libzypp/package/libzypp.changes
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/package/libzypp.changes?rev=11656&r1=11655&r2=11656&view=diff
==============================================================================
--- trunk/libzypp/package/libzypp.changes (original)
+++ trunk/libzypp/package/libzypp.changes Wed Nov 12 14:37:58 2008
@@ -1,4 +1,12 @@
-------------------------------------------------------------------
+Wed Nov 12 14:31:20 CET 2008 - ma@xxxxxxx
+
+- Take care to always reset CURLOPT_TIMECONDITION to prevent incomplete
+ downloads. (bnc #444109)
+- revision 11656
+- version 5.23.0 (23)
+
+-------------------------------------------------------------------
Wed Nov 12 13:19:02 CET 2008 - ma@xxxxxxx

- Check for modaliases below /sys (bnc #430179)

Modified: trunk/libzypp/zypp/media/MediaCurl.cc
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/media/MediaCurl.cc?rev=11656&r1=11655&r2=11656&view=diff
==============================================================================
--- trunk/libzypp/zypp/media/MediaCurl.cc (original)
+++ trunk/libzypp/zypp/media/MediaCurl.cc Wed Nov 12 14:37:58 2008
@@ -217,7 +217,7 @@
return _value.c_str();
}

-
+
static const char *const agentString()
{
// we need to add the release and identifier to the
@@ -225,7 +225,7 @@
// The target could be not initialized, and then this information
// is not available.
Target_Ptr target = zypp::getZYpp()->getTarget();
-
+
static const std::string _value(
str::form(
"ZYpp %s (curl %s) %s"
@@ -726,7 +726,7 @@
}

ret = curl_easy_setopt ( _curl, CURLOPT_HTTPHEADER, _customHeaders );
-
+
if ( ret != 0) {
disconnectFrom();
ZYPP_THROW(MediaCurlSetOptException(_url, _curlError));
@@ -756,7 +756,7 @@
curl_slist_free_all(_customHeaders);
_customHeaders = 0L;
}
-
+
if ( _curl )
{
curl_easy_cleanup( _curl );
@@ -1210,11 +1210,17 @@
}

// set IFMODSINCE time condition (no download if not modified)
- if( PathInfo(target).isExist() ) {
- curl_easy_setopt(_curl, CURLOPT_TIMECONDITION,
CURL_TIMECOND_IFMODSINCE);
- curl_easy_setopt(_curl, CURLOPT_TIMEVALUE, PathInfo(target).mtime());
+ if( PathInfo(target).isExist() )
+ {
+ curl_easy_setopt(_curl, CURLOPT_TIMECONDITION, CURL_TIMECOND_IFMODSINCE);
+ curl_easy_setopt(_curl, CURLOPT_TIMEVALUE, PathInfo(target).mtime());
}
-
+ else
+ {
+ curl_easy_setopt(_curl, CURLOPT_TIMECONDITION, CURL_TIMECOND_NONE);
+ curl_easy_setopt(_curl, CURLOPT_TIMEVALUE, 0);
+ }
+
string destNew = target.asString() + ".new.zypp.XXXXXX";
char *buf = ::strdup( destNew.c_str());
if( !buf)

--
To unsubscribe, e-mail: zypp-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages