diff options
author | Dan McGee <dan@archlinux.org> | 2009-06-06 11:03:29 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2009-06-08 20:02:17 -0500 |
commit | aa579b843899ccba093f83faa942599ce1110c24 (patch) | |
tree | fceb0e56adfb20ed3b7ebdb41fedb92bfe60d75a /lib/libalpm/alpm.h | |
parent | 19b8b638851713da64dd2aa7ff31e911ffe925cd (diff) | |
download | pacman-aa579b843899ccba093f83faa942599ce1110c24.tar.xz |
Give sensible feedback when a repo has no configured servers
This fixes FS#14899. When running an -Sp operation without servers
configured for a repository, we would segfault, so add an assert to the
backend method returning the first server preventing a null pointer
dereference.
In addition, add a new error code to libalpm that indicates we have no
servers configured for a repository. This makes -Sy and -S <package>
operations fail gracefully and helpfully when a repo is set up with no
servers, as the default mirrorlist in Arch is provided this way.
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/alpm.h')
-rw-r--r-- | lib/libalpm/alpm.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h index 5cf1e940..1b67f8a7 100644 --- a/lib/libalpm/alpm.h +++ b/lib/libalpm/alpm.h @@ -480,6 +480,7 @@ enum _pmerrno_t { PM_ERR_DB_REMOVE, /* Servers */ PM_ERR_SERVER_BAD_URL, + PM_ERR_SERVER_NONE, /* Transactions */ PM_ERR_TRANS_NOT_NULL, PM_ERR_TRANS_NULL, |