Mint Update Manager does not show Changelogs

If you are using Linux Mint, you might have noticed that the latest versions ship with an Update Manager that is able only to show you Changelogs of the packages from the Mint repositories and often they are cut off.

After searching through bug reports and forums finally I prepared a change of the underlying Python code which resolves the issue.

I hope they will integrate similar changes in the next version.

For more details you can have a look at these bug reports, where I got ideas and copied parts:

Install instructions

You can download the needed difference file from here, or just copy and paste the following into a file named mintUpdate.py.diff:
87c87,91
<                 changelog = source
---
>                 changes = source.split("\n")
>                 for change in changes:
>                     change = change.strip()
>                     if change.startswith("*"):
>                         changelog = changelog + change + "\n"
93c97,101
<                     changelog = source
---
>                     changes = source.split("\n")
>                     for change in changes:
>                         change = change.strip()
>                         if change.startswith("*"):
>                             changelog = changelog + change + "\n"
98,102c106,111
<                 source = commands.getstatusoutput("apt-get changelog " + self.source_package) 
<                 if source[0] != 0 or source[1].startswith("Err Changelog of"):
<                     changelog = _("No changelog available") + "\n" + _("Click on Edit->Software Sources and tick the 'Source code' option to enable access to the changelogs")
<                 else:
<                     changelog = source[1]
---
>                 source = commands.getoutput("aptitude changelog " + self.source_package)                    
>                 changes = source.split("urgency=")[1].split("\n")
>                 for change in changes:
>                     change = change.strip()
>                     if change.startswith("*"):
>                         changelog = changelog + change + "\n"
Then you can apply the patch with this command, it will leave a copy of the original script:
sudo patch -lb /usr/lib/linuxmint/mintUpdate/mintUpdate.py mintUpdate.py.diff
It has been created and checked with version 4.3.8.

Install LibreOffice 3.5

The current version of LibreOffice which ships with Ubuntu Oneiric is 3.4.4.
Lately, I was getting very angry about this version, because it gave me constant trouble:
  • it looses somehow control about its lock-files, therefore I wasn't able to save my open files any longer, neither with the old nor with a new name
  • graphics in calc files suddenly jumped to another sheet when opening the files
I loved LibreOffice so far, but this behaviour really pi.... me of.
So the other day, I read about the new release 3.5, its new features and so I decided to update it by hand.

Below, you can find the update script that I programmed for that task.

After using it for some time, here I list the most interesting stuff about the new version.
  1. No problem with the lock-files any longer.
  2. Graphics stay in their sheets.
  3. Conditional formatting now lets you define more then three conditions, this was really necessary, I use that feature a lot. I'm just missing an easy way for reordering.
  4. Bigger text box for writing formulas.
  5. The import of Microsoft Visio files.
  6. The print preview of all pages.
  7. and lots more

Install instructions

Just save the following lines as InstallLibreOffice.sh and execute it with the -h parameter to see the usage text. You can also download it from here directly.
#! /bin/bash

#
## LibreOffice installation from Debian Packages from website
## @author Sven Rieke
# 

language=en-US
version="3.5.0"

function Usage() {
    cat <<EOF
Usage: ${0##*/} [-h] [-v] [-l lang-id] [p lang-id] [-d version-id] [-u]

  Options:
    -h             Show this help.
    -v             Be verbose about processing steps.
    -l lang-id     Set language for main installer and documentation (default = ${language})
    -p lang-id     Set language for interface translation (not installed by default)
    -d version-id  Specify another package version (default = ${version})
    -u             Start with a clean user-profile
 
EOF
}

function AndOut() {
    popd
    exit
}

trap AndOut ERR

########################################################################
# Interpretation and validation of command line parameters and options #
########################################################################

while getopts :hvl:d:u OPT; do
    case $OPT in
 h|+h) Usage ; exit 0     ;;
 v|+v) VERBOSE=true       ;;
 l|+l) language="$OPTARG" ;;
 p|+p) langpack="$OPTARG" ;;
 d|+d) version="$OPTARG"  ;;
 u|+u) NEWUSER=true       ;;
 *)    Usage
       exit 2
    esac
done

sudo -v

mkdir -p /tmp/LibO.3.5
pushd /tmp/LibO.3.5

#### Download from http://www.libreoffice.org/download/?type=deb-x86
[[ -v VERBOSE ]] && echo "---[ Installing LibreOffice ${version}-${language} ]" >&2
[[ -v VERBOSE ]] && echo "*** Downloading packages ***" >&2

for i in install helppack ; do
    package="LibO_3.5.0_Linux_x86_${i}-deb_${language}.tar.gz"

    if [ ! -f $package ]; then
 [[ -v VERBOSE ]] && echo "*** Downloading new package $package ***" >&2
 wget http://download.documentfoundation.org/libreoffice/stable/${version}/deb/x86/$package
    fi
done

if [ -v langpack ]; then
    package="LibO_3.5.0_Linux_x86_langpack-deb_${language}.tar.gz"
    if [ ! -f $package ]; then
 [[ -v VERBOSE ]] && echo "*** Downloading new package $package ***" >&2
 wget http://download.documentfoundation.org/libreoffice/stable/${version}/deb/x86/$package
    fi
fi

[[ -v VERBOSE ]] && echo "*** Decompressing downloaded archives ***" >&2
for t in LibO_3.5.0_*.tar.gz ; do tar xzf $t ; done

[[ -v VERBOSE ]] && echo "*** Removing old LibreOffice installation ***" >&2
sudo apt-get remove libreoffice-core

for d in $(find -maxdepth 1 -mindepth 1 -type d) ; do
    [[ -v VERBOSE ]] && echo "*** Install packages from $d ***" >&2    
    pushd $d/DEBS
    sudo dpkg -i *.deb

    if [ -d desktop-integration ]; then
 [[ -v VERBOSE ]] && echo "*** Install desktop integration ***" >&2
        cd desktop-integration
        sudo dpkg -i *.deb
        cd ..
    fi
    
    popd
done

if [ -v NEWUSER ]; then
    [[ -v VERBOSE ]] && echo "*** Remove old user profile ***" >&2
    mv ~/.config/libreoffice/3/user ~/.config/libreoffice/3/user_old
    [[ -v VERBOSE ]] && echo "*** Old one can be found in ~/.config/libreoffice/3/user_old ***" >&2
fi

AndOut

From repository

There also exists a repository which gets updated from time to time with the latest versions.
sudo add-apt-repository ppa:libreoffice/ppa
sudo apt-get update
sudo apt-get upgrade

Troubleshooting

In two installations I had trouble with my old user profile. LibreOffice claimed about templates already installed. Therefore, I added the -u switch to my install script which moves the whole user profile to a backup location, so LibreOffice will start with a new profile. Just copy your old templates to the new profile and reapply all your settings again.