4 * Copyright (c) 2006-2011 Pacman Development Team <pacman-dev@archlinux.org>
5 * Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
24 #include <curl/curl.h>
32 alpm_errno_t SYMEXPORT
alpm_errno(alpm_handle_t
*handle
)
34 return handle
->pm_errno
;
37 const char SYMEXPORT
*alpm_strerror(alpm_errno_t err
)
42 return _("out of memory!");
44 return _("unexpected system error");
45 case ALPM_ERR_BADPERMS
:
46 return _("insufficient privileges");
47 case ALPM_ERR_NOT_A_FILE
:
48 return _("could not find or read file");
49 case ALPM_ERR_NOT_A_DIR
:
50 return _("could not find or read directory");
51 case ALPM_ERR_WRONG_ARGS
:
52 return _("wrong or NULL argument passed");
53 case ALPM_ERR_DISK_SPACE
:
54 return _("not enough free disk space");
56 case ALPM_ERR_HANDLE_NULL
:
57 return _("library not initialized");
58 case ALPM_ERR_HANDLE_NOT_NULL
:
59 return _("library already initialized");
60 case ALPM_ERR_HANDLE_LOCK
:
61 return _("unable to lock database");
63 case ALPM_ERR_DB_OPEN
:
64 return _("could not open database");
65 case ALPM_ERR_DB_CREATE
:
66 return _("could not create database");
67 case ALPM_ERR_DB_NULL
:
68 return _("database not initialized");
69 case ALPM_ERR_DB_NOT_NULL
:
70 return _("database already registered");
71 case ALPM_ERR_DB_NOT_FOUND
:
72 return _("could not find database");
73 case ALPM_ERR_DB_INVALID
:
74 return _("invalid or corrupted database");
75 case ALPM_ERR_DB_INVALID_SIG
:
76 return _("invalid or corrupted database (PGP signature)");
77 case ALPM_ERR_DB_VERSION
:
78 return _("database is incorrect version");
79 case ALPM_ERR_DB_WRITE
:
80 return _("could not update database");
81 case ALPM_ERR_DB_REMOVE
:
82 return _("could not remove database entry");
84 case ALPM_ERR_SERVER_BAD_URL
:
85 return _("invalid url for server");
86 case ALPM_ERR_SERVER_NONE
:
87 return _("no servers configured for repository");
89 case ALPM_ERR_TRANS_NOT_NULL
:
90 return _("transaction already initialized");
91 case ALPM_ERR_TRANS_NULL
:
92 return _("transaction not initialized");
93 case ALPM_ERR_TRANS_DUP_TARGET
:
94 return _("duplicate target");
95 case ALPM_ERR_TRANS_NOT_INITIALIZED
:
96 return _("transaction not initialized");
97 case ALPM_ERR_TRANS_NOT_PREPARED
:
98 return _("transaction not prepared");
99 case ALPM_ERR_TRANS_ABORT
:
100 return _("transaction aborted");
101 case ALPM_ERR_TRANS_TYPE
:
102 return _("operation not compatible with the transaction type");
103 case ALPM_ERR_TRANS_NOT_LOCKED
:
104 return _("transaction commit attempt when database is not locked");
106 case ALPM_ERR_PKG_NOT_FOUND
:
107 return _("could not find or read package");
108 case ALPM_ERR_PKG_IGNORED
:
109 return _("operation cancelled due to ignorepkg");
110 case ALPM_ERR_PKG_INVALID
:
111 return _("invalid or corrupted package");
112 case ALPM_ERR_PKG_INVALID_CHECKSUM
:
113 return _("invalid or corrupted package (checksum)");
114 case ALPM_ERR_PKG_INVALID_SIG
:
115 return _("invalid or corrupted package (PGP signature)");
116 case ALPM_ERR_PKG_OPEN
:
117 return _("cannot open package file");
118 case ALPM_ERR_PKG_CANT_REMOVE
:
119 return _("cannot remove all files for package");
120 case ALPM_ERR_PKG_INVALID_NAME
:
121 return _("package filename is not valid");
122 case ALPM_ERR_PKG_INVALID_ARCH
:
123 return _("package architecture is not valid");
124 case ALPM_ERR_PKG_REPO_NOT_FOUND
:
125 return _("could not find repository for target");
127 case ALPM_ERR_SIG_MISSING
:
128 return _("missing PGP signature");
129 case ALPM_ERR_SIG_INVALID
:
130 return _("invalid PGP signature");
132 case ALPM_ERR_DLT_INVALID
:
133 return _("invalid or corrupted delta");
134 case ALPM_ERR_DLT_PATCHFAILED
:
135 return _("delta patch failed");
137 case ALPM_ERR_UNSATISFIED_DEPS
:
138 return _("could not satisfy dependencies");
139 case ALPM_ERR_CONFLICTING_DEPS
:
140 return _("conflicting dependencies");
141 case ALPM_ERR_FILE_CONFLICTS
:
142 return _("conflicting files");
144 case ALPM_ERR_RETRIEVE
:
145 return _("failed to retrieve some files");
146 case ALPM_ERR_INVALID_REGEX
:
147 return _("invalid regular expression");
148 /* Errors from external libraries- our own wrapper error */
149 case ALPM_ERR_LIBARCHIVE
:
150 /* it would be nice to use archive_error_string() here, but that
151 * requires the archive struct, so we can't. Just use a generic
152 * error string instead. */
153 return _("libarchive error");
154 case ALPM_ERR_LIBCURL
:
155 return _("download library error");
157 return _("gpgme error");
158 case ALPM_ERR_EXTERNAL_DOWNLOAD
:
159 return _("error invoking external downloader");
162 return _("unexpected error");
166 /* vim: set ts=2 sw=2 noet: */