all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Stoiko Ivanov <s.ivanov@proxmox.com>
To: pmg-devel@lists.proxmox.com
Subject: [pmg-devel] [PATCH pmg-api 2/4] pmg7to8: notify about unmodified templates
Date: Fri,  7 Jul 2023 18:54:26 +0200	[thread overview]
Message-ID: <20230707165428.94777-3-s.ivanov@proxmox.com> (raw)
In-Reply-To: <20230707165428.94777-1-s.ivanov@proxmox.com>

I considered making this a warning, but since unmodified files get
updated to the new versions in /var/lib/pmg/templates by ucf a notice
seems more appropriate.

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
---
 src/PMG/CLI/pmg7to8.pm | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/PMG/CLI/pmg7to8.pm b/src/PMG/CLI/pmg7to8.pm
index ea29056..1cb4e7f 100644
--- a/src/PMG/CLI/pmg7to8.pm
+++ b/src/PMG/CLI/pmg7to8.pm
@@ -552,6 +552,12 @@ sub check_misc {
 
     check_apt_repos();
     check_bootloader();
+
+    if (my $unmodified_templates = PMG::Utils::find_unmodified_templates()) {
+	my $msg = "Found templates in /etc/pmg/templates, without modification. Consider simply removing them: \n    ";
+	$msg .= join("\n    ", $unmodified_templates->@*);
+	log_notice($msg);
+    }
 }
 
 my sub colored_if {
-- 
2.39.2





  parent reply	other threads:[~2023-07-07 16:54 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-07 16:54 [pmg-devel] [PATCH pmg-api 0/4] add notification about unmodified template-overrides Stoiko Ivanov
2023-07-07 16:54 ` [pmg-devel] [PATCH pmg-api 1/4] utils: add helper for unmodified templates Stoiko Ivanov
2023-07-10 10:02   ` Thomas Lamprecht
2023-07-07 16:54 ` Stoiko Ivanov [this message]
2023-07-11 15:20   ` [pmg-devel] applied: [PATCH pmg-api 2/4] pmg7to8: notify about " Thomas Lamprecht
2023-07-07 16:54 ` [pmg-devel] [PATCH pmg-api 3/4] report: skip irrelevant files in /etc/pmg/templates Stoiko Ivanov
2023-07-11 15:20   ` [pmg-devel] applied: " Thomas Lamprecht
2023-07-07 16:54 ` [pmg-devel] [PATCH pmg-api 4/4] report: group use statements Stoiko Ivanov
2023-07-11 15:19   ` [pmg-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=20230707165428.94777-3-s.ivanov@proxmox.com \
    --to=s.ivanov@proxmox.com \
    --cc=pmg-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal