-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupac.h
More file actions
75 lines (63 loc) · 1.95 KB
/
Copy pathupac.h
File metadata and controls
75 lines (63 loc) · 1.95 KB
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
#ifndef UPAC_H
#define UPAC_H
#include "config.h"
#include <stdio.h>
typedef struct {
char name[256];
char op[4];
char version[64];
} Dependency;
typedef struct {
char name[256];
char version[64];
int revision;
Dependency depends[16];
int dep_count;
char url[512];
char build_script[4096];
} Package;
typedef struct {
char name[256];
char version[64];
int revision;
char install_path[512];
} InstalledPackage;
#define MAX_TX_NODES 256
typedef struct {
char name[256];
char path[512];
int dep_indices[16];
int dep_count;
int visited;
int in_stack;
} TxNode;
int upac_install_repo(const char *pkg_path);
int upac_install_local(const char *pkg_name);
int upac_remove(const char *pkg_name);
int upac_search_repo(const char *query);
int upac_search_local(const char *query);
int upac_list(void);
int upac_update_db(void);
int upac_update(const char *pkg_name);
Package *upac_parse_build_file(const char *path);
void upac_free_package(Package *pkg);
Package *upac_load_repo_package(const char *pkg_path);
int upac_db_init(void);
int upac_db_add(const InstalledPackage *pkg);
int upac_db_remove(const char *name);
int upac_db_find(const char *name, InstalledPackage *result);
int upac_db_list_all(InstalledPackage **list, int *count);
int upac_db_save(void);
int upac_lock_db(void);
void upac_unlock_db(int fd);
int upac_fetch_source(Package *pkg, const char *dest_dir);
int upac_build_package(Package *pkg, const char *build_dir);
int upac_install_single_package(Package *pkg, const char *install_dir);
int upac_install_package(Package *pkg, const char *install_dir);
int mkdir_p(const char *path);
int upac_copy_tree(const char *src, const char *dst, FILE *file_list);
int compare_versions(const char *v1, const char *v2);
int version_satisfies(const char *installed, const char *required, const char *op);
const char *upac_find_file_owner(const char *filepath);
int is_valid_pkg_name(const char *name);
#endif