"Which compression type to use.", "<compress_type>" },
{ "keep-all-metadata", 0, 0, G_OPTION_ARG_NONE, &(_cmd_options.keep_all_metadata),
"Keep groupfile and updateinfo from source repo during update.", NULL },
+ { "compatibility", 0, 0, G_OPTION_ARG_NONE, &(_cmd_options.compatibility),
+ "Enforce maximal compatibility with classical createrepo.", NULL },
{ NULL, 0, 0, G_OPTION_ARG_NONE, NULL, NULL, NULL },
};
create the new one (empty) to serve as
a lock and use a .repodata.date.pid for
data generation. */
+ gboolean compatibility; /*!< Enforce maximal compatibility with
+ createrepo. I.e. mimics some dump
+ behavior like perseve old comps file(s)
+ during update etc.*/
/* Items filled by check_arguments() */
ret = cr_old_metadata_retention(out_repo,
tmp_out_repo,
cmd_options->retain_old,
+ cmd_options->compatibility,
&tmp_err);
if (!ret) {
g_critical("%s", tmp_err->message);
cr_old_metadata_retention(const char *old_repo,
const char *new_repo,
int retain_old,
+ int compatibility,
GError **err)
{
gboolean ret = TRUE;
GDir *dirp = NULL;
const gchar *filename;
GError *tmp_err = NULL;
- int compatibility_mode = 1;
assert(!err || *err == NULL);
g_debug("Copying files from old repository to the new one");
// Get list of file that should be skiped during copying
- if (compatibility_mode)
+ if (compatibility)
ret = cr_repodata_blacklist_classic(old_repo, retain_old, &blacklist, err);
else
ret = cr_repodata_blacklist(old_repo, retain_old, &blacklist, err);
cr_old_metadata_retention(const char *old_repo,
const char *new_repo,
int retain_old,
+ int compatibility,
GError **err);
/** Remove files related to repodata from the specified path.