Skip to content

Commit 70462a9

Browse files
cgwaltersjlebon
authored andcommitted
compose: Add a "warn and sleep" if --unified-core is not provided
Start adding some pain if `--unified-core` isn't provided to help flush out anyone relying on it. (And I think today pungi is not passing it, so e.g. Fedora IoT/Silverblue are impacted) Prep for merging #1793 Co-authored-by: Jonathan Lebon <[email protected]>
1 parent 4311f6e commit 70462a9

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

docs/manual/compose-server.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
## Using higher level build tooling
2+
3+
Originally `rpm-ostree compose tree` was intended to be a "high level" tool,
4+
but that didn't work out very well in practice. Today, you should consider
5+
it as a low level tool. For example, most people that want to generate
6+
OSTree commits *also* want to generate bootable disk images, and rpm-ostree
7+
has nothing to do with that.
8+
9+
One example higher level tool that takes care of both OSTree commit generation
10+
and bootable disk images is [coreos-assembler](https://github.com/coreos/coreos-assembler).
11+
112
## Background on managing an OSTree repository
213

314
Before you get started, it's recommended to read (at least) these two sections
@@ -59,7 +70,7 @@ If you're doing this multiple times, it's strongly recommended to create a cache
5970
directory:
6071

6172
```
62-
# rpm-ostree compose tree --cachedir=cache --repo=/srv/centos-atomic/build-repo sig-atomic-buildscripts/centos-atomic-host.json
73+
# rpm-ostree compose tree --unified-core --cachedir=cache --repo=/srv/centos-atomic/build-repo sig-atomic-buildscripts/centos-atomic-host.json
6374
```
6475

6576
This will download RPMs from the referenced repos, and commit the result to the

src/app/rpmostree-compose-builtin-tree.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,17 @@ install_packages (RpmOstreeTreeComposeContext *self,
341341

342342
rpmostree_context_set_repos (self->corectx, self->build_repo, self->pkgcache_repo);
343343
}
344+
else
345+
{
346+
/* Secret environment variable for those desperate */
347+
if (!g_getenv ("RPM_OSTREE_I_KNOW_NON_UNIFIED_CORE_IS_DEPRECATED"))
348+
{
349+
g_printerr ("\nNOTICE: Running rpm-ostree compose tree without --unified-core is deprecated.\n"
350+
" Please add --unified-core to the command line and ensure your content\n"
351+
" works with it. For more information, see https://github.com/coreos/rpm-ostree/issues/729\n\n");
352+
g_usleep (G_USEC_PER_SEC * 5);
353+
}
354+
}
344355

345356
if (!rpmostree_context_prepare (self->corectx, cancellable, error))
346357
return FALSE;

0 commit comments

Comments
 (0)