/var/lib/cloud/data/upgraded-network file touched after apt install cloudinit
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init (Ubuntu) |
Triaged
|
Low
|
Unassigned |
Bug Description
We have a ubuntu 22.04 instance with cloudinit installed in the source code(python setup.py install), after executing the “apt install cloud-init” command,file /var/lib/
We have conducted a preliminary investigation and found that there is a function(
root@ubuntu22ue
/usr/local/
after "apt install cloudinit"
root@ubuntu22ue
-rw-r--r-- 1 root root 19 Mar 17 16:27 /var/lib/
root@ubuntu22ue
dpkg upgrade from
root@ubuntu22ue
...
disable_
local oldver="$1" last_without_
if [ ! -f /var/lib/
# this is a fresh system not one that has been booted.
return 0
fi
if dpkg --compare-versions "$oldver" le "$last_
echo "dpkg upgrade from $oldver" > /var/lib/
fi
}
...
"I don't know where this variable oldver was passed in" /www.debian. org/doc/ debian- policy/ ch-maintainersc ripts.html# details- of-configuratio n
It is the version of the previous package installed. See:
https:/
The post-install script can only know about the previous packaged version installed. Since the old version is from a source install, it's seeing the old version as nothing.
This is something that can potentially be modified, but in general I wouldn't recommend going from source install to package install. Is there a reason you can't start with a package install?
As a workaround, you can "rm /var/lib/ cloud/data/ upgraded- network" .