From 1c4fa81cc398e21868ad237509f1ea8e772d76de Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Mon, 18 Nov 2024 20:07:02 +0100 Subject: Add a --comment option to record Comment: in history Suggested-by: mhoye on IRC --- apt-pkg/deb/dpkgpm.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'apt-pkg') diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index ecedb8cd5..8cadd2712 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -1087,6 +1087,8 @@ bool pkgDPkgPM::OpenLog() std::string RequestingUser = AptHistoryRequestingUser(); if (RequestingUser != "") WriteHistoryTag("Requested-By", RequestingUser); + if (auto comment = _config->Find("APT::History::Comment"); not comment.empty()) + WriteHistoryTag("Comment", comment); WriteHistoryTag("Install", install); WriteHistoryTag("Reinstall", reinstall); WriteHistoryTag("Upgrade", upgrade); -- cgit v1.2.3-70-g09d2