From: Christoph Heiss <c.heiss@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH installer] run env: always re-create run env file in test mode
Date: Wed, 18 Oct 2023 10:17:19 +0200 [thread overview]
Message-ID: <20231018081752.214251-1-c.heiss@proxmox.com> (raw)
When debugging or otherwise deliberately running the `dump-env`
low-level installer command in test mode, chances are that you'd want
the run env file to be re-created as well.
No impact on the normal installation flow.
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
---
Noticed over time that I have to run
`rm [..]/run/proxmox-installer/run-env-info.json` way to often. Also,
the fact that this file is cached is probably not that obvious to anyone
who doesn't know the installer by heart.
Proxmox/Install/RunEnv.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Proxmox/Install/RunEnv.pm b/Proxmox/Install/RunEnv.pm
index 9878f55..19b5387 100644
--- a/Proxmox/Install/RunEnv.pm
+++ b/Proxmox/Install/RunEnv.pm
@@ -241,7 +241,7 @@ my sub detect_country_tracing_to : prototype($$) {
sub query_installation_environment : prototype() {
# check first if somebody already cached this for us and re-use that
my $run_env_file = Proxmox::Install::ISOEnv::get('run-env-cache-file');
- if (-f "$run_env_file") {
+ if (-f "$run_env_file" && !Proxmox::Install::ISOEnv::is_test_mode()) {
log_info("re-using cached runtime env from $run_env_file");
my $cached_env = eval {
my $run_env_raw = Proxmox::Sys::File::file_read_all($run_env_file);
--
2.42.0
next reply other threads:[~2023-10-18 8:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-18 8:17 Christoph Heiss [this message]
2024-11-11 22:19 ` [pve-devel] applied: " Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231018081752.214251-1-c.heiss@proxmox.com \
--to=c.heiss@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox