Skip to content

Commit

Permalink
unattended-upgrade: add debug output after run()
Browse files Browse the repository at this point in the history
  • Loading branch information
mvo5 committed May 25, 2024
1 parent 4676c26 commit 3ee24c8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions unattended-upgrade
Original file line number Diff line number Diff line change
Expand Up @@ -2227,6 +2227,7 @@ def main(options, rootdir="/"):
try:
res = run(options, rootdir, mem_log, logfile_dpkg,
install_start_time)
logging.debug("upgrade result: %s %s" % (res.success, res.result_str))

if res.success and res.result_str:
# complete, successful run
Expand Down Expand Up @@ -2596,6 +2597,9 @@ def run(options, # type: Options
logfile_dpkg)
# Was the overall run succesful: only if everything installed
# fine and nothing was held back because of a conffile prompt.
logging.debug("kernel_pkgs_remove_success: %s" % kernel_pkgs_remove_success)
logging.debug("pkg_install_success: %s", pkg_install_success)
logging.debug("pkg_conffile_prompt: %s" % pkg_conffile_prompt)
successful_run = (kernel_pkgs_remove_success and pkg_install_success
and not pkg_conffile_prompt)

Expand Down Expand Up @@ -2624,6 +2628,7 @@ def run(options, # type: Options
cache, auto_removals, logfile_dpkg, options.minimal_upgrade_steps,
options.verbose or options.debug,
options.dry_run)
logging.debug("pkg_remove_success: %s" % pkg_remove_success)
successful_run = successful_run and pkg_remove_success
# the user wants *only new* auto-removals to be removed
elif apt_pkg.config.find_b(
Expand All @@ -2637,6 +2642,7 @@ def run(options, # type: Options
cache, auto_removals, logfile_dpkg, options.minimal_upgrade_steps,
options.verbose or options.debug,
options.dry_run)
logging.debug("pkg_remove_success: %s" % pkg_remove_success)
successful_run = successful_run and pkg_remove_success

logging.debug("InstCount=%i DelCount=%i BrokenCount=%i"
Expand Down

0 comments on commit 3ee24c8

Please sign in to comment.