opkg: consolidate error enums and add an error for when no package matches
[project/opkg-lede.git] / libopkg / opkg_error.h
1 /* opkg_error.h - the opkg package management system
2
3 Copyright (C) 2008 OpenMoko Inc
4
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License as
7 published by the Free Software Foundation; either version 2, or (at
8 your option) any later version.
9
10 This program is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details.
14 */
15
16 #ifndef OPKG_ERROR_H
17 #define OPKG_ERROR_H
18
19 enum opkg_error {
20 OPKG_ERR_UNKNOWN = -1,
21 OPKG_ERR_NONE = 0,
22
23 OPKG_PKG_DEPS_UNSATISFIED,
24 OPKG_PKG_IS_ESSENTIAL,
25 OPKG_PKG_HAS_DEPENDENTS,
26 OPKG_PKG_HAS_NO_CANDIDATE,
27 OPKG_PKG_HAS_NO_AVAILABLE_ARCH,
28
29 OPKG_INSTALL_ERR_NOT_TRUSTED,
30 OPKG_INSTALL_ERR_DOWNLOAD,
31 OPKG_INSTALL_ERR_CONFLICTS,
32 OPKG_INSTALL_ERR_ALREADY_INSTALLED,
33 OPKG_INSTALL_ERR_DEPENDENCIES,
34 OPKG_INSTALL_ERR_NO_DOWNGRADE,
35 OPKG_INSTALL_ERR_NO_SPACE,
36 OPKG_INSTALL_ERR_SIGNATURE,
37 OPKG_INSTALL_ERR_MD5,
38 OPKG_INSTALL_ERR_INTERNAL,
39
40 };
41 typedef enum opkg_error opkg_error_t;
42
43
44 struct errlist {
45 char * errmsg;
46 struct errlist * next;
47 } ;
48
49 struct errlist* error_list;
50
51 #endif /* OPKG_ERROR_H */