blob: 294ec214d53e5a9a3f4e01852425a8bfb560019e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
|
#include "config.h"
#ifdef HAVE_LIBCURL
#include <curl/curl.h>
#endif
#include "util.h"
#include "alpm.h"
#include "handle.h"
extern pmhandle_t *handle;
const char SYMEXPORT *alpm_strerrorlast(void)
{
return alpm_strerror(pm_errno);
}
const char SYMEXPORT *alpm_strerror(int err)
{
switch(err) {
case PM_ERR_MEMORY:
return _("out of memory!");
case PM_ERR_SYSTEM:
return _("unexpected system error");
case PM_ERR_BADPERMS:
return _("insufficient privileges");
case PM_ERR_NOT_A_FILE:
return _("could not find or read file");
case PM_ERR_NOT_A_DIR:
return _("could not find or read directory");
case PM_ERR_WRONG_ARGS:
return _("wrong or NULL argument passed");
case PM_ERR_DISK_SPACE:
return _("not enough free disk space");
case PM_ERR_HANDLE_NULL:
return _("library not initialized");
case PM_ERR_HANDLE_NOT_NULL:
return _("library already initialized");
case PM_ERR_HANDLE_LOCK:
return _("unable to lock database");
case PM_ERR_DB_OPEN:
return _("could not open database");
case PM_ERR_DB_CREATE:
return _("could not create database");
case PM_ERR_DB_NULL:
return _("database not initialized");
case PM_ERR_DB_NOT_NULL:
return _("database already registered");
case PM_ERR_DB_NOT_FOUND:
return _("could not find database");
case PM_ERR_DB_VERSION:
return _("database is incorrect version");
case PM_ERR_DB_WRITE:
return _("could not update database");
case PM_ERR_DB_REMOVE:
return _("could not remove database entry");
case PM_ERR_SERVER_BAD_URL:
return _("invalid url for server");
case PM_ERR_SERVER_NONE:
return _("no servers configured for repository");
case PM_ERR_TRANS_NOT_NULL:
return _("transaction already initialized");
case PM_ERR_TRANS_NULL:
return _("transaction not initialized");
case PM_ERR_TRANS_DUP_TARGET:
return _("duplicate target");
case PM_ERR_TRANS_NOT_INITIALIZED:
return _("transaction not initialized");
case PM_ERR_TRANS_NOT_PREPARED:
return _("transaction not prepared");
case PM_ERR_TRANS_ABORT:
return _("transaction aborted");
case PM_ERR_TRANS_TYPE:
return _("operation not compatible with the transaction type");
case PM_ERR_TRANS_NOT_LOCKED:
return _("transaction commit attempt when database is not locked");
case PM_ERR_PKG_NOT_FOUND:
return _("could not find or read package");
case PM_ERR_PKG_IGNORED:
return _("operation cancelled due to ignorepkg");
case PM_ERR_PKG_INVALID:
return _("invalid or corrupted package");
case PM_ERR_PKG_OPEN:
return _("cannot open package file");
case PM_ERR_PKG_CANT_REMOVE:
return _("cannot remove all files for package");
case PM_ERR_PKG_INVALID_NAME:
return _("package filename is not valid");
case PM_ERR_PKG_INVALID_ARCH:
return _("package architecture is not valid");
case PM_ERR_PKG_REPO_NOT_FOUND:
return _("could not find repository for target");
case PM_ERR_SIG_MISSINGDIR:
return _("signature directory not configured correctly");
case PM_ERR_SIG_INVALID:
return _("invalid PGP signature");
case PM_ERR_SIG_UNKNOWN:
return _("unknown PGP signature");
case PM_ERR_DLT_INVALID:
return _("invalid or corrupted delta");
case PM_ERR_DLT_PATCHFAILED:
return _("delta patch failed");
case PM_ERR_UNSATISFIED_DEPS:
return _("could not satisfy dependencies");
case PM_ERR_CONFLICTING_DEPS:
return _("conflicting dependencies");
case PM_ERR_FILE_CONFLICTS:
return _("conflicting files");
case PM_ERR_RETRIEVE:
return _("failed to retrieve some files");
case PM_ERR_WRITE:
return _("failed to copy some file");
case PM_ERR_INVALID_REGEX:
return _("invalid regular expression");
case PM_ERR_LIBARCHIVE:
return _("libarchive error");
case PM_ERR_LIBCURL:
#ifdef HAVE_LIBCURL
return curl_easy_strerror(handle->curlerr);
#else
return _("download library error");
#endif
case PM_ERR_GPGME:
return _("gpgme error");
case PM_ERR_EXTERNAL_DOWNLOAD:
return _("error invoking external downloader");
default:
return _("unexpected error");
}
}
|