blob: c2b154143d060bea501f3d54382d3f06ded903c2 (
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
|
#include "alpm.h"
char *alpm_strerror(int err)
{
switch(err) {
case PM_ERR_NOT_A_FILE:
return "could not find or read file";
case PM_ERR_HANDLE_NULL:
return "library not initialized";
case PM_ERR_HANDLE_NOT_NULL:
return "library already initialized";
case PM_ERR_WRONG_ARGS:
return "wrong or NULL argument";
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_OPT_LOGFILE:
case PM_ERR_OPT_DBPATH:
case PM_ERR_OPT_SYNCDB:
case PM_ERR_OPT_USESYSLOG:
return "could not set parameter";
case PM_ERR_TRANS_NULL:
return "transaction not initialized";
case PM_ERR_TRANS_NOT_NULL:
return "transaction already initialized";
case PM_ERR_TRANS_DUP_TARGET:
return "duplicated target";
case PM_ERR_TRANS_INITIALIZED:
return "transaction already initialized";
case PM_ERR_TRANS_NOT_INITIALIZED:
return "transaction not initialized";
case PM_ERR_PKG_NOT_FOUND:
return "could not find or read package";
case PM_ERR_PKG_INVALID:
return "invalid or corrupted package";
case PM_ERR_PKG_INSTALLED:
return "package already installed";
case PM_ERR_PKG_CANT_FRESH:
return "package not installed or lesser version";
case PM_ERR_PKG_INVALID_NAME:
return "package name is not valid";
case PM_ERR_UNSATISFIED_DEPS:
return "could not satisfy dependencies";
case PM_ERR_CONFLICTING_DEPS:
return "conflicting dependencies";
case PM_ERR_UNRESOLVABLE_DEPS:
return "could not resolve dependencies";
case PM_ERR_FILE_CONFLICTS:
return "conflicting files";
default:
return "unexpected error";
}
}
|