Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/usr/bin/env bash
# Since Opera 51, Opera does not support Trusty even though Trusty is not EOL.
#
# Opera will refuse to install on Trusty only beacuse the new opera package requires libdbus-1-3 (>= 1.9.14)
# However, opera works perfectly well with libdbus-1-3 (>= 1.6.18) on Trusty.
# This script alters the package requirement in order to be able to install opera on Ubuntu Trusty
#
# This script is provided as is, is not afiliated to Opera Software and comes with no support at all.
# Use at your own risks.
#
# More info here: https://forums.opera.com/topic/24994/can-t-install-opera-51-on-ubuntu-14-04-lts
export CURDIR=$PWD
export NEW_PACKAGE_NAME=$(echo "$1" | sed s/"opera-stable_"/"opera-stable-trusty_"/g)
backport_package() {
cd $CURDIR
tmpdir=$(mktemp -d)
dpkg-deb -R $1 $tmpdir
sed -i s/'libdbus-1-3 (>= 1.9.14)'/'libdbus-1-3 (>= 1.6.18)'/ $tmpdir/DEBIAN/control # change the requirement
dpkg-deb -b $tmpdir $NEW_PACKAGE_NAME
rm -rf $tmpdir
}
export -f backport_package # make backport_package availlable in subshell for fakeroot
echo backporting $1
fakeroot bash -c "backport_package $1"
echo $NEW_PACKAGE_NAME created
@sirmordred

This comment has been minimized.

Copy link

commented May 3, 2018

it works flawlessly, thanx mate 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.