blob: 7eb6c6e5289340237a08f85b7d4a933c1bf3c0eb (
plain) (
blame)
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
|
#ifndef OMC_OMC_H
#define OMC_OMC_H
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <limits.h>
#include <unistd.h>
#include <time.h>
#include <sys/statvfs.h>
#define SYSERROR stderr, "%s:%s:%d: %s\n", path_basename(__FILE__), __FUNCTION__, __LINE__, strerror(errno)
#define OMC_BUFSIZ 8192
#define OMC_NAME_MAX 255
#define OMC_DIRSTACK_MAX 1024
#define OMC_TIME_STR_MAX 128
#define HTTP_ERROR(X) X >= 400
#include "config.h"
#include "template.h"
#include "utils.h"
#include "copy.h"
#include "ini.h"
#include "conda.h"
#include "environment.h"
#include "artifactory.h"
#include "deliverable.h"
#include "str.h"
#include "strlist.h"
#include "system.h"
#include "download.h"
#include "recipe.h"
#include "relocation.h"
#define guard_runtime_free(X) if (X) { runtime_free(X); X = NULL; }
#define guard_strlist_free(X) if (X) { strlist_free(X); X = NULL; }
#define guard_free(X) if (X) { free(X); X = NULL; }
#define COE_CHECK_ABORT(COND, MSG) {\
if (COND) { \
msg(OMC_MSG_ERROR, MSG ": Aborting execution (--continue-on-error/-C is not enabled)\n"); \
exit(1); \
} \
}
struct OMC_GLOBAL {
bool verbose;
bool always_update_base_environment;
bool continue_on_error;
bool conda_fresh_start;
struct StrList *conda_packages;
struct StrList *pip_packages;
char *tmpdir;
char *conda_install_prefix;
char *sysconfdir;
struct Jfrog {
char *jfrog_artifactory_base_url;
char *jfrog_artifactory_product;
char *cli_major_ver;
char *version;
char *os;
char *arch;
char *remote_filename;
char *repo;
} jfrog;
};
/**
* Free memory allocated in global configuration structure
*/
void globals_free();
#endif //OMC_OMC_H
|