I can confirm that this bug is fixed in the proposed 27.2.1 package on Xenial, Bionic, Focal and Hirsute by using the following script:
---------------------- #!/bin/sh set -x
series=xenial name=$series-check
lxc delete --force $name lxc launch ubuntu-daily:$series $name
lxc exec $name -- sudo sh -c "cat <<EOF >/etc/apt/sources.list.d/ubuntu-$series-proposed.list ## Enable Ubuntu proposed archive deb http://archive.ubuntu.com/ubuntu/ $series-proposed restricted main multiverse universe EOF" sleep 10 lxc exec $name -- sh -c "sudo apt-get update > /dev/null" lxc exec $name -- sh -c "sudo apt-get install aptdaemon -yq > /dev/null" # Verify that the output shows only: # dict_keys(['apt::install::post-invoke-success', 'apt::update::post-invoke-stats']) lxc exec $name -- python3 -c " from aptdaemon import config c = config.ConfigWriter() uataptconf = open('/etc/apt/apt.conf.d/20apt-esm-hook.conf') lines = uataptconf.readlines() print(c.parse(lines).keys()) uataptconf.close() "
lxc exec $name -- sh -c "sudo apt-get install ubuntu-advantage-tools -yq > /dev/null" lxc exec $name -- ua version
# Verify now that the output shows: # dict_keys(['apt::install::pre-invoke', 'apt::install::post-invoke-success', # 'apt::update::post-invoke-stats', 'aptcli::hooks::upgrade']) lxc exec $name -- python3 -c " from aptdaemon import config c = config.ConfigWriter() uataptconf = open('/etc/apt/apt.conf.d/20apt-esm-hook.conf') lines = uataptconf.readlines() print(c.parse(lines).keys()) uataptconf.close() "
set +x --------------------------------
This issue is already fixed on impish since release 27.1~21.10.1.1
I can confirm that this bug is fixed in the proposed 27.2.1 package on Xenial, Bionic, Focal and Hirsute by using the following script:
------- ------- ------- -
#!/bin/sh
set -x
series=xenial
name=$series-check
lxc delete --force $name daily:$ series $name
lxc launch ubuntu-
lxc exec $name -- sudo sh -c "cat <<EOF >/etc/apt/ sources. list.d/ ubuntu- $series- proposed. list archive. ubuntu. com/ubuntu/ $series-proposed restricted main multiverse universe ['apt:: install: :post-invoke- success' , 'apt::update: :post-invoke- stats'] ) ConfigWriter( ) etc/apt/ apt.conf. d/20apt- esm-hook. conf') readlines( ) parse(lines) .keys() )
## Enable Ubuntu proposed archive
deb http://
EOF"
sleep 10
lxc exec $name -- sh -c "sudo apt-get update > /dev/null"
lxc exec $name -- sh -c "sudo apt-get install aptdaemon -yq > /dev/null"
# Verify that the output shows only:
# dict_keys(
lxc exec $name -- python3 -c "
from aptdaemon import config
c = config.
uataptconf = open('/
lines = uataptconf.
print(c.
uataptconf.close()
"
lxc exec $name -- sh -c "sudo apt-get install ubuntu- advantage- tools -yq > /dev/null"
lxc exec $name -- ua version
# Verify now that the output shows: ['apt:: install: :pre-invoke' , 'apt::install: :post-invoke- success' , :post-invoke- stats', 'aptcli: :hooks: :upgrade' ]) ConfigWriter( ) etc/apt/ apt.conf. d/20apt- esm-hook. conf') readlines( ) parse(lines) .keys() )
# dict_keys(
# 'apt::update:
lxc exec $name -- python3 -c "
from aptdaemon import config
c = config.
uataptconf = open('/
lines = uataptconf.
print(c.
uataptconf.close()
"
set +x ------- ------- ------- ----
-------
This issue is already fixed on impish since release 27.1~21.10.1.1