app/compose: Check conflicting opts earlier
No reason to do this sanity check so late. Let's bring it up to near the top of `impl_install_tree()` so we avoid useless work if possible. Closes: #1658 Approved by: cgwalters
This commit is contained in:
parent
46edef0017
commit
37932cf19a
@ -224,11 +224,6 @@ install_packages (RpmOstreeTreeComposeContext *self,
|
||||
rpmostree_context_set_dnf_caching (self->corectx,
|
||||
opt_cache_only ? RPMOSTREE_CONTEXT_DNF_CACHE_FOREVER :
|
||||
RPMOSTREE_CONTEXT_DNF_CACHE_NEVER);
|
||||
/* Without specifying --cachedir we'd just toss the data we download, so let's
|
||||
* catch that.
|
||||
*/
|
||||
if (opt_download_only && !opt_unified_core && !opt_cachedir)
|
||||
return glnx_throw (error, "--download-only can only be used with --cachedir");
|
||||
|
||||
{ g_autofree char *tmprootfs_abspath = glnx_fdrel_abspath (rootfs_dfd, ".");
|
||||
if (!rpmostree_context_setup (self->corectx, tmprootfs_abspath, NULL, self->treespec,
|
||||
@ -595,6 +590,12 @@ impl_install_tree (RpmOstreeTreeComposeContext *self,
|
||||
/* Print version number */
|
||||
g_printerr ("RPM-OSTree Version: %s\n", PACKAGE_VERSION);
|
||||
|
||||
/* Without specifying --cachedir we'd just toss the data we download, so let's
|
||||
* catch that.
|
||||
*/
|
||||
if (opt_download_only && !opt_unified_core && !opt_cachedir)
|
||||
return glnx_throw (error, "--download-only can only be used with --cachedir");
|
||||
|
||||
if (getuid () != 0)
|
||||
{
|
||||
if (!opt_unified_core)
|
||||
|
Loading…
Reference in New Issue
Block a user