20 #ifndef __C_CREATEREPOLIB_MISC_H__
21 #define __C_CREATEREPOLIB_MISC_H__
29 #include <curl/curl.h>
30 #include "compression_wrapper.h"
31 #include "constants.h"
39 #define CR_UNUSED(x) (void)(x)
94 static inline int cr_is_primary(
const char *filename) {
95 if (!strncmp(filename,
"/etc/", 5))
97 if (!strcmp(filename,
"/usr/lib/sendmail"))
99 if (strstr(filename,
"bin/"))
146 #define CR_COPY_ERR 1
159 void cr_download(CURL *handle,
161 const char *destination,
231 GLogLevelFlags log_level,
232 const gchar *message,
243 GLogLevelFlags log_level,
244 const gchar *message,
257 struct cr_NVREA *cr_split_rpm_filename(
const char *filename);
258 void cr_nvrea_free(
struct cr_NVREA *);
266 #define cr_cmp_nvrea(A, B) (cr_cmp_evr((A)->epoch, (A)->version, (A)->release,\
267 (B)->epoch, (B)->version, (B)->release))
279 int cr_cmp_evr(
const char *e1,
const char *v1,
const char *r1,
280 const char *e2,
const char *v2,
const char *r2);