Thursday, October 25, 2018

apt - Cannot downgrade subversion without a lot of work



I'm trying to track a bug in svn. I need to be able to switch between svn 1.7.x and 1.8.x to try tests. I am using WANdisco's packages.



/etc/issue



Ubuntu 12.10 \n \l


/etc/apt/source.list.d/WANdisco.list




# WANdisco Open Source Repo
deb http://opensource.wandisco.com/ubuntu precise svn18
deb http://opensource.wandisco.com/ubuntu precise svn17


I realise I am running Quantal but Precise is listed. This Works For Me (tm) as WANdisco doesn't have Quantal-specific packages.



When I have subversion=1.7.14-1+WANdisco installed I can




sudo apt-get install subversion
sudo apt-get install subversion=1.8.5-1+WANdisco


and either brings me up to subversion 1.8.5-1+WANdisco no problem.



Going in the other direction is a major operation. After much trial and error, here's what I've discovered/concluded is a minimal working method for me:



sudo apt-get autoremove subversion
sudo apt-get clean

sudo vim /etc/apt/sources.list.d/WANdisco.list
# deb http://opensource.wandisco.com/ubuntu precise svn18
sudo apt-get install subversion


As I understand this, I have to completely remove svn 1.8.5 and its dependencies (libsvn1), remove the svn 1.8.5 cached packages AND remove apt-get's knowledge that svn 1.8.x is even available. Only then will it deign to install 1.7.14.



My question is, when 1.8.5 is installed, why doesn't this



sudo apt-get install subversion=1.7.14-1+WANdisco



work? What I get is



user@user-VirtualBox:/etc/apt/sources.list.d$ sudo apt-get install subversion=1.7.14-1+WANdisco
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable

distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
subversion : Depends: libsvn1 (= 1.7.14-1+WANdisco) but 1.8.5-1+WANdisco is to be installed
E: Unable to correct problems, you have held broken packages.
user@user-VirtualBox:/etc/apt/sources.list.d$



I get the "is to be installed" unless I follow exactly all three steps above: autoremove, clean, comment out the package line.



I noticed that WANdisco's install script creates sources.list.d/WANdisco-svn1[78] so I tried using the two files instead of the one; the thinking being that perhaps line ordering in WANdisco.list was creating a priority order. That failed to downgrade in the same way. It seems that if apt-get has any knowledge that 1.8.5 exists, it will prefer that over 1.7.14.



If there's an easier way, I'd really like to know.



You have to tell apt-get to downgrade all the dependencies along:



sudo apt-get install subversion=1.7.14-1+WANdisco libsvn1=1.7.14-1+WANdisco



otherwise apt won't downgrade them. For these operations I prefer aptitude, since it allows me to resolve things manually.


No comments:

Post a Comment

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...