On 17/10/2024 02:58, Greg Wooledge wrote:
On Wed, Oct 16, 2024 at 19:03:27 +0200, Hans wrote:
But I wondered, why this file is not modified during my updates. As people 
told, /etc/profile is
part of the package base-files and is copied from /usr/share/base-files/profile.

It's not actually part of the base-files package.  It's not part of *any*
package.

The /var/lib/dpkg/info/base-files.postinst script contains code that will
modify /etc/profile if the first argument is "configure" and the second
argument isn't the empty string.

I don't know what would cause those particular arguments to be passed to
that script.
Just for reference, the excruciating details of how and when each maintainer 
script is called are here:
https://www.debian.org/doc/debian-policy/ch-maintainerscripts.html#details-of-configuration

"When we configure a package (this happens with dpkg --install and dpkg 
--configure), we first update any conffiles and then call:
    postinst configure most-recently-configured-version
"
So if $2 is non-empty it means an upgrade.

A flow chart is here:
https://www.debian.org/doc/debian-policy/ap-flowcharts.html

--
John

Reply via email to