18

I've been trying to get vim with the breakindent patch applied, but it's only available through Quantal, and I'm running Raring. Is there a way to force-install a PPA from a previous release? I tried manually downloading all the packages and running sudo dpkg -i but I get lots of errors about dependencies, some of which don't look like they can be resolved. Am I stuck with having to compile vim myself?

Jonathan
  • 7,410
  • 25
  • 71
  • 98
  • How did you add the PPA, with `add-apt-repository`? Or have you not added it yet? – Thomas Ward May 09 '13 at 19:51
  • Adding the PPA works, but since its Raring area is empty, apt-get returns `W: Failed to fetch http://ppa.launchpad.net/eudoxos/vim-breakindent/ubuntu/dists/raring/main/binary-amd64/Packages 404 Not Found W: Failed to fetch http://ppa.launchpad.net/eudoxos/vim-breakindent/ubuntu/dists/raring/main/binary-i386/Packages 404 Not Found E: Some index files failed to download. They have been ignored, or old ones used instead.` Furthermore, adding an empty repo like that breaks apt-get upgrade, so I have to go in and manually remove the PPA entries from my sources list. – Jonathan May 09 '13 at 19:56

3 Answers3

15

You should choose Modify in Software & Updates > Other software from raring to quantal distribution.

other software

Radu Rădeanu
  • 166,822
  • 48
  • 327
  • 400
  • Awesome. That seems to have worked. But then how do I install a version of a package older than the one currently installed? – Jonathan May 09 '13 at 20:04
  • @Jon I think it will work with `sudo apt-get remove --purge [package]` and again `sudo apt-get update && sudo apt-get install [package]` – Radu Rădeanu May 09 '13 at 20:08
  • 2
    It still seems to install the newer version from the official repos, instead of the older version from the PPA. – Jonathan May 09 '13 at 20:14
  • If you want to install an old version, you should read this: [How to downgrade packages on Ubuntu?](http://askubuntu.com/questions/292314/how-to-downgrade-packages-on-ubuntu) – Radu Rădeanu May 09 '13 at 20:40
  • For some reason, it's not recognizing anything from the quantal repo. Browsing by source in synaptic shows nothing from this PPA. – Jonathan May 11 '13 at 18:36
  • How to do this with CLI? I need to add an older PPA to a never Ubuntu while building a Docker image! – Szczepan Hołyszewski Jul 17 '20 at 18:20
10

After you add the repository, you can try to change the distribution manually:

$ cat /etc/apt/sources.list.d/eudoxos-vim-breakindent-<version>.list 
deb http://ppa.launchpad.net/eudoxos/vim-breakindent/ubuntu <version> main
deb-src http://ppa.launchpad.net/eudoxos/vim-breakindent/ubuntu <version> main

So just replace <version> on those entries with quantal, and do sudo apt-get update. It is not guaranteed it will work, but if it doesn't you can revert the canges or remove the PPA.

Salem
  • 19,604
  • 6
  • 62
  • 90
3

To avoid manual change of the sources list you can use the following command to add the repository for a specific Ubuntu version:

sudo add-apt-repository "deb http://ppa.launchpad.net/eudoxos/vim-breakindent/ubuntu <needed_version_here> main"

To remove the added repo:

sudo add-apt-repository -r "deb http://ppa.launchpad.net/eudoxos/vim-breakindent/ubuntu <needed_version_here> main"

Konstantin
  • 31
  • 1