1
  1. How do I get a specific repository to override all other repositories, for ALL software in that one repository? (At all times, no matter what any other repository does.)
  2. After solving question 1, what is needed to get the system back to the original state (regarding LibreOffice, see Background).

Desires:

  • All solutions are from the command line.
  • You actually use, or have used, the solution you’re giving. (see Reference Notes)

Background:

Official 14.04 recently updated LibreOffice, causing the official repositories to install over and override the LibreOffice PPA, error message is:

# apt-get update
# apt-get upgrade

... snip ...

You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
 libreoffice-calc : Depends: libreoffice-base-core (= 1:5.4.1~rc2-0ubuntu0.14.04.1~lo0) but 1:5.4.2~rc2-0ubuntu0.14.04.1~lo1 is installed
                    Depends: libreoffice-core (= 1:5.4.1~rc2-0ubuntu0.14.04.1~lo0) but 1:5.4.2~rc2-0ubuntu0.14.04.1~lo1 is installed
 libreoffice-core : Breaks: libreoffice-calc (< 1:5.4.2~rc2-0ubuntu0.14.04.1~lo1) but 1:5.4.1~rc2-0ubuntu0.14.04.1~lo0 is installed
                    Breaks: libreoffice-draw (< 1:5.4.2~rc2-0ubuntu0.14.04.1~lo1) but 1:5.4.1~rc2-0ubuntu0.14.04.1~lo0 is installed
                    Breaks: libreoffice-impress (< 1:5.4.2~rc2-0ubuntu0.14.04.1~lo1) but 1:5.4.1~rc2-0ubuntu0.14.04.1~lo0 is installed
 libreoffice-draw : Depends: libreoffice-core (= 1:5.4.1~rc2-0ubuntu0.14.04.1~lo0) but 1:5.4.2~rc2-0ubuntu0.14.04.1~lo1 is installed
 libreoffice-impress : Depends: libreoffice-core (= 1:5.4.1~rc2-0ubuntu0.14.04.1~lo0) but 1:5.4.2~rc2-0ubuntu0.14.04.1~lo1 is installed
E: Unmet dependencies. Try using -f.

System will now not update anything until this is resolved.

Reference Notes:

Based upon How to only install updates from a specific repository?, pinning is not the answer. APT preference may be, but I’m highly hesitant to use examples found as they contradict each other and even the Debian wiki for it:

This page has been written by ZugSchlus, who not even remotely grasps the concept of pinning. So, please take the words "probably", "needs to be verified" and similiar wordings literally, and document your findings (may they be "this page is right" or "this page is wrong", optionally "this page is wrong because") here.

Further information at: https://bugs.launchpad.net/ubuntu/+source/libreoffice/+bug/1722932

muru
  • 197,895
  • 55
  • 485
  • 740
