mint-configuration-kde overwrites configuration files (eg /etc/bash.bashrc) without creating backups
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Linux Mint |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Mint KDE 15 RC amd64. mint-configurat
When updating mint-configurat
Since the point of the package is to adjust config files installed by other packages -- so as to apply branding and other distro defaults -- it would be pointless if it conservatively ignored the existence of said files outright. But as a result, system-wide changes to them cannot be kept by the administrator without manually restoring backups of them after every update to the package.
The postinst file tests if the target file exists, and only then overwrites it.
if [ -e $original ]
then
cp /usr/lib/
fi
These files include:
/etc/bashrc
/etc/kde4rc
/etc/
/etc/
/etc/
/root/.bashrc
/root/
/root/
Said files are not defined in the package's conffiles so debconf doesn't intervene; they aren't dpkg-diverted, so the originals are lost. Automatically backing them up prior to overwriting is an easy workaround, but that still requires manual restoration.
Logic such as this could be employed in postinst:
#!/bin/sh
ADJFILE_
BACKUP_
mkdir -p $BACKUP_DIR
# sh doesn't support arrays
IFS=$'\n'
while read newfile; do
[ -f "$newfile" ] || continue
# eg for /etc/bashrc, this produces:
# /etc/linuxmint/
echo "backing up $newfile as $backup" >&2
mv "$newfile" "$backup" || true
echo "installing adjusted file to $newfile" >&2
cp "${ADJFILE_
done <<- EOF
# files to be adjusted go here, indentation ignored
/etc/bashrc
/etc/kde4rc
# ...
EOF
There is also /usr/lib/
Changed in linuxmint: | |
status: | New → Confirmed |
It is still having at mint-configurat ion-kde= 5.0.40.
I am a new user of LinuxMint, but have been using Linux for over a decade. I was caught by this bug, and anyone using KDE Desktop on Linux Mint is adversely affected.
For me, I had made changes to /etc/bash.bashrc and to /root/.bashrc...., customizing and getting use to LinuxMint. And then, wham, all my user customizations/ changes were gone and I'm back at square one. I finally started making backups and would restore the files. I verified that is it is the Update process that is doing this.
This is a huge issue ---- Overlaying a system's configuration files without any notice or back up.
Environment: Linux MInt 17.1, KDE