summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2024-11-18 19:38:38 +0000
committerJulian Andres Klode <jak@debian.org>2024-11-18 19:38:38 +0000
commit11f4008435e818d68453ead836665bdd8f4c404f (patch)
tree3eab8ab3246c6db88f5a7844dfd89de09aec8bd7 /apt-pkg
parent250705263e24a8be5e509df1fd3ffda0492f8ea7 (diff)
parent1c4fa81cc398e21868ad237509f1ea8e772d76de (diff)
Merge branch 'history-comment' into 'main'
Add a --comment option to record Comment: in history See merge request apt-team/apt!401
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/deb/dpkgpm.cc2
1 files changed, 2 insertions, 0 deletions
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);