Zypp Commits
Threads by month
- ----- 2024 -----
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
February 2009
- 7 participants
- 171 discussions
23 Feb '09
ref: refs/heads/master
commit 27f5af8c70aad1b7f233225ca25a1a2a819dfd74
Author: Stefan Schubert <schubi(a)suse.de>
Date: Mon Feb 23 17:53:21 2009 +0100
added more testcase information
---
zypp/solver/detail/ResolverUpgrade.cc | 6 +++---
zypp/solver/detail/Testcase.cc | 2 ++
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/zypp/solver/detail/ResolverUpgrade.cc b/zypp/solver/detail/ResolverUpgrade.cc
index c0a8ec2..28c3579 100644
--- a/zypp/solver/detail/ResolverUpgrade.cc
+++ b/zypp/solver/detail/ResolverUpgrade.cc
@@ -86,12 +86,12 @@ Resolver::doUpgrade( UpgradeStatistics & opt_stats_r )
// create a testcase for the updating system
PathInfo path ("/mnt/var/log"); // checking if update has been started from instsys
-
+ std::string now( Date::now().form( "-%Y-%m-%d-%H-%M-%S" ) );
if ( !path.isExist() ) {
- Testcase testcase("/var/log/updateTestcase");
+ Testcase testcase("/var/log/updateTestcase"+now);
testcase.createTestcase (*this, true, false); // create pool, do not solve
} else {
- Testcase testcase("/mnt/var/log/updateTestcase");
+ Testcase testcase("/mnt/var/log/updateTestcase"+now);
testcase.createTestcase (*this, true, false); // create pool, do not solve
}
diff --git a/zypp/solver/detail/Testcase.cc b/zypp/solver/detail/Testcase.cc
index b989320..175fb94 100644
--- a/zypp/solver/detail/Testcase.cc
+++ b/zypp/solver/detail/Testcase.cc
@@ -444,6 +444,8 @@ HelixControl::HelixControl(const std::string & controlPath,
}
*file << TAB << "- path : " << repo.path() << endl;
*file << TAB << "- type : " << repo.type() << endl;
+ *file << TAB << "- generated : " << (it->first.generatedTimestamp()).form( "%Y-%m-%d %H:%M:%S" ) << endl;
+ *file << TAB << "- outdated : " << (it->first.suggestedExpirationTimestamp()).form( "%Y-%m-%d %H:%M:%S" ) << endl;
*file << TAB << " -->" << endl;
*file << TAB << "<channel file=\"" << str::numstring((long)it->first.id())
--
To unsubscribe, e-mail: zypp-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: zypp-commit+help(a)opensuse.org
1
0
23 Feb '09
ref: refs/heads/master
commit 09c6321eb225b6bf59f8fcfcf1be40aca0ff1565
Author: Duncan Mac-Vicar P <dmacvicar(a)suse.de>
Date: Mon Feb 23 17:10:38 2009 +0100
update to trunk und fix crash
---
vendor/mongoose/mongoose.c | 399 ++++++++++++++++++++++++++------------------
vendor/mongoose/mongoose.h | 2 +-
2 files changed, 241 insertions(+), 160 deletions(-)
diff --git a/vendor/mongoose/mongoose.c b/vendor/mongoose/mongoose.c
index 8e291c4..b412f97 100644
--- a/vendor/mongoose/mongoose.c
+++ b/vendor/mongoose/mongoose.c
@@ -19,7 +19,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
- * $Id$
+ * $Id: mongoose.c 230 2009-02-15 09:59:53Z valenok $
*/
#ifndef _WIN32_WCE /* Some ANSI #includes are not available on Windows CE */
@@ -104,6 +104,7 @@
#endif /* !fileno MINGW #defines fileno */
typedef HANDLE pthread_mutex_t;
+typedef HANDLE pthread_cond_t;
#if !defined(S_ISDIR)
#define S_ISDIR(x) ((x) & _S_IFDIR)
@@ -272,8 +273,11 @@ enum mg_option_index {
struct socket {
SOCKET sock; /* Listening socket */
- int is_ssl; /* Should be SSL-ed */
struct usa usa; /* Socket address */
+
+ unsigned int flags; /* Flags */
+#define FLAG_SSL 1
+#define FLAG_TERMINATE 2
};
/*
@@ -387,32 +391,34 @@ mg_strlcpy(register char *dst, register const char *src, size_t n)
}
static int
-mg_strncasecmp(const char *str1, const char *str2, size_t len)
+lowercase(const char *s)
{
- const unsigned char *s1, *s2, *end;
+ return (tolower(* (unsigned char *) s));
+}
- s1 = (unsigned char *) str1;
- s2 = (unsigned char *) str2;
- end = s1 + len - 1;
+static int
+mg_strncasecmp(const char *s1, const char *s2, size_t len)
+{
+ int diff = 0;
- while (s1 < end && *s1 && *s2 && tolower(*s1) == tolower(*s2)) {
- s1++;
- s2++;
- }
+ if (len > 0)
+ do {
+ diff = lowercase(s1++) - lowercase(s2++);
+ } while (diff == 0 && s1[-1] != '\0' && --len > 0);
- return (tolower(*s1) - tolower(*s2));
+ return (diff);
}
static int
-mg_strcasecmp(const char *str1, const char *str2)
+mg_strcasecmp(const char *s1, const char *s2)
{
- size_t len = strlen(str1);
- int res = mg_strncasecmp(str1, str2, len);
+ int diff;
- if (res != 0)
- return (res);
- else
- return (-str2[len]); /* If str2[len] == 0, -0 == 0. */
+ do {
+ diff = lowercase(s1++) - lowercase(s2++);
+ } while (diff == 0 && s1[-1] != '\0');
+
+ return (diff);
}
static char *
@@ -474,79 +480,6 @@ mg_snprintf(char *buf, size_t buflen, const char *fmt, ...)
return (n);
}
-static int
-get_pool_space(const struct socket_pool *pool)
-{
- return (pool->size - (pool->head - pool->tail));
-}
-
-static void
-init_socket_pool(struct socket_pool *pool)
-{
- pool->size = (int) ARRAY_SIZE(pool->sockets) - 1;
- pool->head = pool->tail = 0;
-
- (void) pthread_mutex_init(&pool->mutex, NULL);
- (void) pthread_cond_init(&pool->put_cond, NULL);
- (void) pthread_cond_init(&pool->get_cond, NULL);
-}
-
-static void
-destroy_socket_pool(struct socket_pool *pool)
-{
- int i;
-
- (void) pthread_mutex_destroy(&pool->mutex);
- (void) pthread_cond_destroy(&pool->put_cond);
- (void) pthread_cond_destroy(&pool->get_cond);
-
- /* TODO: close sockets */
- for (i = 0; i < get_pool_space(pool); i++)
- (void) closesocket(pool->sockets[i].sock);
-}
-
-/*
- * Put socket into the pool
- */
-static void
-put_socket(struct socket_pool *pool, const struct socket *sp)
-{
- (void) pthread_mutex_lock(&pool->mutex);
-
- while (get_pool_space(pool) == 0)
- (void) pthread_cond_wait(&pool->put_cond, &pool->mutex);
-
- pool->sockets[pool->head++ % pool->size] = *sp;
-
- (void) pthread_cond_signal(&pool->get_cond);
- (void) pthread_mutex_unlock(&pool->mutex);
-}
-
-/*
- * Get index of the socket to process
- */
-static void
-get_socket(struct socket_pool *pool, struct socket *sp)
-{
- pthread_mutex_lock(&pool->mutex);
-
- while (get_pool_space(pool) == pool->size)
- (void) pthread_cond_wait(&pool->get_cond, &pool->mutex);
-
- *sp = pool->sockets[pool->tail++ % pool->size];
-
- assert(pool->tail <= pool->head);
-
- /* Wrap pointers if they both are greater than the pool size */
- if (pool->tail > pool->size) {
- pool->tail %= pool->size;
- pool->head %= pool->size;
- }
-
- pthread_cond_signal(&pool->put_cond);
- pthread_mutex_unlock(&pool->mutex);
-}
-
/*
* Convert string representing a boolean value to a boolean value
*/
@@ -702,28 +635,59 @@ send_error(struct mg_connection *conn, int status, const char *reason,
#ifdef _WIN32
static int
-pthread_mutex_init(pthread_mutex_t *mutex, void *unused) {
+pthread_mutex_init(pthread_mutex_t *mutex, void *unused)
+{
unused = NULL;
*mutex = CreateMutex(NULL, FALSE, NULL);
return (*mutex == NULL ? -1 : 0);
}
static int
-pthread_mutex_destroy(pthread_mutex_t *mutex) {
- CloseHandle(*mutex);
- return (0);
+pthread_mutex_destroy(pthread_mutex_t *mutex)
+{
+ return (CloseHandle(*mutex) == 0 ? -1 : 0);
}
static int
-pthread_mutex_lock(pthread_mutex_t *mutex) {
+pthread_mutex_lock(pthread_mutex_t *mutex)
+{
return (WaitForSingleObject(*mutex, INFINITE) == WAIT_OBJECT_0? 0 : -1);
}
static int
-pthread_mutex_unlock(pthread_mutex_t *mutex) {
+pthread_mutex_unlock(pthread_mutex_t *mutex)
+{
return (ReleaseMutex(*mutex) == 0 ? -1 : 0);
}
+static int
+pthread_cond_init(pthread_cond_t *cv, const void *unused)
+{
+ unused = NULL;
+ *cv = CreateEvent(NULL, FALSE, FALSE, NULL);
+ return (*cv == NULL ? -1 : 0);
+}
+
+static int
+pthread_cond_wait(pthread_cond_t *cv, pthread_mutex_t *mutex)
+{
+ SignalObjectAndWait(*mutex, *cv, INFINITE, FALSE);
+ WaitForSingleObject(*mutex, INFINITE);
+ return (0);
+}
+
+static int
+pthread_cond_signal(pthread_cond_t *cv)
+{
+ return (SetEvent(*cv) == 0 ? -1 : 0);
+}
+
+static int
+pthread_cond_destroy(pthread_cond_t *cv)
+{
+ return (CloseHandle(*cv) == 0 ? -1 : 0);
+}
+
static void
fix_directory_separators(char *path)
{
@@ -1060,6 +1024,86 @@ mg_unlock(struct mg_context *ctx)
cry("pthread_mutex_unlock: %s", strerror(ERRNO));
}
+static int
+get_pool_space(const struct socket_pool *pool)
+{
+ return (pool->size - (pool->head - pool->tail));
+}
+
+static void
+init_socket_pool(struct socket_pool *pool)
+{
+ pool->size = (int) ARRAY_SIZE(pool->sockets);
+ pool->head = pool->tail = 0;
+
+ pthread_mutex_init(&pool->mutex, NULL);
+ pthread_cond_init(&pool->put_cond, NULL);
+ pthread_cond_init(&pool->get_cond, NULL);
+}
+
+static void
+destroy_socket_pool(struct socket_pool *pool)
+{
+ int i;
+
+ pthread_mutex_lock(&pool->mutex);
+ for (i = 0; i < get_pool_space(pool); i++)
+ (void) closesocket(pool->sockets[i].sock);
+ pthread_mutex_unlock(&pool->mutex);
+
+ /*
+ * TODO: all threads in a thread pool are blocked on pool->mutex.
+ * Before destroying the mutex, send a termination signal to all
+ * of these threads, and let them exit. Only after that destroy
+ * the mutex.
+ */
+
+ pthread_mutex_destroy(&pool->mutex);
+ pthread_cond_destroy(&pool->put_cond);
+ pthread_cond_destroy(&pool->get_cond);
+}
+
+/*
+ * Put socket into the pool
+ */
+static void
+put_socket(struct socket_pool *pool, const struct socket *sp)
+{
+ (void) pthread_mutex_lock(&pool->mutex);
+
+ while (get_pool_space(pool) == 0)
+ pthread_cond_wait(&pool->put_cond, &pool->mutex);
+
+ pool->sockets[pool->head++ % pool->size] = *sp;
+
+ pthread_cond_signal(&pool->get_cond);
+ pthread_mutex_unlock(&pool->mutex);
+}
+
+/*
+ * Get index of the socket to process
+ */
+static void
+get_socket(struct socket_pool *pool, struct socket *sp)
+{
+ pthread_mutex_lock(&pool->mutex);
+
+ while (get_pool_space(pool) == pool->size)
+ pthread_cond_wait(&pool->get_cond, &pool->mutex);
+
+ *sp = pool->sockets[pool->tail++];
+
+ /* Wrap pointers */
+ if (pool->tail == pool->size) {
+ pool->head -= pool->size;
+ pool->tail = 0;
+ }
+
+ pthread_cond_signal(&pool->put_cond);
+ pthread_mutex_unlock(&pool->mutex);
+}
+
+
/*
* Write data to the IO channel - opened file descriptor, socket or SSL
* descriptor. Return number of bytes written.
@@ -1084,12 +1128,10 @@ push(int fd, SOCKET sock, SSL *ssl, const char *buf, uint64_t len)
n = send(sock, buf + sent, k, 0);
}
- if (n < 0) {
- cry("%s: %s", __func__, strerror(ERRNO));
+ if (n < 0)
break;
- } else {
- sent += n;
- }
+
+ sent += n;
}
return (sent);
@@ -1112,9 +1154,6 @@ pull(int fd, SOCKET sock, SSL *ssl, char *buf, int len)
nread = recv(sock, buf, (size_t) len, 0);
}
- if (nread < 0)
- cry("%s failed: %s", __func__, strerror(ERRNO));
-
return (nread);
}
@@ -1194,11 +1233,12 @@ static char *
get_var(const char *name, const char *buf, size_t buf_len)
{
const char *p, *e, *s;
- char tmp[BUFSIZ];
- size_t var_len;
+ char *val;
+ size_t var_len, len;
var_len = strlen(name);
e = buf + buf_len;
+ val = NULL;
/* buf is "var1=val1&var2=val2...". Find variable first */
for (p = buf; p + var_len < e; p++)
@@ -1213,12 +1253,14 @@ get_var(const char *name, const char *buf, size_t buf_len)
if (s == NULL)
s = e;
- /* URL-decode value. Return result length */
- (void) url_decode(p, s - p, tmp, sizeof(tmp), TRUE);
- return (mg_strdup(tmp));
+ /* Try to allocate the buffer */
+ len = s - p + 1;
+ if ((val = malloc(len)) != NULL)
+ (void) url_decode(p, len, val, len, TRUE);
+ break;
}
- return (NULL);
+ return (val);
}
/*
@@ -1448,7 +1490,6 @@ static const struct {
{"zip", "application/x-zip-compressed" },
{"xls", "application/excel" },
{"tgz", "application/x-tar-gz" },
- {"tar.gz", "application/x-tar-gz" },
{"tar", "application/x-tar" },
{"gz", "application/x-gunzip" },
{"arj", "application/x-arj-compressed" },
@@ -1467,18 +1508,13 @@ static const struct {
static const char *
get_mime_type(const char *path)
{
- const char *extension;
- size_t i, ext_len;
+ size_t i;
+ const char *ext;
- if ((extension = strrchr(path, '.')) != NULL) {
-
- extension++;
- ext_len = strlen(extension);
-
- /* If no luck, try built-in mime types */
+ if ((ext = strrchr(path, '.')) != NULL) {
+ ext++;
for (i = 0; mime_types[i].extension != NULL; i++)
- if (!mg_strcasecmp(extension,
- mime_types[i].extension))
+ if (!mg_strcasecmp(ext, mime_types[i].extension))
return (mime_types[i].mime_type);
}
@@ -2038,7 +2074,7 @@ print_dir_entry(struct de *de)
char size[64], mod[64];
if (S_ISDIR(de->st.st_mode)) {
- (void) mg_snprintf(size, sizeof(size), "%s", "<DIR>");
+ (void) mg_snprintf(size, sizeof(size), "%s", "[DIRECTORY]");
} else {
if (de->st.st_size < 1024)
(void) mg_snprintf(size, sizeof(size),
@@ -2066,20 +2102,27 @@ static int
compare_dir_entries(const void *p1, const void *p2)
{
const struct de *a = (struct de *) p1, *b = (struct de *) p2;
- const char *q = a->conn->request_info.query_string;
+ const char *query_string = a->conn->request_info.query_string;
int cmp_result = 0;
- if (*q == 'n') {
+ if (query_string == NULL)
+ query_string = "na";
+
+ if (S_ISDIR(a->st.st_mode) && !S_ISDIR(b->st.st_mode)) {
+ return (-1); /* Always put directories on top */
+ } else if (!S_ISDIR(a->st.st_mode) && S_ISDIR(b->st.st_mode)) {
+ return (1); /* Always put directories on top */
+ } else if (*query_string == 'n') {
cmp_result = strcmp(a->file_name, b->file_name);
- } else if (*q == 's') {
+ } else if (*query_string == 's') {
cmp_result = a->st.st_size == b->st.st_size ? 0 :
a->st.st_size > b->st.st_size ? 1 : -1;
- } else if (*q == 'd') {
+ } else if (*query_string == 'd') {
cmp_result = a->st.st_mtime == b->st.st_mtime ? 0 :
a->st.st_mtime > b->st.st_mtime ? 1 : -1;
}
- return (q[1] == 'd' ? -cmp_result : cmp_result);
+ return (query_string[1] == 'd' ? -cmp_result : cmp_result);
}
static void
@@ -2135,10 +2178,6 @@ send_directory(struct mg_connection *conn, const char *dir)
}
(void) closedir(dirp);
- if (conn->request_info.query_string != NULL)
- qsort(entries, num_entries,
- sizeof(entries[0]), compare_dir_entries);
-
conn->num_bytes_sent += mg_printf(conn,
"<html><head><title>Index of %s</title>"
"<style>th {text-align: left;}</style></head>"
@@ -2156,6 +2195,8 @@ send_directory(struct mg_connection *conn, const char *dir)
"<td> %s</td><td> %s</td></tr>\n",
conn->request_info.uri, "..", "Parent directory", "-", "-");
+ /* Sort and print directory entries */
+ qsort(entries, num_entries, sizeof(entries[0]), compare_dir_entries);
for (i = 0; i < num_entries; i++) {
print_dir_entry(&entries[i]);
free(entries[i].file_name);
@@ -2321,32 +2362,36 @@ read_request(int fd, SOCKET sock, SSL *ssl, char *buf, int bufsiz, int *nread)
* Return 0 if index file has been found, -1 if not found
*/
static bool_t
-send_index_file(struct mg_connection *conn,
- char *buf, size_t buf_len, struct stat *stp)
+substitute_index_file(struct mg_connection *conn,
+ char *path, size_t path_len, struct stat *stp)
{
const char *s;
+ struct stat st;
size_t len, n;
+ bool_t found;
- n = strlen(buf);
- buf[n] = DIRSEP;
+ n = strlen(path);
+ path[n] = DIRSEP;
+ found = FALSE;
mg_lock(conn->ctx);
s = conn->ctx->options[OPT_INDEX_FILES];
FOR_EACH_WORD_IN_LIST(s, len) {
- if (len > buf_len - n - 1)
+ if (len > path_len - n - 1)
continue;
- (void) mg_strlcpy(buf + n + 1, s, len + 1);
- if (stat(buf, stp) == 0) {
- send_file(conn, buf, stp);
- mg_unlock(conn->ctx);
- return (TRUE);
+ (void) mg_strlcpy(path + n + 1, s, len + 1);
+ if (stat(path, &st) == 0) {
+ *stp = st;
+ found = TRUE;
+ break;
}
}
mg_unlock(conn->ctx);
- buf[n] = '\0';
+ if (found == FALSE)
+ path[n] = '\0';
- return (FALSE);
+ return (found);
}
static void
@@ -2956,10 +3001,9 @@ analyze_request(struct mg_connection *conn)
(void) mg_printf(conn,
"HTTP/1.1 301 Moved Permanently\r\n"
"Location: %s/\r\n\r\n", uri);
- } else if (S_ISDIR(st.st_mode)) {
- if (send_index_file(conn, path, sizeof(path), &st)) {
- /* do nothing */
- } else if (is_true(conn->ctx->options[OPT_DIR_LIST])) {
+ } else if (S_ISDIR(st.st_mode) &&
+ substitute_index_file(conn, path, sizeof(path), &st) == FALSE) {
+ if (is_true(conn->ctx->options[OPT_DIR_LIST])) {
send_directory(conn, path);
} else {
send_error(conn, 403, "Directory Listing Denied",
@@ -3003,13 +3047,13 @@ set_ports_option(struct mg_context *ctx, const char *p)
{
SOCKET sock;
size_t len;
- int is_ssl, port;
+ int flags, port;
close_all_listening_sockets(ctx);
FOR_EACH_WORD_IN_LIST(p, len) {
- is_ssl = p[len - 1] == 's' ? 1 : 0;
+ flags = p[len - 1] == 's' ? FLAG_SSL : 0;
port = atoi(p);
if (ctx->num_listeners >=
@@ -3019,14 +3063,14 @@ set_ports_option(struct mg_context *ctx, const char *p)
} else if ((sock = mg_open_listening_port(port)) == -1) {
cry("cannot open port %d", port);
return (FALSE);
- } else if (is_ssl && ctx->ssl_ctx == NULL) {
+ } else if (flags == FLAG_SSL && ctx->ssl_ctx == NULL) {
(void) closesocket(sock);
cry("cannot add SSL socket, "
"please specify certificate file");
return (FALSE);
} else {
ctx->listeners[ctx->num_listeners].sock = sock;
- ctx->listeners[ctx->num_listeners].is_ssl = is_ssl;
+ ctx->listeners[ctx->num_listeners].flags = flags;
ctx->num_listeners++;
}
}
@@ -3351,6 +3395,35 @@ admin_page(struct mg_connection *conn, const struct mg_request_info *ri,
(void) mg_printf(conn, "%s", "</table></body></html>");
}
+static void
+terminate_one_thread(struct mg_context *ctx)
+{
+ struct socket fake;
+
+ fake.flags = FLAG_TERMINATE;
+ put_socket(&ctx->socket_pool, &fake);
+}
+
+static void worker_loop(struct mg_context *ctx);
+static bool_t
+set_threads_option(struct mg_context *ctx, const char *str)
+{
+ int i, old_count, new_count;
+
+ new_count = atoi(str);
+ old_count = atoi(ctx->options[OPT_THREADS]);
+
+ if (new_count > old_count) {
+ for (i = 0; i < new_count - old_count; i++)
+ start_thread((mg_thread_func_t) worker_loop, ctx);
+ } else {
+ for (i = 0; i < old_count - new_count; i++)
+ terminate_one_thread(ctx);
+ }
+
+ return (TRUE);
+}
+
static bool_t
set_admin_uri_option(struct mg_context *ctx, const char *uri)
{
@@ -3385,7 +3458,7 @@ static const struct mg_option known_options[] = {
{"aliases", "Path=URI mappings", NULL},
{"admin_uri", "Administration page URI", NULL},
{"acl", "\tAllow/deny IP addresses/subnets", NULL},
- {"threads", "Thread pool size", "5"},
+ {"threads", "Thread pool size", "23"},
{NULL, NULL, NULL}
};
@@ -3419,7 +3492,7 @@ static const struct option_setter {
{OPT_ALIASES, NULL},
{OPT_ADMIN_URI, &set_admin_uri_option},
{OPT_ACL, NULL},
- {OPT_THREADS, NULL},
+ {OPT_THREADS, set_threads_option},
{-1, NULL}
};
@@ -3629,7 +3702,7 @@ accept_new_connection(const struct socket *listener, struct mg_context *ctx)
(void) closesocket(rem.sock);
cry("%s: denied by ACL", inet_ntoa(rem.usa.u.sin.sin_addr));
} else {
- rem.is_ssl = listener->is_ssl;
+ rem.flags = listener->flags;
put_socket(&ctx->socket_pool, &rem);
}
}
@@ -3639,19 +3712,27 @@ worker_loop(struct mg_context *ctx)
{
struct mg_connection conn;
struct socket rem;
+ bool_t ssl;
for (;;) {
get_socket(&ctx->socket_pool, &rem);
+
+ if (rem.flags & FLAG_TERMINATE)
+ break;
+
conn.sock = rem.sock;
conn.rsa = rem.usa;
conn.ctx = ctx;
conn.birth_time = time(NULL);
+ conn.ssl = NULL;
+ conn.free_post_data = conn.keep_alive = FALSE;
- if (rem.is_ssl && (conn.ssl = SSL_new(ctx->ssl_ctx)) == NULL) {
+ ssl = rem.flags & FLAG_SSL;
+ if (ssl && (conn.ssl = SSL_new(ctx->ssl_ctx)) == NULL) {
cry("%s: SSL_new: %s", __func__, strerror(ERRNO));
- } else if (rem.is_ssl && SSL_set_fd(conn.ssl, conn.sock) != 1) {
+ } else if (ssl && SSL_set_fd(conn.ssl, conn.sock) != 1) {
cry("%s: SSL_set_fd: %s", __func__, strerror(ERRNO));
- } else if (rem.is_ssl && SSL_accept(conn.ssl) != 1) {
+ } else if (ssl && SSL_accept(conn.ssl) != 1) {
cry("%s: SSL handshake failed", __func__);
} else {
process_new_connection(&conn);
diff --git a/vendor/mongoose/mongoose.h b/vendor/mongoose/mongoose.h
index 102078b..4b4b21f 100644
--- a/vendor/mongoose/mongoose.h
+++ b/vendor/mongoose/mongoose.h
@@ -19,7 +19,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
- * $Id$
+ * $Id: mongoose.h 154 2008-12-22 20:14:28Z valenok $
*/
#ifndef MONGOOSE_HEADER_INCLUDED
--
To unsubscribe, e-mail: zypp-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: zypp-commit+help(a)opensuse.org
1
0
[zypp-commit] <libzypp> master : take care about SOLVER_PROBLEM_DISTUPGRADE_RULE/SOLVER_PROBLEM_INFARCH_RULE
by Stefan Schubert 23 Feb '09
by Stefan Schubert 23 Feb '09
23 Feb '09
ref: refs/heads/master
commit 3d5144efd3f85980c937f9c5081db567ff7ae50d
Author: Stefan Schubert <schubi(a)suse.de>
Date: Mon Feb 23 15:33:15 2009 +0100
take care about SOLVER_PROBLEM_DISTUPGRADE_RULE/SOLVER_PROBLEM_INFARCH_RULE
---
zypp/solver/detail/SATResolver.cc | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/zypp/solver/detail/SATResolver.cc b/zypp/solver/detail/SATResolver.cc
index 20ee5e7..98a508d 100644
--- a/zypp/solver/detail/SATResolver.cc
+++ b/zypp/solver/detail/SATResolver.cc
@@ -932,6 +932,14 @@ string SATResolver::SATprobleminfoString(Id problem, string &detail, Id &ignoreI
probr = solver_findproblemrule(_solv, problem);
switch (solver_problemruleinfo(_solv, &(_jobQueue), probr, &dep, &source, &target))
{
+ case SOLVER_PROBLEM_DISTUPGRADE_RULE:
+ s = mapSolvable (source);
+ ret = str::form (_("%s does not belong to a distupgrade repository"), solvable2str(pool, s.get()));
+ break;
+ case SOLVER_PROBLEM_INFARCH_RULE:
+ s = mapSolvable (source);
+ ret = str::form (_("%s has inferior architecture"), solvable2str(pool, s.get()));
+ break;
case SOLVER_PROBLEM_UPDATE_RULE:
s = mapSolvable (source);
ret = str::form (_("problem with installed package %s"), solvable2str(pool, s.get()));
--
To unsubscribe, e-mail: zypp-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: zypp-commit+help(a)opensuse.org
1
0
ref: refs/heads/master
commit 563259ad28fb925f72a52b8dbe77c66eea910f10
Author: Duncan Mac-Vicar P <dmacvicar(a)suse.de>
Date: Mon Feb 23 01:16:20 2009 +0100
update aria dependency
---
libzypp.spec.cmake | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/libzypp.spec.cmake b/libzypp.spec.cmake
index 747bedc..fe62a5d 100644
--- a/libzypp.spec.cmake
+++ b/libzypp.spec.cmake
@@ -29,7 +29,8 @@ BuildRequires: libsatsolver-devel >= 0.13.0 openssl-devel
BuildRequires: boost-devel curl-devel dejagnu doxygen gcc-c++ gettext-devel graphviz hal-devel libxml2-devel
# required for testsuite, webrick
-BuildRequires: ruby aria2
+BuildRequires: ruby
+BuildRequires: aria2 >= 1.1.2
%if 0%{?suse_version}
BuildRequires: libexpat-devel
@@ -60,7 +61,7 @@ Requires: gnupg
%endif
%requires_eq satsolver-tools
-Requires: aria2
+Requires: aria2 >= 1.1.2
%description
Package, Patch, Pattern, and Product Management
--
To unsubscribe, e-mail: zypp-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: zypp-commit+help(a)opensuse.org
1
0
22 Feb '09
ref: refs/heads/master
commit 55f4c155e993220333ab281451299a2625c42bd2
Author: Duncan Mac-Vicar P <dmacvicar(a)suse.de>
Date: Sun Feb 22 22:49:05 2009 +0100
- add two remote web test cases
---
tests/zypp/MediaSetAccess_test.cc | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/tests/zypp/MediaSetAccess_test.cc b/tests/zypp/MediaSetAccess_test.cc
index 7889010..c9efc6e 100644
--- a/tests/zypp/MediaSetAccess_test.cc
+++ b/tests/zypp/MediaSetAccess_test.cc
@@ -6,6 +6,7 @@
#include "zypp/MediaSetAccess.h"
#include "zypp/Url.h"
+#include "zypp/PathInfo.h"
#include "WebServer.h"
@@ -14,7 +15,7 @@ using std::endl;
using std::string;
using namespace zypp;
using namespace boost::unit_test;
-
+using namespace zypp::filesystem;
class SimpleVerifier : public media::MediaVerifierBase
{
@@ -261,7 +262,7 @@ BOOST_AUTO_TEST_CASE(msa_file_exist_local)
/*
* file exists remote
*/
-BOOST_AUTO_TEST_CASE(msa_file_exist_remote)
+BOOST_AUTO_TEST_CASE(msa_remote_tests)
{
WebServer web( DATADIR / "/src1/cd1", 10002 );
web.start();
@@ -270,6 +271,12 @@ BOOST_AUTO_TEST_CASE(msa_file_exist_remote)
BOOST_CHECK(!setaccess.doesFileExist("/testBADNAME.txt"));
BOOST_CHECK(setaccess.doesFileExist("/test.txt"));
+ // check providing a file via http works
+ Pathname local = setaccess.provideFile("/test.txt");
+ BOOST_CHECK(CheckSum::sha1(sha1sum(local)) == CheckSum::sha1("2616e23301d7fcf7ac3324142f8c748cd0b6692b"));
+
+ // providing a file which does not exist should throw
+ BOOST_CHECK_THROW(setaccess.provideFile("/testBADNAME.txt"), media::MediaFileNotFoundException);
web.stop();
}
--
To unsubscribe, e-mail: zypp-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: zypp-commit+help(a)opensuse.org
1
0
ref: refs/heads/master
commit 50e361e91fa3d7df2a322bce77be49c72794cb8e
Author: Ján Kupec <jkupec(a)suse.cz>
Date: Sun Feb 22 17:21:06 2009 +0100
Slight introduction of colors.
---
src/CMakeLists.txt | 2 +
src/Zypper.cc | 3 --
src/output/OutNormal.cc | 58 ++++++++++++++++++++++++++++++++-------
src/output/OutNormal.h | 19 +++++++++---
src/utils/colors.cc | 29 ++++++++++++++++++++
src/utils/colors.h | 27 ++++++++++++++++++
src/utils/prompt.cc | 68 ++++++++++++++++++++++++++++++++++++++++------
src/utils/prompt.h | 8 +++++
8 files changed, 186 insertions(+), 28 deletions(-)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index b71cd06..9cf4d17 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -58,6 +58,7 @@ SET( zypper_out_SRCS
)
SET( zypper_utils_HEADERS
+ utils/colors.h
utils/getopt.h
utils/messages.h
utils/misc.h
@@ -67,6 +68,7 @@ SET( zypper_utils_HEADERS
)
SET( zypper_utils_SRCS
+ utils/colors.cc
utils/getopt.cc
utils/messages.cc
utils/misc.cc
diff --git a/src/Zypper.cc b/src/Zypper.cc
index 181340a..67703c4 100644
--- a/src/Zypper.cc
+++ b/src/Zypper.cc
@@ -8,9 +8,6 @@
// zypper - command line interface for libzypp, the package management library
// http://en.opensuse.org/Zypper
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
#include <iostream>
#include <fstream>
#include <sstream>
diff --git a/src/output/OutNormal.cc b/src/output/OutNormal.cc
index dc8a62b..cf1c170 100644
--- a/src/output/OutNormal.cc
+++ b/src/output/OutNormal.cc
@@ -1,3 +1,10 @@
+/*---------------------------------------------------------------------------*\
+ ____ _ _ __ _ __ ___ _ _
+ |_ / || | '_ \ '_ \/ -_) '_|
+ /__|\_, | .__/ .__/\___|_|
+ |__/|_| |_|
+\*---------------------------------------------------------------------------*/
+
#include <iostream>
#include <sstream>
@@ -7,7 +14,8 @@
#include "zypp/ByteCount.h" // for download progress reporting
#include "zypp/base/String.h" // for toUpper()
-#include "../main.h"
+#include "main.h"
+#include "utils/colors.h"
#include "AliveCursor.h"
#include "OutNormal.h"
@@ -18,6 +26,11 @@ using std::endl;
using std::string;
using std::ostringstream;
+OutNormal::OutNormal(Verbosity verbosity)
+ : Out(TYPE_NORMAL, verbosity),
+ _has_colors(has_colors()), _isatty(isatty(STDOUT_FILENO))
+{}
+
OutNormal::~OutNormal()
{
@@ -44,19 +57,30 @@ void OutNormal::info(const std::string & msg, Verbosity verbosity, Type mask)
{
if (infoWarningFilter(verbosity, mask))
return;
- cout << msg << endl;
+
+ if (_has_colors && verbosity > Out::QUIET)
+ cout << COLOR_WHITE << msg << COLOR_RESET << endl;
+ else
+ cout << msg << endl;
}
void OutNormal::warning(const std::string & msg, Verbosity verbosity, Type mask)
{
if (infoWarningFilter(verbosity, mask))
return;
- info(_("Warning: ") + msg, verbosity, mask);
+
+ if (_has_colors)
+ cout << COLOR_YELLOW_BOLD << _("Warning: ") << COLOR_RESET << msg << endl;
+ else
+ cout << msg << endl;
}
void OutNormal::error(const std::string & problem_desc, const std::string & hint)
{
- cerr << problem_desc;
+ if (_has_colors)
+ cerr << COLOR_RED_BOLD << problem_desc << COLOR_RESET;
+ else
+ cerr << problem_desc;
if (!hint.empty() && this->verbosity() > Out::QUIET)
cerr << endl << hint;
cerr << endl;
@@ -68,10 +92,17 @@ void OutNormal::error(const zypp::Exception & e,
const string & problem_desc,
const string & hint)
{
+ if (_has_colors)
+ cerr << COLOR_RED_BOLD;
+
// problem
cerr << problem_desc << endl;
// cause
cerr << zyppExceptionReport(e) << endl;
+
+ if (_has_colors)
+ cerr << COLOR_RESET;
+
// hint
if (!hint.empty())
cerr << hint << endl;
@@ -122,7 +153,7 @@ void OutNormal::progressStart(const std::string & id,
if (progressFilter())
return;
- if (!isatty(STDOUT_FILENO))
+ if (!_isatty)
cout << label << " [";
if (is_tick)
@@ -147,10 +178,15 @@ void OutNormal::progressEnd(const std::string & id, const string & label, bool e
if (progressFilter())
return;
- if (isatty(STDOUT_FILENO))
- cout << CLEARLN << label << " [" << (error ? _("error") : _("done")) << "]";
- else
- cout << "]";
+ if (_isatty)
+ {
+ cout << CLEARLN << label << " [";
+ if (error)
+ print_color(_("error"), COLOR_RED);
+ else
+ cout << _("done");
+ }
+ cout << "]";
cout << endl << std::flush;
}
@@ -237,7 +273,7 @@ void OutNormal::prompt(PromptId id,
cout << startdesc << endl;
cout << prompt;
if (!poptions.empty())
- cout << " [" << poptions.optionString() << "]";
+ cout << " [" << (_has_colors ? poptions.optionStringColored() : poptions.optionString()) << "]";
cout << ": " << std::flush;
}
@@ -264,5 +300,5 @@ void OutNormal::promptHelp(const PromptOptions & poptions)
}
}
- cout << endl << "[" << poptions.optionString() << "]: " << std::flush;
+ cout << endl << "[" << (_has_colors ? poptions.optionStringColored() : poptions.optionString()) << "]: " << std::flush;
}
diff --git a/src/output/OutNormal.h b/src/output/OutNormal.h
index 1285295..efb3e95 100644
--- a/src/output/OutNormal.h
+++ b/src/output/OutNormal.h
@@ -1,3 +1,10 @@
+/*---------------------------------------------------------------------------*\
+ ____ _ _ __ _ __ ___ _ _
+ |_ / || | '_ \ '_ \/ -_) '_|
+ /__|\_, | .__/ .__/\___|_|
+ |__/|_| |_|
+\*---------------------------------------------------------------------------*/
+
#ifndef OUTNORMAL_H_
#define OUTNORMAL_H_
@@ -6,7 +13,7 @@
class OutNormal : public Out
{
public:
- OutNormal(Verbosity verbosity = NORMAL) : Out(TYPE_NORMAL, verbosity) {}
+ OutNormal(Verbosity verbosity = NORMAL);
virtual ~OutNormal();
public:
@@ -20,13 +27,13 @@ public:
/**
* Prints \a msg prepended with <tt>"Warning: "</tt> to the standard output
* and appends a newline.
- *
+ *
* \see Out::warning
*/
virtual void warning(const std::string & msg, Verbosity verbosity = NORMAL, Type mask = TYPE_ALL);
-
+
/**
- *
+ *
*/
virtual void error(const std::string & problem_desc, const std::string & hint = "");
virtual void error(const zypp::Exception & e,
@@ -52,7 +59,7 @@ public:
virtual void dwnldProgressEnd(const zypp::Url & uri,
long rate = -1,
bool error = false);
-
+
virtual void prompt(PromptId id,
const std::string & prompt,
const PromptOptions & poptions,
@@ -65,6 +72,8 @@ protected:
private:
bool infoWarningFilter(Verbosity verbosity, Type mask);
+ bool _has_colors;
+ bool _isatty;
};
#endif /*OUTNORMAL_H_*/
diff --git a/src/utils/colors.cc b/src/utils/colors.cc
new file mode 100644
index 0000000..ad3a523
--- /dev/null
+++ b/src/utils/colors.cc
@@ -0,0 +1,29 @@
+/*---------------------------------------------------------------------------*\
+ ____ _ _ __ _ __ ___ _ _
+ |_ / || | '_ \ '_ \/ -_) '_|
+ /__|\_, | .__/ .__/\___|_|
+ |__/|_| |_|
+\*---------------------------------------------------------------------------*/
+
+#include <iostream>
+#include <unistd.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "colors.h"
+
+bool has_colors()
+{
+ if (isatty(STDOUT_FILENO))
+ {
+ char *term = ::getenv("TERM");
+ if (term && ::strcmp(term, "dumb"))
+ return true;
+ }
+ return false;
+}
+
+void print_color(const std::string & s, const char * ansi_color_seq)
+{
+ std::cout << ansi_color_seq << s << COLOR_RESET;
+}
diff --git a/src/utils/colors.h b/src/utils/colors.h
new file mode 100644
index 0000000..0f9423d
--- /dev/null
+++ b/src/utils/colors.h
@@ -0,0 +1,27 @@
+/*---------------------------------------------------------------------------*\
+ ____ _ _ __ _ __ ___ _ _
+ |_ / || | '_ \ '_ \/ -_) '_|
+ /__|\_, | .__/ .__/\___|_|
+ |__/|_| |_|
+\*---------------------------------------------------------------------------*/
+
+#ifndef UTILS_COLORS_H_
+#define UTILS_COLORS_H_
+
+#include <iosfwd>
+
+#define COLOR_GREEN "\033[32m"
+#define COLOR_GREEN_BOLD "\033[1;32m"
+#define COLOR_RED "\033[31m"
+#define COLOR_RED_BOLD "\033[1;31m"
+#define COLOR_WHITE "\033[37m" // grey
+#define COLOR_WHITE_BOLD "\033[1;37m"
+#define COLOR_YELLOW "\033[33m" // brown
+#define COLOR_YELLOW_BOLD "\033[1;33m"
+
+#define COLOR_RESET "\033[m"
+
+bool has_colors();
+void print_color(const std::string & s, const char * ansi_color_seq);
+
+#endif /* UTILS_COLORS_H_ */
diff --git a/src/utils/prompt.cc b/src/utils/prompt.cc
index 87f7889..95b8fd9 100644
--- a/src/utils/prompt.cc
+++ b/src/utils/prompt.cc
@@ -1,3 +1,10 @@
+/*---------------------------------------------------------------------------*\
+ ____ _ _ __ _ __ ___ _ _
+ |_ / || | '_ \ '_ \/ -_) '_|
+ /__|\_, | .__/ .__/\___|_|
+ |__/|_| |_|
+\*---------------------------------------------------------------------------*/
+
#include <ctype.h>
#include <iostream>
#include <sstream>
@@ -14,6 +21,8 @@
#include "zypp/base/String.h"
#include "Zypper.h"
+#include "utils/colors.h"
+
#include "prompt.h"
using namespace std;
@@ -45,25 +54,67 @@ void PromptOptions::setOptions(const std::string & option_str, unsigned int defa
_default = default_opt;
}
+
+
const string PromptOptions::optionString() const
{
- string option_str;
+ ostringstream option_str;
StrVector::const_iterator it;
if ((it = options().begin()) != options().end())
{
- option_str += (defaultOpt() == 0 ? zypp::str::toUpper(*it) : *it);
+ if (defaultOpt() == 0)
+ option_str << "_" << *it << "_";
+ else
+ option_str << *it;
++it;
}
for (unsigned int i = 1; it != options().end() && i < _shown_count; ++it, ++i)
if (isEnabled(i))
- option_str += "/" + (defaultOpt() == i ? zypp::str::toUpper(*it) : *it);
+ {
+ option_str << "/";
+ if (defaultOpt() == i)
+ option_str << "_" << *it << "_";
+ else
+ option_str << *it;
+ }
if (!_opt_help.empty())
- option_str += "/?";
+ option_str << "/?";
- return option_str;
+ return option_str.str();
}
+const string PromptOptions::optionStringColored() const
+{
+ ostringstream option_str;
+ StrVector::const_iterator it;
+ if ((it = options().begin()) != options().end())
+ {
+ if (defaultOpt() == 0)
+ option_str << COLOR_YELLOW << *it;
+ else
+ option_str << COLOR_WHITE << *it;
+ ++it;
+ }
+ for (unsigned int i = 1; it != options().end() && i < _shown_count; ++it, ++i)
+ if (isEnabled(i))
+ {
+ option_str << COLOR_WHITE << "/";
+ if (defaultOpt() == i)
+ option_str << COLOR_YELLOW << *it;
+ else
+ option_str << *it;
+ }
+
+ if (!_opt_help.empty())
+ option_str << COLOR_WHITE << "/?";
+
+ option_str << COLOR_RESET;
+
+ return option_str.str();
+}
+
+
void PromptOptions::setOptionHelp(unsigned int opt, const std::string & help_str)
{
if (help_str.empty())
@@ -302,10 +353,9 @@ unsigned int get_prompt_reply(Zypper & zypper,
if (poptions.isYesNoPrompt())
{
s << " " << format(
- // TranslatorExplanation don't translate the 'y' and 'n', they can always be used as answers.
- // The second and the third %s is the translated 'yes' and 'no' string (lowercase).
- _("Enter 'y' for '%s' or 'n' for '%s' if nothing else works for you."))
- % _("yes") % _("no");
+ // translators: the %s are: 'y', 'n', 'yes' (translated), and 'no' (translated).
+ _("Enter '%s' for '%s' or '%s' for '%s' if nothing else works for you."))
+ % "y" % "n" % _("yes") % _("no");
}
zypper.out().prompt(pid, s.str(), poptions);
diff --git a/src/utils/prompt.h b/src/utils/prompt.h
index 86828b2..6ef5bdc 100644
--- a/src/utils/prompt.h
+++ b/src/utils/prompt.h
@@ -1,3 +1,10 @@
+/*---------------------------------------------------------------------------*\
+ ____ _ _ __ _ __ ___ _ _
+ |_ / || | '_ \ '_ \/ -_) '_|
+ /__|\_, | .__/ .__/\___|_|
+ |__/|_| |_|
+\*---------------------------------------------------------------------------*/
+
#ifndef ZYPPERPROMPT_H_
#define ZYPPERPROMPT_H_
@@ -46,6 +53,7 @@ public:
void setOptions(const std::string & option_str, unsigned int default_opt);
unsigned int defaultOpt() const { return _default; }
const std::string optionString() const;
+ const std::string optionStringColored() const;
bool empty() const { return _options.empty(); }
bool isYesNoPrompt() const;
--
To unsubscribe, e-mail: zypp-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: zypp-commit+help(a)opensuse.org
1
0
22 Feb '09
ref: refs/heads/master
commit f95d38e8f032a2192383e39cbae3a77975c3b701
Author: Duncan Mac-Vicar P <dmacvicar(a)suse.de>
Date: Sun Feb 22 16:16:50 2009 +0100
further refactor media2curl.
Move all the exception checking (duplicated across two methods) to its own place
so we can reuse it when implementing range transfer support.
---
zypp/media/MediaCurl.cc | 513 ++++++++++++++++++-----------------------------
zypp/media/MediaCurl.h | 23 ++-
2 files changed, 213 insertions(+), 323 deletions(-)
diff --git a/zypp/media/MediaCurl.cc b/zypp/media/MediaCurl.cc
index af797d2..2e3cbe9 100644
--- a/zypp/media/MediaCurl.cc
+++ b/zypp/media/MediaCurl.cc
@@ -177,12 +177,10 @@ namespace zypp {
}
-///////////////////////////////////////////////////////////////////
-//
-// CLASS NAME : MediaCurl
-//
-///////////////////////////////////////////////////////////////////
-
+/**
+ * Fills the settings structure using options passed on the url
+ * for example ?timeout=x&proxy=foo
+ */
void fillSettingsFromUrl( const Url &url, TransferSettings &s )
{
std::string param(url.getQueryParam("timeout"));
@@ -261,6 +259,10 @@ void fillSettingsFromUrl( const Url &url, TransferSettings &s )
}
}
+/**
+ * Reads the system proxy configuration and fills the settings
+ * structure proxy information
+ */
void fillSettingsSystemProxy( const Url&url, TransferSettings &s )
{
ProxyInfo proxy_info (ProxyInfo::ImplPtr(new ProxyInfoSysconfig("proxy")));
@@ -308,6 +310,10 @@ void fillSettingsSystemProxy( const Url&url, TransferSettings &s )
Pathname MediaCurl::_cookieFile = "/var/lib/YaST2/cookies";
+/**
+ * initialized only once, this gets the anonymous id
+ * from the target, which we pass in the http header
+ */
static const char *const anonymousIdHeader()
{
// we need to add the release and identifier to the
@@ -324,6 +330,10 @@ static const char *const anonymousIdHeader()
return _value.c_str();
}
+/**
+ * initialized only once, this gets the distribution flavor
+ * from the target, which we pass in the http header
+ */
static const char *const distributionFlavorHeader()
{
// we need to add the release and identifier to the
@@ -340,6 +350,10 @@ static const char *const distributionFlavorHeader()
return _value.c_str();
}
+/**
+ * initialized only once, this gets the agent string
+ * which also includes the curl version
+ */
static const char *const agentString()
{
// we need to add the release and identifier to the
@@ -359,7 +373,8 @@ static const char *const agentString()
return _value.c_str();
}
-// we use this define to unbloat code
+// we use this define to unbloat code as this C setting option
+// and catching exception is done frequently.
#define SET_OPTION(opt,val) { \
ret = curl_easy_setopt ( _curl, opt, val ); \
if ( ret != 0) { \
@@ -662,11 +677,7 @@ MediaCurl::checkAttachPoint(const Pathname &apoint) const
}
///////////////////////////////////////////////////////////////////
-//
-//
-// METHOD NAME : MediaCurl::disconnectFrom
-// METHOD TYPE : PMError
-//
+
void MediaCurl::disconnectFrom()
{
if ( _customHeaders )
@@ -682,15 +693,8 @@ void MediaCurl::disconnectFrom()
}
}
-
///////////////////////////////////////////////////////////////////
-//
-//
-// METHOD NAME : MediaCurl::releaseFrom
-// METHOD TYPE : void
-//
-// DESCRIPTION : Asserted that media is attached.
-//
+
void MediaCurl::releaseFrom( const std::string & ejectDev )
{
disconnect();
@@ -724,12 +728,8 @@ static Url getFileUrl(const Url & url, const Pathname & filename)
return newurl;
}
-
///////////////////////////////////////////////////////////////////
-//
-// METHOD NAME : MediaCurl::getFile
-// METHOD TYPE : void
-//
+
void MediaCurl::getFile( const Pathname & filename ) const
{
// Use absolute file name to prevent access of files outside of the
@@ -738,10 +738,7 @@ void MediaCurl::getFile( const Pathname & filename ) const
}
///////////////////////////////////////////////////////////////////
-//
-// METHOD NAME : MediaCurl::getFileCopy
-// METHOD TYPE : void
-//
+
void MediaCurl::getFileCopy( const Pathname & filename , const Pathname & target) const
{
callback::SendReport<DownloadProgressReport> report;
@@ -781,6 +778,7 @@ void MediaCurl::getFileCopy( const Pathname & filename , const Pathname & target
report->finish(fileurl, zypp::media::DownloadProgressReport::NO_ERROR, "");
}
+///////////////////////////////////////////////////////////////////
bool MediaCurl::getDoesFileExist( const Pathname & filename ) const
{
@@ -811,6 +809,125 @@ bool MediaCurl::getDoesFileExist( const Pathname & filename ) const
return false;
}
+///////////////////////////////////////////////////////////////////
+
+void MediaCurl::evaluateCurlCode( const Pathname &filename,
+ CURLcode code,
+ bool timeout_reached ) const
+{
+ Url url(getFileUrl(_url, filename));
+
+ if ( code != 0 )
+ {
+ std::string err;
+ try
+ {
+ switch ( code )
+ {
+ case CURLE_UNSUPPORTED_PROTOCOL:
+ case CURLE_URL_MALFORMAT:
+ case CURLE_URL_MALFORMAT_USER:
+ err = " Bad URL";
+ case CURLE_LOGIN_DENIED:
+ ZYPP_THROW(
+ MediaUnauthorizedException(url, "Login failed.", _curlError, ""));
+ break;
+ case CURLE_HTTP_RETURNED_ERROR:
+ {
+ long httpReturnCode = 0;
+ CURLcode infoRet = curl_easy_getinfo( _curl,
+ CURLINFO_RESPONSE_CODE,
+ &httpReturnCode );
+ if ( infoRet == CURLE_OK )
+ {
+ string msg = "HTTP response: " + str::numstring( httpReturnCode );
+ switch ( httpReturnCode )
+ {
+ case 401:
+ {
+ string auth_hint = getAuthHint();
+
+ DBG << msg << " Login failed (URL: " << url.asString() << ")" << std::endl;
+ DBG << "MediaUnauthorizedException auth hint: '" << auth_hint << "'" << std::endl;
+
+ ZYPP_THROW(MediaUnauthorizedException(
+ url, "Login failed.", _curlError, auth_hint
+ ));
+ }
+
+ case 503: // service temporarily unavailable (bnc #462545)
+ ZYPP_THROW(MediaTemporaryProblemException(url));
+ case 504: // gateway timeout
+ ZYPP_THROW(MediaTimeoutException(url));
+ case 403:
+ ZYPP_THROW(MediaForbiddenException(url));
+ case 404:
+ ZYPP_THROW(MediaFileNotFoundException(_url, filename));
+ }
+
+ DBG << msg << " (URL: " << url.asString() << ")" << std::endl;
+ ZYPP_THROW(MediaCurlException(url, msg, _curlError));
+ }
+ else
+ {
+ string msg = "Unable to retrieve HTTP response:";
+ DBG << msg << " (URL: " << url.asString() << ")" << std::endl;
+ ZYPP_THROW(MediaCurlException(url, msg, _curlError));
+ }
+ }
+ break;
+ case CURLE_FTP_COULDNT_RETR_FILE:
+ case CURLE_FTP_ACCESS_DENIED:
+ err = "File not found";
+ ZYPP_THROW(MediaFileNotFoundException(_url, filename));
+ break;
+ case CURLE_BAD_PASSWORD_ENTERED:
+ case CURLE_FTP_USER_PASSWORD_INCORRECT:
+ err = "Login failed";
+ break;
+ case CURLE_COULDNT_RESOLVE_PROXY:
+ case CURLE_COULDNT_RESOLVE_HOST:
+ case CURLE_COULDNT_CONNECT:
+ case CURLE_FTP_CANT_GET_HOST:
+ err = "Connection failed";
+ break;
+ case CURLE_WRITE_ERROR:
+ err = "Write error";
+ break;
+ case CURLE_ABORTED_BY_CALLBACK:
+ case CURLE_OPERATION_TIMEDOUT:
+ if( timeout_reached)
+ {
+ err = "Timeout reached";
+ ZYPP_THROW(MediaTimeoutException(url));
+ }
+ else
+ {
+ err = "User abort";
+ }
+ break;
+ case CURLE_SSL_PEER_CERTIFICATE:
+ default:
+ err = "Unrecognized error";
+ break;
+ }
+
+ // uhm, no 0 code but unknown curl exception
+ ZYPP_THROW(MediaCurlException(url, err, _curlError));
+ }
+ catch (const MediaException & excpt_r)
+ {
+ ZYPP_RETHROW(excpt_r);
+ }
+ }
+ else
+ {
+ // actually the code is 0, nothing happened
+ }
+}
+
+///////////////////////////////////////////////////////////////////
+
bool MediaCurl::doGetDoesFileExist( const Pathname & filename ) const
{
DBG << filename.asString() << endl;
@@ -821,23 +938,7 @@ bool MediaCurl::doGetDoesFileExist( const Pathname & filename ) const
if(_url.getHost().empty())
ZYPP_THROW(MediaBadUrlEmptyHostException(_url));
- string path = _url.getPathName();
- if ( !path.empty() && path != "/" && *path.rbegin() == '/' &&
- filename.absolute() ) {
- // If url has a path with trailing slash, remove the leading slash from
- // the absolute file name
- path += filename.asString().substr( 1, filename.asString().size() - 1 );
- } else if ( filename.relative() ) {
- // Add trailing slash to path, if not already there
- if ( !path.empty() && *path.rbegin() != '/' ) path += "/";
- // Remove "./" from begin of relative file name
- path += filename.asString().substr( 2, filename.asString().size() - 2 );
- } else {
- path += filename.asString();
- }
-
- Url url( _url );
- url.setPathName( path );
+ Url url(getFileUrl(_url, filename));
DBG << "URL: " << url.asString() << endl;
// Use URL without options and without username and passwd
@@ -846,7 +947,7 @@ bool MediaCurl::doGetDoesFileExist( const Pathname & filename ) const
// the rest was already passed as curl options (in attachTo).
Url curlUrl( url );
- // Use asString + url::ViewOptions instead?
+ // Use asString + url::ViewOptions instead?
curlUrl.setUsername( "" );
curlUrl.setPassword( "" );
curlUrl.setPathParams( "" );
@@ -872,6 +973,7 @@ bool MediaCurl::doGetDoesFileExist( const Pathname & filename ) const
// little data, that works with broken servers, and
// works for ftp as well, because retrieving only headers
// ftp will return always OK code ?
+ // See http://curl.haxx.se/docs/knownbugs.html #58
if ( _url.getScheme() == "http" || _url.getScheme() == "https" )
ret = curl_easy_setopt( _curl, CURLOPT_NOBODY, 1 );
else
@@ -889,7 +991,6 @@ bool MediaCurl::doGetDoesFileExist( const Pathname & filename ) const
ZYPP_THROW(MediaCurlSetOptException(url, _curlError));
}
-
FILE *file = ::fopen( "/dev/null", "w" );
if ( !file ) {
::fclose(file);
@@ -925,12 +1026,6 @@ bool MediaCurl::doGetDoesFileExist( const Pathname & filename ) const
}
ZYPP_THROW(MediaCurlSetOptException(url, err));
}
- // Set callback and perform.
- //ProgressData progressData(_xfer_timeout, url, &report);
- //report->start(url, dest);
- //if ( curl_easy_setopt( _curl, CURLOPT_PROGRESSDATA, &progressData ) != 0 ) {
- // WAR << "Can't set CURLOPT_PROGRESSDATA: " << _curlError << endl;;
- //}
CURLcode ok = curl_easy_perform( _curl );
MIL << "perform code: " << ok << " [ " << curl_easy_strerror(ok) << " ]" << endl;
@@ -938,148 +1033,54 @@ bool MediaCurl::doGetDoesFileExist( const Pathname & filename ) const
// reset curl settings
if ( _url.getScheme() == "http" || _url.getScheme() == "https" )
{
- ret = curl_easy_setopt( _curl, CURLOPT_NOBODY, NULL );
+ curl_easy_setopt( _curl, CURLOPT_NOBODY, NULL );
+ if ( ret != 0 ) {
+ ZYPP_THROW(MediaCurlSetOptException(url, _curlError));
+ }
+
/* yes, this is why we never got to get NOBODY working before,
because setting it changes this option too, and we also
need to reset it
See: http://curl.haxx.se/mail/archive-2005-07/0073.html
*/
- ret = curl_easy_setopt( _curl, CURLOPT_HTTPGET, 1 );
+ curl_easy_setopt( _curl, CURLOPT_HTTPGET, 1);
+ if ( ret != 0 ) {
+ ZYPP_THROW(MediaCurlSetOptException(url, _curlError));
+ }
+
}
else
- ret = curl_easy_setopt( _curl, CURLOPT_RANGE, NULL );
-
- if ( ret != 0 )
{
- ZYPP_THROW(MediaCurlSetOptException(url, _curlError));
+ // for FTP we set different options
+ curl_easy_setopt( _curl, CURLOPT_RANGE, NULL);
+ if ( ret != 0 ) {
+ ZYPP_THROW(MediaCurlSetOptException(url, _curlError));
+ }
}
-
+
+ // if the code is not zero, close the file
if ( ok != 0 )
- {
- ::fclose( file );
-
- std::string err;
- try
- {
- bool err_file_not_found = false;
- switch ( ok )
- {
- case CURLE_FTP_COULDNT_RETR_FILE:
- case CURLE_FTP_ACCESS_DENIED:
- err_file_not_found = true;
- break;
- case CURLE_LOGIN_DENIED:
- ZYPP_THROW(
- MediaUnauthorizedException(url, "Login failed.", _curlError, ""));
- break;
- case CURLE_HTTP_RETURNED_ERROR:
- {
- long httpReturnCode = 0;
- CURLcode infoRet = curl_easy_getinfo( _curl,
- CURLINFO_RESPONSE_CODE,
- &httpReturnCode );
- if ( infoRet == CURLE_OK )
- {
- string msg = "HTTP response: " + str::numstring( httpReturnCode );
- bool brk = false; // break also from the parent switch
- switch ( httpReturnCode )
- {
- case 401: // authorization required
- {
- std::string auth_hint = getAuthHint();
-
- DBG << msg << " Login failed (URL: " << url.asString() << ")" << std::endl;
- DBG << "MediaUnauthorizedException auth hint: '" << auth_hint << "'" << std::endl;
-
- ZYPP_THROW(MediaUnauthorizedException(
- url, "Login failed.", _curlError, auth_hint
- ));
- }
-
- case 503: // service temporarily unavailable (bnc #462545)
- ZYPP_THROW(MediaTemporaryProblemException(url));
-
- case 504: // gateway timeout
- ZYPP_THROW(MediaTimeoutException(url));
-
- case 403: // access denied
- ZYPP_THROW(MediaForbiddenException(url));
-
- case 404: // not found
- err_file_not_found = true;
- brk = true;
- break;
- }
-
- if (brk)
- break;
-
- DBG << msg << " (URL: " << url.asString() << ")" << std::endl;
- ZYPP_THROW(MediaCurlException(url, msg, _curlError));
- }
- else
- {
- string msg = "Unable to retrieve HTTP response:";
- DBG << msg << " (URL: " << url.asString() << ")" << std::endl;
- ZYPP_THROW(MediaCurlException(url, msg, _curlError));
- }
- }
- break;
- case CURLE_UNSUPPORTED_PROTOCOL:
- case CURLE_URL_MALFORMAT:
- case CURLE_URL_MALFORMAT_USER:
- case CURLE_BAD_PASSWORD_ENTERED:
- case CURLE_FTP_USER_PASSWORD_INCORRECT:
- err = "Login failed";
- break;
- case CURLE_COULDNT_RESOLVE_PROXY:
- case CURLE_COULDNT_RESOLVE_HOST:
- case CURLE_COULDNT_CONNECT:
- case CURLE_FTP_CANT_GET_HOST:
- err = "Connection failed";
- break;
- case CURLE_WRITE_ERROR:
- err = "Write error";
- break;
- case CURLE_ABORTED_BY_CALLBACK:
- case CURLE_OPERATION_TIMEOUTED:
- err = "Timeout reached";
- ZYPP_THROW(MediaTimeoutException(url));
- break;
- case CURLE_SSL_CACERT:
- ZYPP_THROW(MediaBadCAException(url,_curlError));
- case CURLE_SSL_PEER_CERTIFICATE:
- default:
- err = curl_easy_strerror(ok);
- if (err.empty())
- err = "Unrecognized error";
- break;
- }
-
- if( err_file_not_found)
- {
- // file does not exists
- return false;
- }
- else
- {
- // there was an error
- ZYPP_THROW(MediaCurlException(url, string(), _curlError));
- }
- }
- catch (const MediaException & excpt_r)
- {
- ZYPP_RETHROW(excpt_r);
- }
+ ::fclose(file);
+
+ // as we are not having user interaction, the user can't cancel
+ // the file existence checking, a callback or timeout return code
+ // will be always a timeout.
+ try {
+ evaluateCurlCode( filename, ok, true /* timeout */);
+ }
+ catch ( const MediaFileNotFoundException &e ) {
+ // if the file did not exist then we can return false
+ return false;
+ }
+ catch ( const MediaException &e ) {
+ // some error, we are not sure about file existence, rethrw
+ ZYPP_RETHROW(e);
}
-
// exists
return ( ok == CURLE_OK );
- //if ( curl_easy_setopt( _curl, CURLOPT_PROGRESSDATA, NULL ) != 0 ) {
- // WAR << "Can't unset CURLOPT_PROGRESSDATA: " << _curlError << endl;;
- //}
}
+///////////////////////////////////////////////////////////////////
void MediaCurl::doGetFileCopy( const Pathname & filename , const Pathname & target, callback::SendReport<DownloadProgressReport> & report, RequestOptions options ) const
{
@@ -1192,7 +1193,8 @@ void MediaCurl::doGetFileCopy( const Pathname & filename , const Pathname & targ
WAR << "Can't unset CURLOPT_PROGRESSDATA: " << _curlError << endl;;
}
- if ( ret != 0 ) {
+ if ( ret != 0 )
+ {
ERR << "curl error: " << ret << ": " << _curlError
<< ", temp file size " << PathInfo(destNew).size()
<< " byte." << endl;
@@ -1200,114 +1202,18 @@ void MediaCurl::doGetFileCopy( const Pathname & filename , const Pathname & targ
::fclose( file );
filesystem::unlink( destNew );
- std::string err;
+ // the timeout is determined by the progress data object
+ // which holds wheter the timeout was reached or not,
+ // otherwise it would be a user cancel
try {
- bool err_file_not_found = false;
- switch ( ret ) {
- case CURLE_UNSUPPORTED_PROTOCOL:
- case CURLE_URL_MALFORMAT:
- case CURLE_URL_MALFORMAT_USER:
- err = " Bad URL";
- case CURLE_LOGIN_DENIED:
- ZYPP_THROW(
- MediaUnauthorizedException(url, "Login failed.", _curlError, ""));
- break;
- case CURLE_HTTP_RETURNED_ERROR:
- {
- long httpReturnCode = 0;
- CURLcode infoRet = curl_easy_getinfo( _curl,
- CURLINFO_RESPONSE_CODE,
- &httpReturnCode );
- if ( infoRet == CURLE_OK )
- {
- string msg = "HTTP response: " + str::numstring( httpReturnCode );
- switch ( httpReturnCode )
- {
- case 401:
- {
- string auth_hint = getAuthHint();
-
- DBG << msg << " Login failed (URL: " << url.asString() << ")" << std::endl;
- DBG << "MediaUnauthorizedException auth hint: '" << auth_hint << "'" << std::endl;
-
- ZYPP_THROW(MediaUnauthorizedException(
- url, "Login failed.", _curlError, auth_hint
- ));
- }
-
- case 503: // service temporarily unavailable (bnc #462545)
- ZYPP_THROW(MediaTemporaryProblemException(url));
-
- case 504: // gateway timeout
- ZYPP_THROW(MediaTimeoutException(url));
-
- case 403:
- ZYPP_THROW(MediaForbiddenException(url));
-
- case 404:
- ZYPP_THROW(MediaFileNotFoundException(_url, filename));
- }
-
- DBG << msg << " (URL: " << url.asString() << ")" << std::endl;
- ZYPP_THROW(MediaCurlException(url, msg, _curlError));
- }
- else
- {
- string msg = "Unable to retrieve HTTP response:";
- DBG << msg << " (URL: " << url.asString() << ")" << std::endl;
- ZYPP_THROW(MediaCurlException(url, msg, _curlError));
- }
- }
- break;
- case CURLE_FTP_COULDNT_RETR_FILE:
- case CURLE_FTP_ACCESS_DENIED:
- err = "File not found";
- err_file_not_found = true;
- break;
- case CURLE_BAD_PASSWORD_ENTERED:
- case CURLE_FTP_USER_PASSWORD_INCORRECT:
- err = "Login failed";
- break;
- case CURLE_COULDNT_RESOLVE_PROXY:
- case CURLE_COULDNT_RESOLVE_HOST:
- case CURLE_COULDNT_CONNECT:
- case CURLE_FTP_CANT_GET_HOST:
- err = "Connection failed";
- break;
- case CURLE_WRITE_ERROR:
- err = "Write error";
- break;
- case CURLE_ABORTED_BY_CALLBACK:
- case CURLE_OPERATION_TIMEDOUT:
- if( progressData.reached)
- {
- err = "Timeout reached";
- ZYPP_THROW(MediaTimeoutException(url));
- }
- else
- {
- err = "User abort";
- }
- break;
- case CURLE_SSL_PEER_CERTIFICATE:
- default:
- err = "Unrecognized error";
- break;
- }
- if( err_file_not_found)
- {
- ZYPP_THROW(MediaFileNotFoundException(_url, filename));
- }
- else
- {
- ZYPP_THROW(MediaCurlException(url, err, _curlError));
- }
+ evaluateCurlCode( filename, ret, progressData.reached);
}
- catch (const MediaException & excpt_r)
- {
- ZYPP_RETHROW(excpt_r);
+ catch ( const MediaException &e ) {
+ // some error, we are not sure about file existence, rethrw
+ ZYPP_RETHROW(e);
}
}
+
#if DETECT_DIR_INDEX
else
if(curlUrl.getScheme() == "http" ||
@@ -1400,15 +1306,8 @@ void MediaCurl::doGetFileCopy( const Pathname & filename , const Pathname & targ
DBG << "done: " << PathInfo(dest) << endl;
}
-
///////////////////////////////////////////////////////////////////
-//
-//
-// METHOD NAME : MediaCurl::getDir
-// METHOD TYPE : PMError
-//
-// DESCRIPTION : Asserted that media is attached
-//
+
void MediaCurl::getDir( const Pathname & dirname, bool recurse_r ) const
{
filesystem::DirContent content;
@@ -1441,13 +1340,7 @@ void MediaCurl::getDir( const Pathname & dirname, bool recurse_r ) const
}
///////////////////////////////////////////////////////////////////
-//
-//
-// METHOD NAME : MediaCurl::getDirInfo
-// METHOD TYPE : PMError
-//
-// DESCRIPTION : Asserted that media is attached and retlist is empty.
-//
+
void MediaCurl::getDirInfo( std::list<std::string> & retlist,
const Pathname & dirname, bool dots ) const
{
@@ -1455,13 +1348,7 @@ void MediaCurl::getDirInfo( std::list<std::string> & retlist,
}
///////////////////////////////////////////////////////////////////
-//
-//
-// METHOD NAME : MediaCurl::getDirInfo
-// METHOD TYPE : PMError
-//
-// DESCRIPTION : Asserted that media is attached and retlist is empty.
-//
+
void MediaCurl::getDirInfo( filesystem::DirContent & retlist,
const Pathname & dirname, bool dots ) const
{
@@ -1469,13 +1356,7 @@ void MediaCurl::getDirInfo( filesystem::DirContent & retlist,
}
///////////////////////////////////////////////////////////////////
-//
-//
-// METHOD NAME : MediaCurl::progressCallback
-// METHOD TYPE : int
-//
-// DESCRIPTION : Progress callback triggered from MediaCurl::getFile
-//
+
int MediaCurl::progressCallback( void *clientp,
double dltotal, double dlnow,
double ultotal, double ulnow)
@@ -1565,6 +1446,7 @@ int MediaCurl::progressCallback( void *clientp,
return 0;
}
+///////////////////////////////////////////////////////////////////
string MediaCurl::getAuthHint() const
{
@@ -1581,6 +1463,7 @@ string MediaCurl::getAuthHint() const
return "";
}
+///////////////////////////////////////////////////////////////////
bool MediaCurl::authenticate(const string & availAuthTypes, bool firstTry) const
{
diff --git a/zypp/media/MediaCurl.h b/zypp/media/MediaCurl.h
index 6be4bdb..a11a012 100644
--- a/zypp/media/MediaCurl.h
+++ b/zypp/media/MediaCurl.h
@@ -118,20 +118,27 @@ class MediaCurl : public MediaHandler
bool authenticate(const std::string & availAuthTypes, bool firstTry) const;
private:
+
+ /**
+ * Evaluates a curl return code and throws the right MediaException
+ * \p filename Filename being downloaded
+ * \p code Code curl returnes
+ * \p timeout Whether we reached timeout, which we need to differentiate
+ * in case the codes aborted-by-callback or timeout are returned by curl
+ * Otherwise we can't differentiate abort from timeout. Here you may
+ * want to pass the progress data object timeout-reached value, or
+ * just true if you are not doing user interaction.
+ *
+ * \throws MediaException If there is a problem
+ */
+ void evaluateCurlCode( const zypp::Pathname &filename, CURLcode code, bool timeout ) const;
+
CURL *_curl;
char _curlError[ CURL_ERROR_SIZE ];
long _curlDebug;
curl_slist *_customHeaders;
- /*
- mutable std::string _userpwd;
- std::string _proxy;
- std::string _proxyuserpwd;
- */
std::string _currentCookieFile;
- //std::string _ca_path;
- //long _xfer_timeout;
-
static Pathname _cookieFile;
protected:
TransferSettings _settings;
--
To unsubscribe, e-mail: zypp-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: zypp-commit+help(a)opensuse.org
1
0
ref: refs/heads/master
commit c6fb49341b9b7486f9ee846a3f8580ba58b764ad
Author: Michael Andres <ma(a)suse.de>
Date: Sun Feb 22 15:28:10 2009 +0100
changes
---
package/libzypp.changes | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/package/libzypp.changes b/package/libzypp.changes
index 8a0df32..2f7ae71 100644
--- a/package/libzypp.changes
+++ b/package/libzypp.changes
@@ -1,4 +1,9 @@
-------------------------------------------------------------------
+Sun Feb 22 15:27:11 CET 2009 - ma(a)suse.de
+
+- Never refresh repositories from CD/DVD, once they are created. (bnc #476429)
+
+-------------------------------------------------------------------
Fri Feb 20 16:28:19 CET 2009 - dmacvicar(a)suse.de
- MediaAria2c: allow disabling aria2 using ZYPP_ARIA2C=0.
--
To unsubscribe, e-mail: zypp-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: zypp-commit+help(a)opensuse.org
1
0
[zypp-commit] <libzypp> master : Never refresh repositories from CD/DVD, once they are created. (bnc #476429)
by Michael Andres 22 Feb '09
by Michael Andres 22 Feb '09
22 Feb '09
ref: refs/heads/master
commit 59fdb34aeba2c9dc1a7e924f5766704775cbdb56
Author: Michael Andres <ma(a)suse.de>
Date: Sun Feb 22 15:17:42 2009 +0100
Never refresh repositories from CD/DVD, once they are created. (bnc #476429)
---
zypp/RepoManager.cc | 41 ++++++++++++++++++++++++++++-------------
1 files changed, 28 insertions(+), 13 deletions(-)
diff --git a/zypp/RepoManager.cc b/zypp/RepoManager.cc
index 96657e4..f14291d 100644
--- a/zypp/RepoManager.cc
+++ b/zypp/RepoManager.cc
@@ -713,22 +713,25 @@ namespace zypp
{
MIL << "Going to try to check whether refresh is needed for " << url << endl;
- repo::RepoType repokind = info.type();
+ // first check old (cached) metadata
+ Pathname rawpath = rawmetadata_path_for_repoinfo( _pimpl->options, info );
+ filesystem::assert_dir(rawpath);
+ oldstatus = metadataStatus(info);
- // if the type is unknown, try probing.
- switch ( repokind.toEnum() )
+ if ( oldstatus.empty() )
{
- case RepoType::NONE_e:
- // unknown, probe it
- repokind = probe(url);
- break;
- default:
- break;
+ MIL << "No cached metadata, going to refresh" << endl;
+ return REFRESH_NEEDED;
}
- Pathname rawpath = rawmetadata_path_for_repoinfo( _pimpl->options, info );
- filesystem::assert_dir(rawpath);
- oldstatus = metadataStatus(info);
+ {
+ std::string scheme( url.getScheme() );
+ if ( scheme == "cd" || scheme == "dvd" )
+ {
+ MIL << "never refresh CD/DVD" << endl;
+ return REPO_UP_TO_DATE;
+ }
+ }
// now we've got the old (cached) status, we can decide repo.refresh.delay
if (policy != RefreshForced && policy != RefreshIfNeededIgnoreDelay)
@@ -752,9 +755,21 @@ namespace zypp
}
}
- // create temp dir as sibling of rawpath
+ // To test the new matadta create temp dir as sibling of rawpath
filesystem::TmpDir tmpdir( filesystem::TmpDir::makeSibling( rawpath ) );
+ repo::RepoType repokind = info.type();
+ // if the type is unknown, try probing.
+ switch ( repokind.toEnum() )
+ {
+ case RepoType::NONE_e:
+ // unknown, probe it
+ repokind = probe(url);
+ break;
+ default:
+ break;
+ }
+
if ( ( repokind.toEnum() == RepoType::RPMMD_e ) ||
( repokind.toEnum() == RepoType::YAST2_e ) )
{
--
To unsubscribe, e-mail: zypp-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: zypp-commit+help(a)opensuse.org
1
0
ref: refs/heads/SuSE-Code-11-Branch
commit e878a799e1f171b257be3e6bc592d11c62c1ee57
Author: Michael Andres <ma(a)suse.de>
Date: Sun Feb 22 15:17:55 2009 +0100
changes
---
VERSION.cmake | 4 +-
package/libzypp.changes | 118 ++++++++++++++++++++++++----------------------
2 files changed, 64 insertions(+), 58 deletions(-)
diff --git a/VERSION.cmake b/VERSION.cmake
index 8ad93b1..c5e22b9 100644
--- a/VERSION.cmake
+++ b/VERSION.cmake
@@ -51,8 +51,8 @@
SET(LIBZYPP_MAJOR "5")
SET(LIBZYPP_COMPATMINOR "23")
SET(LIBZYPP_MINOR "28")
-SET(LIBZYPP_PATCH "1")
+SET(LIBZYPP_PATCH "2")
#
-# LAST RELEASED: 5.28.1 (23)
+# LAST RELEASED: 5.28.2 (23)
# (The number in parenthesis is LIBZYPP_COMPATMINOR)
#=======
diff --git a/package/libzypp.changes b/package/libzypp.changes
index a2da2dd..ba38293 100644
--- a/package/libzypp.changes
+++ b/package/libzypp.changes
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Sun Feb 22 15:11:25 CET 2009 - ma(a)suse.de
+
+- Never refresh repositories from CD/DVD, once they are created. (bnc #476429)
+- version 5.28.2 (23)
+
+-------------------------------------------------------------------
Wed Feb 18 13:20:09 CET 2009 - ma(a)suse.de
- Neither lose packages with empty name, nor SEGV when processing them. (bnc #470011)
@@ -24,12 +30,12 @@ Mon Feb 9 13:08:37 CET 2009 - ma(a)suse.de
-------------------------------------------------------------------
Fri Feb 6 11:38:00 CET 2009 - schubi(a)suse.de
-- updated translations
+- updated translations
-------------------------------------------------------------------
Tue Feb 3 16:58:07 CET 2009 - ma(a)suse.de
-- Send any output from rpm install/delete scripts via callback, so
+- Send any output from rpm install/delete scripts via callback, so
applications are able to display it. (bnc #369450)
- version 5.27.4 (23)
@@ -65,7 +71,7 @@ Mon Jan 26 17:56:40 CET 2009 - schubi(a)suse.de
-------------------------------------------------------------------
Mon Jan 26 11:47:27 CET 2009 - ma(a)suse.de
-- Let vendor checks per default differ between 'openSUSE Build Service'
+- Let vendor checks per default differ between 'openSUSE Build Service'
and 'openSUSE' (bnc #467262).
-------------------------------------------------------------------
@@ -91,7 +97,7 @@ Mon Jan 12 10:09:55 CET 2009 - jkupec(a)suse.cz
Fri Jan 9 16:43:40 CET 2009 - schubi(a)suse.de
- update translations
-- version 5.25.1
+- version 5.25.1
-------------------------------------------------------------------
Thu Dec 18 22:26:18 CET 2008 - ma(a)suse.de
@@ -103,16 +109,16 @@ Thu Dec 18 22:26:18 CET 2008 - ma(a)suse.de
-------------------------------------------------------------------
Thu Dec 18 13:02:27 CET 2008 - ma(a)suse.de
-- Add Package::filelist, faster and less memory consuming
+- Add Package::filelist, faster and less memory consuming
implementation of Package::filenames (now deprecated).
- revision 11949
-------------------------------------------------------------------
Thu Dec 11 21:39:50 CET 2008 - ma(a)suse.de
-- Add str::hexencode and str::hexdecode to encode special characters
+- Add str::hexencode and str::hexdecode to encode special characters
in a string as %XX.
-- Hexdecode modalias strings in rpm dependencies because rpm does not
+- Hexdecode modalias strings in rpm dependencies because rpm does not
allow comma, blank and other special chars. (bnc #456695)
- revision 11927
@@ -125,9 +131,9 @@ Thu Dec 11 17:13:06 CET 2008 - ma(a)suse.de
-------------------------------------------------------------------
Wed Dec 10 16:09:08 CET 2008 - ma(a)suse.de
-- Remove obsolete zypp.conf::productsdir and deprecate
+- Remove obsolete zypp.conf::productsdir and deprecate
ZConfig::productsPath().
-- Monitor /etc/products.d to determine if @system.solv needs to be
+- Monitor /etc/products.d to determine if @system.solv needs to be
rebuilt. (bnc #457933)
- revision 11923
- version 5.24.7 (23)
@@ -172,7 +178,7 @@ Mon Dec 1 19:38:24 CET 2008 - ma(a)suse.de
-------------------------------------------------------------------
Fri Nov 28 16:33:56 CET 2008 - ma(a)suse.de
-- Prune soft locks to prevent installation but not update of
+- Prune soft locks to prevent installation but not update of
already installed packages.
- revision 11829
- version 5.24.4 (23)
@@ -182,12 +188,12 @@ Fri Nov 28 11:36:03 CET 2008 - schubi(a)suse.de
- Taking solutions which based on user requirements/conflict
"by User" solutions (bnc #442718)
-- revision 11825
+- revision 11825
-------------------------------------------------------------------
Fri Nov 28 00:05:17 CET 2008 - ma(a)suse.de
-- Take into account the requirements of all obsoleted packages uninstall
+- Take into account the requirements of all obsoleted packages uninstall
scripts when computing the installation order. (bnc #439802)
- revision 11823
- version 5.24.3 (23)
@@ -219,7 +225,7 @@ Mon Nov 24 17:47:35 CET 2008 - schubi(a)suse.de
- activate locking for doUpdate (bnc #447684)
- revision 11792
- RELEASE: 5.24.1 (23)
-
+
-------------------------------------------------------------------
Fri Nov 21 16:56:10 CET 2008 - dmacvicar(a)suse.de
@@ -250,7 +256,7 @@ Thu Nov 20 22:15:28 CET 2008 - ma(a)suse.de
Thu Nov 20 19:30:05 CET 2008 - ma(a)suse.de
- Enhance class LookupAttr and add convenience class LookupRepoAttr to
- iterate those solv file attributes which are not acssociated with a
+ iterate those solv file attributes which are not acssociated with a
solvable. E.g. product or deltarpm info.
- revision 11754
@@ -278,7 +284,7 @@ Tue Nov 18 18:37:30 CET 2008 - ma(a)suse.de
Thu Nov 13 11:07:56 CET 2008 - schubi(a)suse.de
- Taking care for ppc64 while distupgrade (bnc #443685)
-- revision 11670
+- revision 11670
-------------------------------------------------------------------
Wed Nov 12 18:53:03 CET 2008 - ma(a)suse.de
@@ -290,7 +296,7 @@ Wed Nov 12 18:53:03 CET 2008 - ma(a)suse.de
-------------------------------------------------------------------
Wed Nov 12 14:31:20 CET 2008 - ma(a)suse.de
-- Take care to always reset CURLOPT_TIMECONDITION to prevent incomplete
+- Take care to always reset CURLOPT_TIMECONDITION to prevent incomplete
downloads. (bnc #444109)
- revision 11656
- version 5.23.0 (23)
@@ -346,12 +352,12 @@ Thu Nov 6 18:35:25 CET 2008 - dmacvicar(a)suse.de
Thu Nov 6 16:23:03 CET 2008 - schubi(a)suse.de
- added flag: ignorealreadyrecommended to the testcases (bnc #432136)
-- revsion 11539
+- revsion 11539
-------------------------------------------------------------------
Thu Nov 6 09:41:48 CET 2008 - schubi(a)suse.de
-- Adding rule rpm-arch for installed rpm package in order to avoid
+- Adding rule rpm-arch for installed rpm package in order to avoid
unneeded architecture change. (bnc #441004)
- revision 11585
@@ -365,15 +371,15 @@ Tue Nov 4 13:21:35 CET 2008 - jkupec(a)suse.cz
-------------------------------------------------------------------
Mon Nov 3 15:30:53 CET 2008 - dmacvicar(a)suse.de
-- merge contributions by Jon Nelson, the patches resolve
+- merge contributions by Jon Nelson, the patches resolve
the following issues:
-- disable the "Pragma: nocache" header which is automatically
+- disable the "Pragma: nocache" header which is automatically
used by curl.
- re-enables the use of a caching http proxy (like squid or others)
+ re-enables the use of a caching http proxy (like squid or others)
and corrects (bnc #326208)
- don't generate an If-Modified-Since header if we don't have a
previous file to work with
-- don't generate a Proxy-Authenticate header if one is not called
+- don't generate a Proxy-Authenticate header if one is not called
for.
-------------------------------------------------------------------
@@ -395,7 +401,7 @@ Thu Oct 30 14:24:57 CET 2008 - schubi(a)suse.de
- solutions: keep/lock will be done by APPL_HIGH. So they will not be
saved in the lockfiles
- "keep obsolete" will be handled with lock by APPL_HIGH (bnc #439134)
-- revision 11549
+- revision 11549
-------------------------------------------------------------------
Wed Oct 29 14:14:16 CET 2008 - jkupec(a)suse.cz
@@ -426,12 +432,12 @@ Tue Oct 28 16:47:36 CET 2008 - ma(a)suse.de
Tue Oct 28 10:07:13 CET 2008 - schubi(a)suse.de
- regarding "keep obsolete" in the solutions (bnc #439134)
-- revision 11517
+- revision 11517
-------------------------------------------------------------------
Mon Oct 27 10:51:01 CET 2008 - dmacvicar(a)suse.de
-- fix broken aria2c command line (bnc#438971)
+- fix broken aria2c command line (bnc#438971)
-------------------------------------------------------------------
Sun Oct 26 14:53:56 CET 2008 - coolo(a)suse.de
@@ -441,7 +447,7 @@ Sun Oct 26 14:53:56 CET 2008 - coolo(a)suse.de
-------------------------------------------------------------------
Fri Oct 24 18:12:34 CEST 2008 - ma(a)suse.de
-- Remove error prone methods from OnMediaLocation API to prevent
+- Remove error prone methods from OnMediaLocation API to prevent
accidental missuse. (bnc #437328)
- revision 11487
- version 5.19.0 (19)
@@ -478,7 +484,7 @@ Wed Oct 22 14:16:33 CEST 2008 - dmacvicar(a)suse.de
Wed Oct 22 12:58:35 CEST 2008 - ma(a)suse.de
- Adapt to satsolver-0.12 API.
-- Add Locale:: bestMatch to find the best match within a set of
+- Add Locale:: bestMatch to find the best match within a set of
available Locales.
- revision 11441
@@ -566,7 +572,7 @@ Mon Oct 13 11:03:04 CEST 2008 - schubi(a)suse.de
- regarding orphaned resolvables
- removed old distupgrade algorithm
-- revision 11307
+- revision 11307
-------------------------------------------------------------------
Sun Oct 12 13:55:51 CEST 2008 - jkupec(a)suse.cz
@@ -585,7 +591,7 @@ Thu Oct 9 17:37:18 CEST 2008 - ma(a)suse.de
Thu Oct 9 17:18:18 CEST 2008 - schubi(a)suse.de
- Taking the right solution actions for locked resolvables (bnc #400840)
-- revision 11289
+- revision 11289
-------------------------------------------------------------------
Thu Oct 9 13:52:03 CEST 2008 - ma(a)suse.de
@@ -612,7 +618,7 @@ Wed Oct 8 15:39:08 CEST 2008 - jkupec(a)suse.cz
-------------------------------------------------------------------
Wed Oct 8 11:33:00 CEST 2008 - dmacvicar(a)suse.de
-- improve log message (bnc#429114)
+- improve log message (bnc#429114)
-------------------------------------------------------------------
Wed Oct 8 11:15:20 CEST 2008 - lslezak(a)suse.cz
@@ -624,14 +630,14 @@ Wed Oct 8 11:15:20 CEST 2008 - lslezak(a)suse.cz
Tue Oct 7 13:24:10 CEST 2008 - ma(a)suse.de
- Fixed detection of loopback mounted iso-files. The mtab entry does
- not necessarily mention the iso-file. (bnc #432504)
+ not necessarily mention the iso-file. (bnc #432504)
- revision 11252
- version 5.15.0 (13)
-------------------------------------------------------------------
Thu Oct 2 19:46:13 CEST 2008 - ma(a)suse.de
-- Add zypp.conf option 'download.use_deltarpmr.always' to enable using
+- Add zypp.conf option 'download.use_deltarpmr.always' to enable using
delta rpms even if the package is available on a local source.
(Axel C. Frinke)
- revision 11235
@@ -646,7 +652,7 @@ Thu Oct 2 18:50:11 CEST 2008 - ma(a)suse.de
-------------------------------------------------------------------
Thu Oct 2 17:18:19 CEST 2008 - ma(a)suse.de
-- Do not consider self provided requirements whan computing the
+- Do not consider self provided requirements whan computing the
installation order.
- revision 11231
@@ -696,7 +702,7 @@ Sat Sep 27 23:36:19 CEST 2008 - jkupec(a)suse.cz
Fri Sep 26 15:37:50 CEST 2008 - ma(a)suse.de
- Fix computation of Product::flavor.
-- Add Product::productLine. A vendor specific string denoting the
+- Add Product::productLine. A vendor specific string denoting the
product line.
- revision 11182
- version 5.13.0 (13)
@@ -755,7 +761,7 @@ Mon Sep 22 16:27:41 CEST 2008 - ma(a)suse.de
-------------------------------------------------------------------
Mon Sep 22 16:13:08 CEST 2008 - ma(a)suse.de
-- Add Url::hasCredentialsInAuthority test for username or password
+- Add Url::hasCredentialsInAuthority test for username or password
being encoded in the authority component. I.e. user:pass@host.
- Handle repos to be disabled disable in service refresh.
- revision 11126
@@ -811,7 +817,7 @@ Wed Sep 17 15:08:54 CEST 2008 - ma(a)suse.de
-------------------------------------------------------------------
Tue Sep 16 18:41:39 CEST 2008 - ma(a)suse.de
-- Service handling fixes. Added ServiceException.
+- Service handling fixes. Added ServiceException.
- revision 11077
-------------------------------------------------------------------
@@ -836,15 +842,15 @@ Fri Sep 12 18:24:28 CEST 2008 - ma(a)suse.de
-------------------------------------------------------------------
Fri Sep 12 16:04:54 CEST 2008 - ma(a)suse.de
-- Make registerTarget and registerRelease abvailable for installed
+- Make registerTarget and registerRelease abvailable for installed
product. Required for registration.
- revision 11043
-------------------------------------------------------------------
Fri Sep 12 12:59:50 CEST 2008 - ma(a)suse.de
-- Add url lists query to Product interface. A generic query and
- convenience methods to query urls for "releasenotes", "register",
+- Add url lists query to Product interface. A generic query and
+ convenience methods to query urls for "releasenotes", "register",
"updateurls", "extraurls", "optionalurls" and "smolt" (bnc #413444)
- revision 11029
@@ -861,7 +867,7 @@ Fri Sep 12 01:38:25 CEST 2008 - jkupec(a)suse.cz
-------------------------------------------------------------------
Thu Sep 11 16:01:57 CEST 2008 - dmacvicar(a)suse.de
-- add Repostiroy::updateKeys and
+- add Repostiroy::updateKeys and
Repository::providesUpdatesForKey(string) for repo and
product matching
- Provide Repository::isUpdateRepo
@@ -870,7 +876,7 @@ Thu Sep 11 16:01:57 CEST 2008 - dmacvicar(a)suse.de
Thu Sep 11 14:41:28 CEST 2008 - ma(a)suse.de
- Fix evaluation of vendor support flags.
-- Adapt retrieval of registration data (targetDistribution,
+- Adapt retrieval of registration data (targetDistribution,
targetDistributionRelease and targetDistributionFlavor).
- revision 11013
@@ -911,7 +917,7 @@ Tue Sep 9 17:33:03 CEST 2008 - dmacvicar(a)suse.de
-------------------------------------------------------------------
Tue Sep 9 13:04:11 CEST 2008 - ma(a)suse.de
-- Add ServiceInfo interface to define a set of catalogs (repository
+- Add ServiceInfo interface to define a set of catalogs (repository
aliases) to be enabled on next refresh.
- revision 10970
@@ -959,7 +965,7 @@ Tue Sep 2 11:04:52 CEST 2008 - schubi(a)suse.de
- Enabled distupgrade of the SAT solver. In order to use the old
distupgrade you can set the environment variable ZYPP_NO_SAT_UPDATE.
- This variable will can be used until the old distupgrade mechanism will
+ This variable will can be used until the old distupgrade mechanism will
be removed from libzypp. Have a look to above changelogs.
- revision 10911
- version 5.7.0 (5)
@@ -987,7 +993,7 @@ Mon Aug 18 17:31:02 CEST 2008 - dmacvicar(a)suse.de
-------------------------------------------------------------------
Fri Aug 15 20:20:07 CEST 2008 - ma(a)suse.de
-- Add Target::targetDistribution. Returns "distribution-arch" of
+- Add Target::targetDistribution. Returns "distribution-arch" of
the installed base product. Used for registration and Service
refresh. (for Fate #304915)
- revision 10877
@@ -996,7 +1002,7 @@ Fri Aug 15 20:20:07 CEST 2008 - ma(a)suse.de
-------------------------------------------------------------------
Fri Aug 15 17:42:58 CEST 2008 - ma(a)suse.de
-- Add method Product::replacedProducts to identify installed
+- Add method Product::replacedProducts to identify installed
Products that would be replaced by installing a new Product.
(for Fate #301997)
- revision 10876
@@ -1011,7 +1017,7 @@ Fri Aug 15 15:30:32 CEST 2008 - ma(a)suse.de
Fri Aug 15 14:23:02 CEST 2008 - ma(a)suse.de
- Add method ZYpp::getTarget that returns the Target or a NULL pointer,
- if it is not yet initialized. This is to avoid try/catch blocks just
+ if it is not yet initialized. This is to avoid try/catch blocks just
to test whether the Target is initialized. (bnc #417556)
- Add method Target::assertRootPrefix. Pass a pathname and get back the
path prefixed with the tragets root, unless it already had that prefix.
@@ -1021,7 +1027,7 @@ Fri Aug 15 14:23:02 CEST 2008 - ma(a)suse.de
Thu Aug 14 18:44:45 CEST 2008 - schubi(a)suse.de
- Regarding error messages for Products correctly (FATE #304502)
-- rev 10863
+- rev 10863
-------------------------------------------------------------------
Thu Aug 14 14:03:27 CEST 2008 - ma(a)suse.de
@@ -1034,9 +1040,9 @@ Thu Aug 14 14:03:27 CEST 2008 - ma(a)suse.de
Wed Aug 13 21:01:25 CEST 2008 - ma(a)suse.de
- Change Selectable API to support doing staus manipulation on
- non-USER level.
+ non-USER level.
- revision 10847
-- version 5.5.0 (5)
+- version 5.5.0 (5)
-------------------------------------------------------------------
Wed Aug 13 16:48:49 CEST 2008 - dmacvicar(a)suse.de
@@ -1068,13 +1074,13 @@ Tue Aug 12 12:05:49 CEST 2008 - ma(a)suse.de
Mon Aug 11 18:00:40 CEST 2008 - ma(a)suse.de
- Propagate default rpm install flags from zypp.conf via ZConfig and
- ZYppCommitPolicy down to the installer. (FATE #302952)
+ ZYppCommitPolicy down to the installer. (FATE #302952)
- revision 10813
-------------------------------------------------------------------
Mon Aug 11 16:28:07 CEST 2008 - ma(a)suse.de
-- Add base::Flags (like qt's QFlags) a type-safe way of storing
+- Add base::Flags (like qt's QFlags) a type-safe way of storing
OR-combinations of enum values.
- revision 10811
@@ -1082,7 +1088,7 @@ Mon Aug 11 16:28:07 CEST 2008 - ma(a)suse.de
Fri Aug 8 17:01:00 CEST 2008 - ma(a)suse.de
- Add static ui::Selectable::get methods as convenient ctor
- substitute.
+ substitute.
- revision 10806
-------------------------------------------------------------------
@@ -1101,8 +1107,8 @@ Fri Aug 8 14:11:03 CEST 2008 - ma(a)suse.de
Fri Aug 8 13:27:42 CEST 2008 - ma(a)suse.de
- Adapt to new product handling. Products are no longer pseudo
- installed objects verified by the solver, but actually installed.
- Thus removed satisfiedProduct iterator, fixed Selctables.
+ installed objects verified by the solver, but actually installed.
+ Thus removed satisfiedProduct iterator, fixed Selctables.
- Removed class ProductInfo as we keep Product.
- revision 10797
@@ -1114,7 +1120,7 @@ Thu Aug 7 22:00:55 CEST 2008 - dmacvicar(a)suse.de
-------------------------------------------------------------------
Wed Aug 6 18:21:30 CEST 2008 - ma(a)suse.de
-- Detect correct download path even if repository type
+- Detect correct download path even if repository type
is not set. (bnc #386386)
- revision 10768
@@ -1169,7 +1175,7 @@ Thu Jul 31 19:01:14 CEST 2008 - ma(a)suse.de
-------------------------------------------------------------------
Wed Jul 30 19:12:00 CEST 2008 - ma(a)suse.de
-- /var/lib/zypp and /var/cache/zypp should be owned by libzypp
+- /var/lib/zypp and /var/cache/zypp should be owned by libzypp
(bnc #412094)
- revision 10702
--
To unsubscribe, e-mail: zypp-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: zypp-commit+help(a)opensuse.org
1
0