rojig-rename: Rename the "build" side files
Closes: #1279 Approved by: jlebon
This commit is contained in:
parent
6dcc8376a1
commit
df86d81ad7
@ -46,8 +46,8 @@ librpmostreepriv_la_SOURCES = \
|
||||
src/libpriv/rpmostree-rpm-util.h \
|
||||
src/libpriv/rpmostree-importer.c \
|
||||
src/libpriv/rpmostree-importer.h \
|
||||
src/libpriv/rpmostree-jigdo-build.c \
|
||||
src/libpriv/rpmostree-jigdo-build.h \
|
||||
src/libpriv/rpmostree-rojig-build.c \
|
||||
src/libpriv/rpmostree-rojig-build.h \
|
||||
src/libpriv/rpmostree-jigdo-assembler.c \
|
||||
src/libpriv/rpmostree-jigdo-assembler.h \
|
||||
src/libpriv/rpmostree-rojig-core.h \
|
||||
|
@ -39,7 +39,7 @@ rpm_ostree_SOURCES = src/app/main.c \
|
||||
src/app/rpmostree-builtin-status.c \
|
||||
src/app/rpmostree-builtin-ex.c \
|
||||
src/app/rpmostree-builtin-container.c \
|
||||
src/app/rpmostree-ex-builtin-commit2jigdo.c \
|
||||
src/app/rpmostree-ex-builtin-commit2rojig.c \
|
||||
src/app/rpmostree-ex-builtin-jigdo2commit.c \
|
||||
src/app/rpmostree-builtin-db.c \
|
||||
src/app/rpmostree-builtin-start-daemon.c \
|
||||
|
@ -39,7 +39,7 @@
|
||||
#include "rpmostree-bwrap.h"
|
||||
#include "rpmostree-core.h"
|
||||
#include "rpmostree-json-parsing.h"
|
||||
#include "rpmostree-jigdo-build.h"
|
||||
#include "rpmostree-rojig-build.h"
|
||||
#include "rpmostree-postprocess.h"
|
||||
#include "rpmostree-passwd-util.h"
|
||||
#include "rpmostree-libbuiltin.h"
|
||||
|
@ -33,7 +33,7 @@
|
||||
#include "rpmostree-util.h"
|
||||
#include "rpmostree-core.h"
|
||||
#include "rpmostree-rojig-core.h"
|
||||
#include "rpmostree-jigdo-build.h"
|
||||
#include "rpmostree-rojig-build.h"
|
||||
#include "rpmostree-postprocess.h"
|
||||
#include "rpmostree-passwd-util.h"
|
||||
#include "rpmostree-libbuiltin.h"
|
@ -26,7 +26,7 @@
|
||||
#include <gio/gunixoutputstream.h>
|
||||
#include "rpmostree-libarchive-input-stream.h"
|
||||
#include "rpmostree-unpacker-core.h"
|
||||
#include "rpmostree-jigdo-build.h"
|
||||
#include "rpmostree-rojig-build.h"
|
||||
#include "rpmostree-core.h"
|
||||
#include "rpmostree-rpm-util.h"
|
||||
#include <rpm/rpmlib.h>
|
||||
@ -67,10 +67,10 @@ typedef struct {
|
||||
guint n_duplicate_pkg_content_objs;
|
||||
guint n_unused_pkg_content_objs;
|
||||
GHashTable *objsize_to_object; /* Map<guint32 objsize,checksum> */
|
||||
} RpmOstreeCommit2JigdoContext;
|
||||
} RpmOstreeCommit2RojigContext;
|
||||
|
||||
static void
|
||||
rpm_ostree_commit2jigdo_context_free (RpmOstreeCommit2JigdoContext *ctx)
|
||||
rpm_ostree_commit2rojig_context_free (RpmOstreeCommit2RojigContext *ctx)
|
||||
{
|
||||
g_clear_object (&ctx->repo);
|
||||
g_clear_object (&ctx->pkgcache_repo);
|
||||
@ -80,7 +80,7 @@ rpm_ostree_commit2jigdo_context_free (RpmOstreeCommit2JigdoContext *ctx)
|
||||
g_clear_pointer (&ctx->objsize_to_object, (GDestroyNotify)g_hash_table_unref);
|
||||
g_free (ctx);
|
||||
}
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(RpmOstreeCommit2JigdoContext, rpm_ostree_commit2jigdo_context_free)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(RpmOstreeCommit2RojigContext, rpm_ostree_commit2rojig_context_free)
|
||||
|
||||
/* Add @objid to the set of objectids for @checksum */
|
||||
static void
|
||||
@ -120,7 +120,7 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC(PkgBuildObjidMap, pkg_build_objidmap_free)
|
||||
|
||||
/* Recursively walk @dir, building a map of object to Set<objid> */
|
||||
static gboolean
|
||||
build_objid_map_for_tree (RpmOstreeCommit2JigdoContext *self,
|
||||
build_objid_map_for_tree (RpmOstreeCommit2RojigContext *self,
|
||||
PkgBuildObjidMap *build,
|
||||
GHashTable *object_to_objid,
|
||||
GFile *dir,
|
||||
@ -158,7 +158,7 @@ build_objid_map_for_tree (RpmOstreeCommit2JigdoContext *self,
|
||||
g_autofree char *path = g_file_get_path (child);
|
||||
|
||||
/* Handling SELinux labeling for the tmpfiles.d would get very tricky.
|
||||
* Currently the jigdo unpack path is intentionally "dumb" - we won't
|
||||
* Currently the rojig unpack path is intentionally "dumb" - we won't
|
||||
* synthesize the tmpfiles.d like we do for layering. So punt these into
|
||||
* the new object set.
|
||||
*/
|
||||
@ -459,7 +459,7 @@ cmp_objidxattrs (gconstpointer ap,
|
||||
|
||||
/* Walk @pkg, building up a map of content object hash to "objid". */
|
||||
static gboolean
|
||||
build_objid_map_for_package (RpmOstreeCommit2JigdoContext *self,
|
||||
build_objid_map_for_package (RpmOstreeCommit2RojigContext *self,
|
||||
DnfPackage *pkg,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
@ -555,7 +555,7 @@ build_objid_map_for_package (RpmOstreeCommit2JigdoContext *self,
|
||||
* For now we scrape all the Provides: looking for a `Provides: %{name}(something)`.
|
||||
*/
|
||||
static char *
|
||||
pkg_get_requires_isa (RpmOstreeCommit2JigdoContext *self,
|
||||
pkg_get_requires_isa (RpmOstreeCommit2RojigContext *self,
|
||||
DnfPackage *pkg,
|
||||
GError **error)
|
||||
{
|
||||
@ -596,10 +596,10 @@ pkg_get_requires_isa (RpmOstreeCommit2JigdoContext *self,
|
||||
* inserted.
|
||||
*/
|
||||
static char *
|
||||
generate_spec (RpmOstreeCommit2JigdoContext *self,
|
||||
generate_spec (RpmOstreeCommit2RojigContext *self,
|
||||
const char *spec_path,
|
||||
const char *ostree_commit_sha256,
|
||||
GPtrArray *jigdo_packages,
|
||||
GPtrArray *rojig_packages,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
{
|
||||
@ -626,9 +626,9 @@ generate_spec (RpmOstreeCommit2JigdoContext *self,
|
||||
/* Add Requires: on our dependent packages; note this needs to be
|
||||
* arch-specific otherwise we may be tripped up by multiarch packages.
|
||||
*/
|
||||
for (guint i = 0; i < jigdo_packages->len; i++)
|
||||
for (guint i = 0; i < rojig_packages->len; i++)
|
||||
{
|
||||
DnfPackage *pkg = jigdo_packages->pdata[i];
|
||||
DnfPackage *pkg = rojig_packages->pdata[i];
|
||||
if (g_str_equal (dnf_package_get_arch (pkg), "noarch"))
|
||||
{
|
||||
g_string_append_printf (replacement, "Requires: %s = %s\n",
|
||||
@ -648,7 +648,7 @@ generate_spec (RpmOstreeCommit2JigdoContext *self,
|
||||
g_string_append (replacement, meta + strlen (RPMOSTREE_ROJIG_SPEC_META_MAGIC) + 1);
|
||||
g_string_append (replacement, "# End data generated by rpm-ostree\n");
|
||||
|
||||
g_autofree char *tmppath = g_strdup ("/tmp/rpmostree-jigdo-spec.XXXXXX");
|
||||
g_autofree char *tmppath = g_strdup ("/tmp/rpmostree-rojig-spec.XXXXXX");
|
||||
glnx_autofd int fd = g_mkstemp_full (tmppath, O_WRONLY | O_CLOEXEC, 0644);
|
||||
if (glnx_loop_write (fd, replacement->str, replacement->len) < 0)
|
||||
return glnx_null_throw_errno_prefix (error, "write");
|
||||
@ -666,7 +666,7 @@ compare_pkgs (gconstpointer ap,
|
||||
}
|
||||
|
||||
static gboolean
|
||||
write_commit2rojig (RpmOstreeCommit2JigdoContext *self,
|
||||
write_commit2rojig (RpmOstreeCommit2RojigContext *self,
|
||||
const char *commit,
|
||||
const char *oirpm_spec,
|
||||
const char *outputdir,
|
||||
@ -687,7 +687,7 @@ write_commit2rojig (RpmOstreeCommit2JigdoContext *self,
|
||||
return FALSE;
|
||||
|
||||
g_auto(GLnxTmpDir) oirpm_tmpd = { 0, };
|
||||
if (!glnx_mkdtemp ("rpmostree-jigdo-XXXXXX", 0700, &oirpm_tmpd, error))
|
||||
if (!glnx_mkdtemp ("rpmostree-rojig-XXXXXX", 0700, &oirpm_tmpd, error))
|
||||
return FALSE;
|
||||
|
||||
/* The commit object and metadata go first, so that the client can do GPG verification
|
||||
@ -887,7 +887,7 @@ write_commit2rojig (RpmOstreeCommit2JigdoContext *self,
|
||||
/* Generate empty entries for the "unused set" - the set of packages
|
||||
* that are part of the install, but carry no content objects actually
|
||||
* in the tree. ${foo}-filesystem packages are common examples. Since
|
||||
* v3 the "jigdo set" is the same as the "install set".
|
||||
* v3 the "rojig set" is the same as the "install set".
|
||||
*/
|
||||
for (guint i = 0; i < pkglist->len; i++)
|
||||
{
|
||||
@ -938,7 +938,7 @@ write_commit2rojig (RpmOstreeCommit2JigdoContext *self,
|
||||
* sufficient as a cache invalidation mechanism. Scenarios:
|
||||
*
|
||||
* - We change the content of a file: Since we do object based imports,
|
||||
* it will be a new object; it'd end up in jigdoRPM.
|
||||
* it will be a new object; it'd end up in rojigRPM.
|
||||
* - We start wanting an existing pkg object (e.g. docs): Counting works
|
||||
* - An object migrates (again add/remove): Counting works
|
||||
*
|
||||
@ -1064,7 +1064,7 @@ write_commit2rojig (RpmOstreeCommit2JigdoContext *self,
|
||||
* *exact* RPMs we require bit-for-bit.
|
||||
*/
|
||||
static gboolean
|
||||
impl_commit2rojig (RpmOstreeCommit2JigdoContext *self,
|
||||
impl_commit2rojig (RpmOstreeCommit2RojigContext *self,
|
||||
const char *rev,
|
||||
const char *oirpm_spec,
|
||||
const char *outputdir,
|
||||
@ -1285,7 +1285,7 @@ rpmostree_commit2rojig (OstreeRepo *repo,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
{
|
||||
g_autoptr(RpmOstreeCommit2JigdoContext) self = g_new0 (RpmOstreeCommit2JigdoContext, 1);
|
||||
g_autoptr(RpmOstreeCommit2RojigContext) self = g_new0 (RpmOstreeCommit2RojigContext, 1);
|
||||
|
||||
self->repo = g_object_ref (repo);
|
||||
self->pkgcache_repo = g_object_ref (pkgcache_repo);
|
Loading…
x
Reference in New Issue
Block a user