Skip to content

Commit 56f63af

Browse files
committed
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 coreos#1793
1 parent d160ed1 commit 56f63af

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 not thing 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
@@ -343,6 +343,17 @@ install_packages (RpmOstreeTreeComposeContext *self,
343343

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

347358
if (!rpmostree_context_prepare (self->corectx, cancellable, error))
348359
return FALSE;

0 commit comments

Comments
 (0)