So in this unique case, using ppa-purge will not work properly, I take it?
Sent from my dlx using Tapatalk
Announcement
Collapse
No announcement yet.
HOW TO: Revert installed packages to official release versions
Collapse
This topic is closed.
X
X
-
Make sure that after you have dist-upgraded (after the update) you remove the return-to-release file in /etc/apt/preferences.d/ and rerun update and dist-upgrade.
- Top
- Bottom
Leave a comment:
-
Excellent. Thanks for posting this. I've been wondering about the updates PPA publishing the 'git' packages.
194 packages downgraded.
Interesting that 'aptitude full-upgrade' would not perform the downgrade. It noted the same 194 packages, but didn't offer to do anything with them.
Success:
Code:$ apt-cache policy kde-workspace kde-workspace: Installed: 4:4.11.2-0ubuntu1 Candidate: 4:4.11.2-0ubuntu1 Version table: *** 4:4.11.2-0ubuntu1 0 500 http://mirror.cc.columbia.edu/pub/linux/ubuntu/archive/ saucy/universe amd64 Packages 100 /var/lib/dpkg/statusLast edited by ronw; Oct 26, 2013, 10:05 AM. Reason: Corrected priority from 1001 to 500 after deleting the pref file and updating
- Top
- Bottom
Leave a comment:
-
Thank you for this Steve. Just 'fixed' both laptops (saucy) using this procedure. How did you become aware of this?Originally posted by SteveRiley View PostMany of us like to keep the extra Kubuntu PPAs (updates, backports) enabled to receive the freshest that the Kubuntu team and KDE have to offer. Occasionally, though, this can create situations in which a package goes "orphan." Once this happens, then depending on how version numbers are tracked, dist-upgrade may not be able to replace them.
Most recently, this happened to me shortly after the 13.10 release. The Kubuntu updates PPA was pulling in and publishing nightly builds from KDE's Git repository. Because I had that PPA enabled, apt-get dist-upgrade dutifully installed each package. At some point the PPA stopped publishing builds, and much of my KDE went "orphan." In other words, the currently installed packages were neither from the official 13.10 release nor from a PPA.
- Top
- Bottom
Leave a comment:
-
Hi Steve. I've got this by running the command:But I didn't undestand what I should write inCode:$ apt-cache policy kde-workspace kde-workspace: Instalado: 4:4.11.2+git20131022+bzr48601+pkg833~ubuntu13.10.1 Candidato: 4:4.11.2+git20131022+bzr48601+pkg833~ubuntu13.10.1 Tabela de versão: *** 4:4.11.2+git20131022+bzr48601+pkg833~ubuntu13.10.1 0 100 /var/lib/dpkg/status 4:4.11.2-0ubuntu1 0 500 http://br.archive.ubuntu.com/ubuntu/ saucy/universe amd64 Packages 500 http://archive.ubuntu.com/ubuntu/ saucy/universe amd64 Packages 4:4.11.1+git20130910+bzr48547+pkg822~ubuntu13.10.1 0 500 http://ppa.launchpad.net/kubuntu-ppa/ppa/ubuntu/ saucy/main amd64 Packages 4:4.11.0+git20130819+bzr48502+pkg815~saucy1 0 500 http://ppa.launchpad.net/kubuntu-ppa/ppa/ubuntu/ saucy/main amd64 Packages 4:4.10.97+git20130805+bzr48465+pkg810~saucy1 0 500 http://ppa.launchpad.net/kubuntu-ppa/ppa/ubuntu/ saucy/main amd64 PackagesCould you help me?Code:sudo nano /etc/apt/preferences.d/return-to-release
Last edited by geoaraujo; Oct 26, 2013, 07:43 AM.
- Top
- Bottom
Leave a comment:
-
HOW TO: Revert installed packages to official release versions
Many of us like to keep the extra Kubuntu PPAs (updates, backports) enabled to receive the freshest that the Kubuntu team and KDE have to offer. Occasionally, though, this can create situations in which a package goes "orphan." Once this happens, then depending on how version numbers are tracked, dist-upgrade may not be able to replace them.
Most recently, this happened to me shortly after the 13.10 release. The Kubuntu updates PPA was pulling in and publishing nightly builds from KDE's Git repository. Because I had that PPA enabled, apt-get dist-upgrade dutifully installed each package. At some point the PPA stopped publishing builds, and much of my KDE went "orphan." In other words, the currently installed packages were neither from the official 13.10 release nor from a PPA. You can tell this happens with the help of apt-cache:
The clue here is that the installed version, indicated with ***, is no longer linked to any of the official pockets (saucy, saucy-updates, saucy-security, saucy-backports) or to any current PPA, but instead only to the list of locally-installed packages (as shown in red). Understanding how to fix this requires some knowledge of Debian packaging, so keep reading.Code:steve@t520:~$ [B]apt-cache policy kde-workspace[/B] kde-workspace: Installed: 4.11.2+git20131021+bzr48600+pkg833~ubuntu13.10.1 Candidate: 4.11.2+git20131021+bzr48600+pkg833~ubuntu13.10.1 Version table: *** 4.11.2+git20131021+bzr48600+pkg833~ubuntu13.10.1 [COLOR="#FF0000"]100 /var/lib/dpkg/status[/COLOR] 4:4.11.2-0ubuntu1 0 500 http://mirror.anl.gov/ubuntu/ saucy/universe amd64 Packages 100 /var/lib/dpkg/status
Normally, without any updates or PPA replacements installed, the output of the above would be:
The three-digit number in front of the two possible installation choices indicates the priority of a package. By default, packages in all pockets and PPAs (but not backports) are set to priority 500. This means that APT relies only on the version number to decide whether to upgrade a package. Once a package is installed (or upgraded), APT also adds an entry to the file /var/lib/dpkg/status to keep track of what's installed. The priority is set to 100, which is the convention for installed packages.Code:steve@t520:~$ [B]apt-cache policy kde-workspace[/B] kde-workspace: Installed: 4:4.11.2-0ubuntu1 Candidate: 4:4.11.2-0ubuntu1 Version table: *** 4:4.11.2-0ubuntu1 0 500 [url]http://mirror.anl.gov/ubuntu/[/url] saucy/universe amd64 Packages 100 /var/lib/dpkg/status
When a package is upgraded from a pocket or PPA, the cache policy display appears like so:
Here, the installed version is from saucy-updates and the list of locally-installed packages indicates the same. Compare the pair of red lines in this output to the single red line in the first cache output above.Code:steve@t520:~$ [B]apt-cache policy distro-info-data[/B] distro-info-data: Installed: 0.16ubuntu0.1 Candidate: 0.16ubuntu0.1 Version table: *** 0.16ubuntu0.1 0 [COLOR="#FF0000"]500 http://mirror.anl.gov/ubuntu/ saucy-updates/main amd64 Packages 100 /var/lib/dpkg/status[/COLOR] 0.16 0 500 http://mirror.anl.gov/ubuntu/ saucy/main amd64 Packages
Now, imagine that eventually a new version of kde-workspace appears in saucy-updates. Its priority will be 500, which is defined as "causes a version to be installed unless there is a version available belonging to the target release or the installed version is more recent" (from man apt_preferences). The installed version, remember, is 4.11.2+git20131021+bzr48600+pkg833~ubuntu13.10.1. It's certainly possible to envision a state where the APT somehow interprets the version number in saucy-updates to be "less" than the installed version -- and, indeed, if this were to happen, the new version of kde-workspace will not be installed.
The way to fix this is to downgrade the affected packages to the official versions. To do this, we need to elevate their priority to something greater than 1000, according to the previously-mentioned man page: "causes a version to be installed even if this constitutes a downgrade of the package." Through the magic of APT pinning, we can make this happen.
Step 1. In a command window, run:
Enter the following:Code:sudo nano /etc/apt/preferences.d/return-to-release
Remember to substitute the name of the release for RELEASE in each of the lines above. That's the first word of the two-word release name: precise, quantal, raring, saucy, etc. Press Ctrl+X to save the file and exit the editor.Code:Package: * Pin: release o=Ubuntu, a=[i]RELEASE[/i] Pin-Priority: 1001 Package: * Pin: release o=Ubuntu, a=[i]RELEASE[/i]-updates Pin-Priority: 1001 Package: * Pin: release o=Ubuntu, a=[i]RELEASE[/i]-security Pin-Priority: 1001
Step 2. Now, run:
APT will update its package cache, solve dependencies, and perform a downgrade of the "orphaned" packages to the most recent versions in the official pockets.Code:sudo apt-get update && sudo apt-get dist-upgrade
After the downgrade completes, delete the file:
Code:sudo rm /etc/apt/preferences.d/return-to-release
Step 3. Disable the Kubuntu PPAs, at least for now, so that you don't find yourself back in this state again. You might have one or two such files: kubuntu-ppa-ppa-release.list and kubuntu-ppa-backports-release.list (where release is, of course, some release name). Type the following:
Place a # in front of each line to comment it out. Press Ctrl+X to save. If you have only one .list file, nano will exit. If you have two .list files, nano will open the next one. Comment the lines in this file. Press Ctrl+X once more to save and exit.Code:sudo nano /etc/apt/sources.list.d/kubuntu-ppa*.list
Step 4. Clean up the downloads and update the cache once more (to reset priorities to the default of 500):
Finally, for good measure, reboot.Code:sudo apt-get clean sudo apt-get update
Last edited by SteveRiley; Oct 26, 2013, 04:06 PM.Tags: None
- Top
- Bottom
Users Viewing This Topic
Collapse
There are 0 users viewing this topic.
Leave a comment: