xserver-common-lts-raring does not always get correctly removed.

Bug #1246384 reported by matthew chester
90
This bug affects 18 people
Affects Status Importance Assigned to Milestone
xorg-lts-transitional (Ubuntu)
Fix Released
High
Unassigned

Bug Description

Upgrades from 12.04 LTS to future dists may result in xserver-common-lts-raring being unremovable.

Removing xserver-common-lts-raring ...
Removing 'diversion of /usr/lib/xorg/protocol.txt to /usr/lib/xorg/protocol-precise.txt by xserver-common-lts-raring'
dpkg-divert: error: rename involves overwriting `/usr/lib/xorg/protocol.txt' with
  different file `/usr/lib/xorg/protocol-precise.txt', not allowed
dpkg: error processing xserver-common-lts-raring (--remove):
 subprocess installed post-removal script returned error exit status 2
Errors were encountered while processing:
 xserver-common-lts-raring

Tags: bot-comment
description: updated
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https://wiki.ubuntu.com/Bugs/FindRightPackage. You might also ask for help in the #ubuntu-bugs irc channel on Freenode.

To change the source package that this bug is filed about visit https://bugs.launchpad.net/ubuntu/+bug/1246384/+editstatus and add the package name in the text box next to the word Package.

[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]

tags: added: bot-comment
Revision history for this message
Quinn Balazs (qbalazs) wrote :

This is caused by xserver-common-lts-raring not being correctly removed, and therefore ending up in a nonfunctional state. Editing
 "/var/usr/dpkg/info/xserver-common-lts-raring.postrm" using "sudo nano /var/usr/dpkg/info/xserver-common-lts-raring.postrm" and removing the "dpkg-divert" command entirely from the file. After doing that, you should be able to remove it using "sudo apt-get autoremove". Once it has been removed, you should be able to do everything as normal.

Quinn Balazs

affects: ubuntu → dpkg (Ubuntu)
Changed in dpkg (Ubuntu):
status: New → Confirmed
summary: - subprocess installed post-removal script returned error exit status 2
+ xserver-common-lts-raring does not always get correctly removed.
Revision history for this message
matthew chester (matthewchester86) wrote :

ok how do you remove the "dpkg-divert" command i'm still new to unbuntu
and about the package when i run "sudo apt-get update &upgrade" it says "Failed to fetch http://dl.google.com/linux/deb/dists/stable/Release Unable to find expected entry 'non-free/binary-i386/Packages' in Release file (Wrong sources.list entry or malformed file)"

Revision history for this message
Quinn Balazs (qbalazs) wrote :

Running "sudo nano /var/usr/dpkg/info/xserver-common-lts-raring.postrm" should open the file in a command line text editor. Use arrow keys to navigate to the line that includes "dpkg divert" and erase that line using your backspace/delete key.

You will want to run "sudo apt-get autoremove" in order to remove xserver-common-lts-raring.

One question though, what Ubuntu release are you using?

Revision history for this message
matthew chester (matthewchester86) wrote :

sorry the package is; (xserver-common-Its-raring 2:1.13.3-0ubuntu6~precise3 [origion: unknown]

affects: dpkg (Ubuntu) → xorg-server-lts-raring (Ubuntu)
Revision history for this message
matthew chester (matthewchester86) wrote :

ubuntu version 13.04

Revision history for this message
Luke Faraone (lfaraone) wrote :

This issue is reproducible when upgrading from 12.04.3 LTS to trusty if you used the HWE stack.

description: updated
Changed in xorg-server-lts-raring (Ubuntu):
importance: Undecided → High
Revision history for this message
Quinn Balazs (qbalazs) wrote :

Potentially this ties in with bug #1252843.

Revision history for this message
Luke Faraone (lfaraone) wrote :

Sure, except LTS→LTS upgrades should work :P

Revision history for this message
Cody (codewager50) wrote :

So I typed "sudo nano /var/usr/dpkg/info/xserver-common-lts-raring.postrm" into the Terminal. It gave me this:

Revision history for this message
matachito (marialeg) wrote :

Hi all. I am having the same problem and I typed "sudo nano /var/usr/dpkg/info/xserver-common-lts-raring.postrm" into the Terminal and I got the same result than Cody. I am not sure about how can I edit this file or if there is anyother solution for this bug. Since I updated to Ubuntu 13.10, I haven't could install any program. Thank you very much for your help.

Revision history for this message
moorsey (moores-martin) wrote :

Try:

"sudo nano /var/lib/dpkg/info/xserver-common-lts-raring.postrm"

I had to remove more than just that line from the file to get it to remove however, basically the whole if statement, about 3 lines I think

Revision history for this message
Jordan Grigorov (yoreei-grigorov) wrote :

moorsey's solution worked for me.
Problem occurred when upgrading from 13.04 to 13.10

Revision history for this message
WHK (yan-uniko-102) wrote :

Apply changes and comment all if to fi lines, but not work finally:

sudo apt-get install --reinstall xserver-common-lts-raring
...
E: Internal error: No filename for xserver-common-lts-raring:amd64

affects: xorg-server-lts-raring (Ubuntu) → xorg-lts-transitional (Ubuntu)
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

there are no diversions anymore in more recent lts/hwe packages, so closing as fixed

no longer affects: dpkg (Ubuntu)
Changed in xorg-lts-transitional (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
matthew chester (matthewchester86) wrote : Re: [Bug 1246384] Re: xserver-common-lts-raring does not always get correctly removed.

Thanx you, you did fix it!!!

On Aug 23, 2017 12:46 AM, "Timo Aaltonen" <email address hidden> wrote:

> there are no diversions anymore in more recent lts/hwe packages, so
> closing as fixed
>
> ** No longer affects: dpkg (Ubuntu)
>
> ** Changed in: xorg-lts-transitional (Ubuntu)
> Status: Confirmed => Fix Released
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1246384
>
> Title:
> xserver-common-lts-raring does not always get correctly removed.
>
> Status in xorg-lts-transitional package in Ubuntu:
> Fix Released
>
> Bug description:
> Upgrades from 12.04 LTS to future dists may result in xserver-common-
> lts-raring being unremovable.
>
> Removing xserver-common-lts-raring ...
> Removing 'diversion of /usr/lib/xorg/protocol.txt to
> /usr/lib/xorg/protocol-precise.txt by xserver-common-lts-raring'
> dpkg-divert: error: rename involves overwriting
> `/usr/lib/xorg/protocol.txt' with
> different file `/usr/lib/xorg/protocol-precise.txt', not allowed
> dpkg: error processing xserver-common-lts-raring (--remove):
> subprocess installed post-removal script returned error exit status 2
> Errors were encountered while processing:
> xserver-common-lts-raring
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu/+source/xorg-lts-
> transitional/+bug/1246384/+subscriptions
>

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.