Score:5

PPA: Install old version

in flag

I am trying to install package qelectrotech on ubuntu 18.04.
After installing I got (old) version 0.5-2. So I added a PPA (sudo add-apt-repository ppa:scorpio/qelectrotech-dev) source to get the newer version. But they don't work automatically. Now I need to manually force "downgrade" and look for the version to get a new version of 0.90.
After checking, I realised that my ubuntu system added some version info before the actual version!
I see old (original 0.5-2 ) the old version 1:0.5-2 and the version in PPA (new 0.90.r7446) as 0.90.r7446.

As 0.90.r7664 seems older than 1:0.5-2, I always get the old version installed instead of the new. So how to get rid of that 1:, as this is not the part of the original version?

Thank you

Score:6
us flag

First, create a new folder, and enter it.

mkdir qelectrotech && cd qelectrotech

Then, download the relevant packages from the PPA.

wget https://launchpad.net/~scorpio/+archive/ubuntu/qelectrotech-dev/+files/qelectrotech_0.90.r7446-1ubuntu1_amd64.deb
wget https://launchpad.net/~scorpio/+archive/ubuntu/qelectrotech-dev/+files/qelectrotech-data_0.90.r7446-1ubuntu1_all.deb
wget https://launchpad.net/~scorpio/+archive/ubuntu/qelectrotech-dev/+files/qelectrotech-examples_0.90.r7446-1ubuntu1_all.deb

Now, remove the version installed from the official repositories, and install the .deb packages

sudo apt remove qelectrotech
sudo apt remove qelectrotech-data
sudo apt remove qelectrotech-examples
sudo dpkg -i *.deb

Now install any missing dependencies

sudo apt install -f

Finally, hold the packages in apt, so that it does not update to the "new version" which is actually older.

sudo apt-mark hold qelectrotech qelectrotech-data qelectrotech-examples
N0rbert avatar
zw flag
All good, but APT-pinning is more reliable. See https://askubuntu.com/q/1002703/66509 .
eSlavko avatar
in flag
I use synaptic package manager. And I can force correct version. But I need to lock version too as if I don't do that the next update will downgrade version. And I like to have unlocked version so they will be updated when new one is available.
us flag
@N0rbert I am not much familiar with APT-pinning. Please feel free to edit or add your own answer (whichever one you prefer).
N0rbert avatar
zw flag
@eSlavko please add the output `apt-cache policy qelectrotech` to the question by [editing it](https://askubuntu.com/review/suggested-edits/1185620). This will allow us to create pinning file.
Score:5
zw flag

The bad moment here is that you do not want to read QElectroTech-dev PPA description on its page.
The developer clearly states:

QElectroTech Ubuntu Repository for 0.9 devel version.

Ubuntu pinning
The following entry assigns a high priority to all versions of the QElectroTech package beginning with 0.80. :
This way, your system will download the higher package version from the ppa and not those from the official Ubuntu repositories.

Create manually the file 40qelectrotech-devel in /etc/apt/preferences.d/ and add these 3 lines:

Package: qelectrotech*
Pin: version 0.90.*
Pin-Priority: 1001

https://qelectrotech.org/wiki_new/start?id=en/doc/install_ubuntu

apt-get install qelectrotech qelectrotech-data qelectrotech-examples qet-tb-generator

So you need to really create such file with relevant version by using command below:

cat <<EOF | sudo tee /etc/apt/preferences.d/40qelectrotech-devel
Package: qelectrotech*
Pin: version 0.90.*
Pin-Priority: 1001
EOF

and then install these 0.90 versioned packages by:

sudo apt-get install qelectrotech qelectrotech-data qelectrotech-examples
us flag
I missed the ppa description as well :)
eSlavko avatar
in flag
"do not want to read" - > Just passed to the end of screen where ppa link is. It works for now.
eSlavko avatar
in flag
Thanks for help and and special thanks to Algnis who profread my bad english.
N0rbert avatar
zw flag
Got response from PPA owner, pinning command is now added to the description. Thanks!
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.