Michael
  • 328
  • Apt always assumes that the higher version is preferred. You want something different - you want apt to prioritize by source. Apt-preferences won't help you - that's not what preferences do. You are trying to use apt for a purpose it was not designed for, so you may not be satisfied with many realistic answers: Apt-pinning, Snaps, Source management, etc. – user535733 Oct 19 '17 at 00:49
  • @user535733, I’m not sure why you say this isn’t something Apt, or variant, should do, other dist’s do this, see:
    https://wiki.centos.org/PackageManagement/Yum/Priorities . So it’s not like this is a new concept, but just how is it accomplished in the Debian world?
    – Michael Oct 19 '17 at 01:35
  • Nobody said apt shouldn't do it. We said apt doesn't do it. It's accomplished in the Debian world by choosing your version and source wisely, and managing them. PPAs are not intended to be a reliable long-term source - some are, but that's a misuse. – user535733 Oct 19 '17 at 01:38
  • @user535733 It seems like you've basically answered the question. Would you consider posting an answer along the lines of your comments? (Other users will still be able to answer, of course, and maybe a later answer will meet Michael's needs better, but I think your answer would still be valuable.) – Eliah Kagan Oct 19 '17 at 03:11
  • "pinning is not the answer. APT preference may be" is contradictory since pinning is done in the preferences. Regarding the Wiki note, it's not unusual for people who are experts to say they are idiots who know nothing (tongue-in-cheek). ZugSchlus has been a DD since 2001 and has written a number of apt-related things. Take that note as the light-hearted word of caution it is rather than a literal "I know nothing". – muru Oct 19 '17 at 03:14
  • 1
    Regarding your actual problem, https://packages.ubuntu.com/search?keywords=libreoffice-core says the official 14.04 repositories are all still 1:4.x.y. The problem is with the PPA (who seem to have made a half-update, or something else) and not with Ubuntu's repos. Prioritizing the PPA won't help since none of the package versions mentioned are from Ubuntu's repos. – muru Oct 19 '17 at 03:26
  • Well, rpm systems do have some advantages and this looks like one scenario. The way to do what you want is via a combination of pinning and putting packages on hold. The results will be similar to the option in centos, but, be warned, doing such things can eventually result in problems with updates when there are conflicts between the repositories. IMHO, your best option with both .rpm and .deb systems is to file a bug report against the packages in question or in your case the ppa. This is because holding packages / pinning / giving repos priority eventually causes these types of problems – Panther Oct 19 '17 at 04:45
  • I want to thank all of you for your comments. I’m doing this separately so it’s actually viable, and not squished up inside another of my replies ;) Doing my replies in order. – Michael Oct 19 '17 at 14:18
  • @user535733, I agree with Eliah Kagan, your combined comments are worthy of being an Answer. They do a good job of explaining the issues involved, with respect to Ubuntu (Debian?) specifically. – Michael Oct 19 '17 at 14:23
  • @muru, Okay, this is completely outside scope, but damn! I see your, and his, point for being light hearted, but a ‘newbie’ user is going to take his words literally, as we don’t know his background to even have a chance to realize the tongue-in-cheek nature. :( I’ll re-read that page. Thanks for the heads up. – Michael Oct 19 '17 at 14:36
  • @muru, v2. Ah, no it was the recent release by Ubuntu of an updated LibreOffice, which breaks the existing LibreOffice PPA. AFAIK, Ubuntu is not following the package naming conventions that LibreOffice established, hence [valid / leftover] LibreOffice PPA packages are being broken from their -core package requirement now being the Ubuntu version. – Michael Oct 19 '17 at 14:43
  • @Michael your statement would be more credible if even a single package version listed in the output above was from Ubuntu's repositories. None of them are. – muru Oct 19 '17 at 14:48
  • @bodhi.zazen, Would you? Can you? Please, write up an Answer? Your opinion is exceedingly valid, this is NOT the way to do this for 99% of use cases out there. Even in RH/CentOS it isn’t. But, in a specific case like this, with PPAs who implicitly know their software better than Ubuntu ever will, how to accomplish this is highly needed. [Well I think so ;) ] Thanks! – Michael Oct 19 '17 at 14:51
  • @muru, libreoffice-core is from Ubuntu’s repository. It’s what Ubuntu updated (a week ago-ish). – Michael Oct 19 '17 at 14:53
  • And you can see in https://packages.ubuntu.com/search?keywords=libreoffice-core that libreoffice-core in Ubuntu's repo is at 1:4.2.8-0ubuntu5.1, not 1:5.4.1~rc2-0ubuntu0.14.04.1~lo0 or 1:5.4.2~rc2-0ubuntu0.14.04.1~lo1. OTOH, you can see in https://launchpad.net/~libreoffice/+archive/ubuntu/ppa/+packages that both these versions of libreoffice-core are from the PPA (click on the package names to expand the full list of packages provided by each version)! Don't take my word for it, run apt-cache policy libreoffice-core and see for yourself. – muru Oct 19 '17 at 15:00
  • This may not be an answer (I've insufficient reputation to merely comment), but it might help solve the problem and may in fact be the correct path to resolving this type of issue without causing subsequent dependency issues or redesigning apt. Since this is apparently not what apt is meant to do, this bug has been logged with LibreOffice. See https://bugs.documentfoundation.org/show_bug.cgi?id=113269 – Little me Oct 19 '17 at 14:24
  • Thank you @Little me, I’ve updated the bug/request you submitted with additional reference information. – Michael Oct 19 '17 at 14:45
  • @muru, I stand corrected. Both Ubuntu and LibreOffice updated their repositories at the same time? So I’m mistaking a LibreOffice bug for a Ubuntu one? Maybe I should just head back to the CentOs world, at least I wouldn’t make a fool of myself. Thank you for the command. – Michael Oct 19 '17 at 15:09
  • @Michael I think, as a first step, you should run apt-get update; apt-get upgrade -f – muru Oct 19 '17 at 15:16

1 Answers1

0

So, after some more experimentation and learning, I think that I have an answer; don't revert system to original state; update the broken bits instead. Both Ubuntu and LibreOffice bugs were being 'Resolved' as 'It's their fault'!

Necessity is the mother of invention...

Solution in fellow Noobspeak:

  1. Run Synaptic Package Manager If not sure how, press the Windows/Super key then type Synaptic and click the appropriate icon
  2. Enter your password when prompted
  3. Click On The 'Status' button. Above that, select 'Broken Dependencies'
  4. To the right, Select all four affected LibreOffice Packages
  5. Right click them and choose 'Mark For Upgrade' option
  6. Click the big Apply button, above.

Unless the tiger is hiding, waiting to bite my hubristic backside, I think that this solves it. Tell me if I'm giving stupid advice! Thanks.

If it hasn't worked for you, perhaps you'd deseleted the LibreOffice PPA in the Depositary List. Reenable it and start again.

Little me
  • 105