summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Norwood <rnorwood@redhat.com>2008-04-15 16:57:40 -0400
committerRichard Hughes <richard@hughsie.com>2008-04-15 23:14:08 +0100
commit52640b0b9a7bfb321856358e71d301bcc3f16f4d (patch)
tree17f9be6e3726808cdcaeb0fe5390c0f7675b8932
parentcf81c3b2669f8509a5edf560151def604945d999 (diff)
Change from network error to repo error when we cannot connect to a repository.
-rw-r--r--backends/yum/helpers/yumBackend.py2
-rw-r--r--docs/spec/pk-concepts.xml7
-rw-r--r--libpackagekit/pk-enum.c1
-rw-r--r--libpackagekit/pk-enum.h1
4 files changed, 10 insertions, 1 deletions
diff --git a/backends/yum/helpers/yumBackend.py b/backends/yum/helpers/yumBackend.py
index 750430d5d..0e1534ab8 100644
--- a/backends/yum/helpers/yumBackend.py
+++ b/backends/yum/helpers/yumBackend.py
@@ -1388,7 +1388,7 @@ class PackageKitYumBackend(PackageKitBaseBackend):
'''
if issubclass(tb, (yum.Errors.RepoError, IOError)):
# Unhandled Repo error, can be network problems
- self.error(ERROR_NO_NETWORK,"Problem with loading repository metadata, this can be caused by network problems or repository misconfigurations")
+ self.error(ERROR_REPO_NOT_AVAILABLE, "Problem connecting to repository, this can be caused by network problems or a misconfigured repository")
return True
else: # Do the default stuff
return False
diff --git a/docs/spec/pk-concepts.xml b/docs/spec/pk-concepts.xml
index 7703c929a..11c687b06 100644
--- a/docs/spec/pk-concepts.xml
+++ b/docs/spec/pk-concepts.xml
@@ -297,6 +297,13 @@
<entry><literal>repo-configuration-error</literal></entry>
<entry>One of the enabled repositories has invalid configuration</entry>
</row>
+ <row>
+ <entry><literal>repo-not-available</literal></entry>
+ <entry>
+ There was a (possibly transient) problem connecting to a
+ repository
+ </entry>
+ </row>
<row>
<entry><literal>cannot-remove-system-package</literal></entry>
<entry>
diff --git a/libpackagekit/pk-enum.c b/libpackagekit/pk-enum.c
index 124df4d7f..e770d8dbc 100644
--- a/libpackagekit/pk-enum.c
+++ b/libpackagekit/pk-enum.c
@@ -136,6 +136,7 @@ static PkEnumMatch enum_error[] = {
{PK_ERROR_ENUM_REPO_CONFIGURATION_ERROR, "repo-configuration-error"},
{PK_ERROR_ENUM_NO_LICENSE_AGREEMENT, "no-license-agreement"},
{PK_ERROR_ENUM_FILE_CONFLICTS, "file-conflicts"},
+ {PK_ERROR_ENUM_REPO_NOT_AVAILABLE, "repo-not-available"},
{0, NULL}
};
diff --git a/libpackagekit/pk-enum.h b/libpackagekit/pk-enum.h
index 3440dd502..7773f1488 100644
--- a/libpackagekit/pk-enum.h
+++ b/libpackagekit/pk-enum.h
@@ -220,6 +220,7 @@ typedef enum {
PK_ERROR_ENUM_REPO_CONFIGURATION_ERROR,
PK_ERROR_ENUM_NO_LICENSE_AGREEMENT,
PK_ERROR_ENUM_FILE_CONFLICTS,
+ PK_ERROR_ENUM_REPO_NOT_AVAILABLE,
PK_ERROR_ENUM_UNKNOWN
} PkErrorCodeEnum;