Duinsoft - Linux
Saturday, 20 April 2024      | home | tools | contact

solydfixes (pre 1.8.0)

As most (?) users of SolydXK's Home Edition will know, the July 2014 Update Pack includes a significant change: the removal of the kdenext repository. I won't go into details about what exactly that means, but I wound up providing a script to preprocess the relevant KDE packages, in order to ease processing of the Update Pack.

Unfortunately, my scripts tend to be susceptible to 'feature creep'. This one was no exception and it ended up with all kinds of more or less related extra functions. The --help option of the script provides this list:

  -d          downgrade packages after creating a downgrade list
  -f          force execution of apt-get actions, even if potentially harmful
  -h, --help  display this text and exit
  -k          create lists for downgrading and removing kdenext packages
  -m          remove deb-multimedia.org (DMO) packages
  -n          download most recent version of this script
  -p          do not update the package lists
  -r          remove packages after creating a remove list
  -s          simulate the apt-get actions (may give wrong result in sequences)
  -t          fix incorrect /tmp to /var/tmp linkage
  -u          execute apt-get dist-upgrade (including pre and post actions)
  -v          remove superfluous VirtualBox guest addition modules
  -y          assume yes to all apt-get questions

Main functions

The original function is the one now provided by the -k option. Running the script whith this (i.e. solydfixes -k) results in two files called downgrade and remove appearing in solydfixes's work directory, /tmp/solydfixes.d.

The second one may not be of much use. It lists the packages that are no longer provided by the main repositories and can safely be ignored. The first one is used in the second stage, solydfixes -d. This downgrades all KDE packages to the state of the previous Update Pack (2014.04.15). After this, a normal dist-upgrade will be able to handle them properly. Without this step, some of these packages can not be upgraded, because their kdenext version numbers are too high.

It's possible to call the script for just these two actions (solydfixes -kd), optionally with the -y and -f switches added in if you don't want to be bothered with questions from apt-get or dpkg (solydfixes -kdyf).
Alternatively, you can let the script run the whole show: solydfixes -kduyf. This includes the dist-upgrade, normally handled by the Updatemanager.

Both before the downgrade and the dist-upgrade and after the dist-upgrade, extra apt-get actions can be performed automatically, provided the bash variables PreDowngrade, PreDistUpgrade and PostDistUpgrade contain useful values. Currently they are set up like this:


Each item in these whitespace (space, tab or line feed) separated lists consists of a command followed by an equals sign and a package name. A k or x followed by a closing bracket (parenthesis) at the start limits the action to the KDE (k) or Xfce (x) desktop environment. A colon following the package name dictates that the (remove or purge) action should only be carried out on packages of the foreign architecture (i.e. i386 in an amd64 install).
Starting with version 1.6.0, a colon at the start of the command will force dependency problems to be ignored.

Other actions

The script has four more functions that should preferably be run separately from the main functions.

Undo symlinking of /tmp

The -t switch makes the script remove the incorrect symlinking of /tmp to /var/tmp. This should be handled transparently, i.e. without disturbing any of the running processes, but I can't guarantee I haven't missed an application that uses /var/tmp instead of /tmp and will find its temporary files missing after the run.

Remove VirtualBox Guest Additions

Running the script with -v makes it purge the VirtualBox Guest Addition Modules from your system, unless you're running it in a VirtualBox Virtual Machine. The modules are listed in the variable VBoxGuest, like this:


They are removed using the same processing function as used by the downgrade and dist-upgrade actions, so 'purge' commands must be included.

Remove deb-multimedia.org

The -m option may be a bit problematic. It uses the functionality suggested here to replace the packages from deb-multimedia.org (DMO) with the ones provided by the main Debian repositories. Unfortunately, this isn't a perfect switch as not all of the DMO packages are available there. The ones missing are listed at the end of the run.

This function uses two variables, PreDMORemoval and PostDMORemoval, which contain:

PreDMORemoval='libdvdcss2 w32codecs w64codecs'

The first is simply a list of packages to ignore. They are provided by SolydXK's own repository as well, with the same name, so removing them is pointless.

After the main remove run, some additional packages can be installed. This is done using the processing function mentioned above, so 'install' is required. Because it has been reported that installing these items can sometimes cause masses of other packages to be removed (possibly because a DMO package was somehow missed in the removal stage), the -y and -f options are forcibly switched off at this point. Don't procede if the list of packages apt-get wants to remove is huge!

Update the script

The script uses a simple DNS call to check whether a new version is available. If there is one, you can download it from this site or use the -n option to make the script download it itself.