createrepo_c library  0.17.7
C library for metadata manipulation
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
25 extern "C" {
26 #endif
27 
28 #include "compression_wrapper.h"
29 
30 #define DEFAULT_DB_COMPRESSION_TYPE CR_CW_BZ2_COMPRESSION
31 #define DEFAULT_GROUPFILE_COMPRESSION_TYPE CR_CW_GZ_COMPRESSION
32 
33 typedef 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 
43 struct 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 verbose;
55  char *outputdir;
56  char *outputrepo;
57  gboolean nogroups;
58  gboolean noupdateinfo;
59  char *compress_type;
60  gboolean zck_compression;
61  char *zck_dict_dir;
62  char *merge_method_str;
63  gboolean all;
64  char *noarch_repo_url;
65  gboolean unique_md_filenames;
66  gboolean simple_md_filenames;
67  gboolean omit_baseurl;
68 
69  // Koji mergerepos specific options
70  gboolean koji;
71  gboolean koji_simple;
72  gboolean pkgorigins;
73  gboolean arch_expand;
74  char *groupfile;
75  char *blocked;
76 
77  // Items filled by check_arguments()
78 
79  char *out_dir;
80  char *out_repo;
81  char *tmp_out_repo;
82  GSList *repo_list;
83  GSList *arch_list;
84  cr_CompressionType db_compression_type;
85  cr_CompressionType groupfile_compression_type;
86  MergeMethod merge_method;
87 };
88 
89 #ifdef __cplusplus
90 }
91 #endif
92 
93 #endif /* __C_CREATEREPOLIB_MERGEREPO_C_H__ */
cr_CompressionType