createrepo_c library 1.0.0
C library for metadata manipulation
Loading...
Searching...
No Matches
mergerepo_c.h
1/*
2 * Copyright (C) 2018 Red Hat, Inc.
3 *
4 * Licensed under the GNU Lesser General Public License Version 2.1
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20
21#ifndef __C_CREATEREPOLIB_MERGEREPO_C_H__
22#define __C_CREATEREPOLIB_MERGEREPO_C_H__
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
28#include "compression_wrapper.h"
29
30#define DEFAULT_DB_COMPRESSION_TYPE CR_CW_BZ2_COMPRESSION
31#define DEFAULT_COMPRESSION_TYPE CR_CW_ZSTD_COMPRESSION
32
33typedef enum {
34 MM_DEFAULT,
35 // NA == Name, Arch
36 MM_FIRST_FROM_IDENTICAL_NA = MM_DEFAULT,
37 MM_NEWEST_FROM_IDENTICAL_NA,
38 MM_WITH_HIGHEST_NEVRA,
39 MM_FIRST_FROM_IDENTICAL_NEVRA,
40 MM_ALL_WITH_IDENTICAL_NEVRA
41} MergeMethod;
42
43struct CmdOptions {
44
45 // Items filled by cmd option parser
46
47 gboolean version;
48 char **repos;
49 char *repo_prefix_search;
50 char *repo_prefix_replace;
51 char *archlist;
52 gboolean database;
53 gboolean no_database;
54 gboolean filelists_ext;
55 gboolean verbose;
56 char *outputdir;
57 char *outputrepo;
58 gboolean nogroups;
59 gboolean noupdateinfo;
60 char *compress_type;
61 gboolean zck_compression;
62 char *zck_dict_dir;
63 char *merge_method_str;
64 gboolean all;
65 char *noarch_repo_url;
66 gboolean unique_md_filenames;
67 gboolean simple_md_filenames;
68 gboolean omit_baseurl;
69
70 // Koji mergerepos specific options
71 gboolean koji;
72 gboolean koji_simple;
73 gboolean pkgorigins;
74 gboolean arch_expand;
75 char *groupfile;
76 char *blocked;
77
78 // Items filled by check_arguments()
79
80 char *out_dir;
81 char *out_repo;
82 char *tmp_out_repo;
83 GSList *repo_list;
84 GSList *arch_list;
85 cr_CompressionType db_compression_type;
86 cr_CompressionType compression_type;
87 MergeMethod merge_method;
88};
89
90#ifdef __cplusplus
91}
92#endif
93
94#endif /* __C_CREATEREPOLIB_MERGEREPO_C_H__ */
cr_CompressionType