summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Norwood <rnorwood@redhat.com>2008-04-14 11:15:42 -0400
committerRichard Hughes <richard@hughsie.com>2008-04-15 18:15:23 +0100
commit65215321adf85f3f235000b57a3ea10bef175cbd (patch)
tree048f544f07a82aeb898c850eb8b6709b6ce57149
parent00271c772e1e2e94b2c114012d6da9b0109be7d9 (diff)
Add repo configuration error enum.
-rw-r--r--backends/yum/helpers/yumBackend.py2
-rw-r--r--docs/spec/pk-concepts.xml4
-rw-r--r--libpackagekit/pk-enum.c3
-rw-r--r--libpackagekit/pk-enum.h1
4 files changed, 9 insertions, 1 deletions
diff --git a/backends/yum/helpers/yumBackend.py b/backends/yum/helpers/yumBackend.py
index 03961b32d..b8e8ed792 100644
--- a/backends/yum/helpers/yumBackend.py
+++ b/backends/yum/helpers/yumBackend.py
@@ -815,6 +815,8 @@ class PackageKitYumBackend(PackageKitBaseBackend):
#we might have a rounding error
self.percentage(100)
+ except yum.Errors.RepoError, e:
+ self.error(ERROR_REPO_CONFIGURATION_ERROR, str(e))
except yum.Errors.YumBaseError, e:
self.error(ERROR_INTERNAL_ERROR,str(e))
diff --git a/docs/spec/pk-concepts.xml b/docs/spec/pk-concepts.xml
index 6ee73f73a..7703c929a 100644
--- a/docs/spec/pk-concepts.xml
+++ b/docs/spec/pk-concepts.xml
@@ -294,6 +294,10 @@
<entry>The repository name could not be found</entry>
</row>
<row>
+ <entry><literal>repo-configuration-error</literal></entry>
+ <entry>One of the enabled repositories has invalid configuration</entry>
+ </row>
+ <row>
<entry><literal>cannot-remove-system-package</literal></entry>
<entry>
Could not remove a protected system package that is needed for
diff --git a/libpackagekit/pk-enum.c b/libpackagekit/pk-enum.c
index ccee727d6..08a18bdac 100644
--- a/libpackagekit/pk-enum.c
+++ b/libpackagekit/pk-enum.c
@@ -132,7 +132,8 @@ static PkEnumMatch enum_error[] = {
{PK_ERROR_ENUM_CANNOT_WRITE_REPO_CONFIG, "cannot-write-repo-config"},
{PK_ERROR_LOCAL_INSTALL_FAILED, "local-install-failed"},
{PK_ERROR_BAD_GPG_SIGNATURE, "bad-gpg-signature"},
- {PK_ERROR_ENUM_CANNOT_INSTALL_SOURCE_PACKAGE, "cannot-install-source-package"},
+ {PK_ERROR_ENUM_CANNOT_INSTALL_SOURCE_PACKAGE, "cannot-install-source-package"},
+ {PK_ERROR_ENUM_REPO_CONFIGURATION_ERROR, "repo-configuration-error"},
{0, NULL}
};
diff --git a/libpackagekit/pk-enum.h b/libpackagekit/pk-enum.h
index 4e84da6a3..b8684a0cc 100644
--- a/libpackagekit/pk-enum.h
+++ b/libpackagekit/pk-enum.h
@@ -217,6 +217,7 @@ typedef enum {
PK_ERROR_LOCAL_INSTALL_FAILED,
PK_ERROR_BAD_GPG_SIGNATURE,
PK_ERROR_ENUM_CANNOT_INSTALL_SOURCE_PACKAGE,
+ PK_ERROR_ENUM_REPO_CONFIGURATION_ERROR,
PK_ERROR_ENUM_UNKNOWN
} PkErrorCodeEnum;