Package: mini-dinstall
Version: 0.7.0
Severity: normal
Tags: patch

Dear Maintainer,

It looks like mini-dinstall only fetches mail-related config options when 
mail_log_level
is not set to NONE. Which is a problem when mail_on_success is set!

I'm guessing the intention is to check the mail_log_* config items only if
they're actually needed, so something like the attached patch should help
things?

-- System Information:
Debian Release: 11.6
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 
'oldstable-updates'), (500, 'oldoldstable'), (500, 'oldstable'), (470, 
'stable'), (460, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 5.10.0-17-686-pae (SMP w/1 CPU thread)
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages mini-dinstall depends on:
ii  apt-utils    2.2.4
ii  python3      3.9.2-3
ii  python3-apt  2.2.1

Versions of packages mini-dinstall recommends:
ii  gpgv  2.2.27-2+deb11u2

Versions of packages mini-dinstall suggests:
pn  debian-keyring  <none>

-- no debconf information
223a224,225
> need_mailconfig = False
> 
224a227
>     need_mailconfig = True
229,232d231
<     if configp.has_option('DEFAULT', 'mail_to'):
<         mail_to = configp.get('DEFAULT', 'mail_to')
<     if configp.has_option('DEFAULT', 'mail_server'):
<         mail_server = configp.get('DEFAULT', 'mail_server')
242a242,250
> if configp.has_option('DEFAULT', 'mail_on_success') and 
> configp.get('DEFAULT', 'mail_on_success'):
>     need_mailconfig = True
> 
> if need_mailconfig:
>     if configp.has_option('DEFAULT', 'mail_to'):
>         mail_to = configp.get('DEFAULT', 'mail_to')
>     if configp.has_option('DEFAULT', 'mail_server'):
>         mail_server = configp.get('DEFAULT', 'mail_server')
> 

Reply via email to