LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   [SOLVED] apt-get upgrade broke my fglrx (https://www.linuxquestions.org/questions/debian-26/%5Bsolved%5D-apt-get-upgrade-broke-my-fglrx-853697/)

phileas 01-02-2011 08:07 AM

[SOLVED] apt-get upgrade broke my fglrx
 
Hi, just in case anyone else runs into the same trouble:

Today I did a apt-get upgrade on my debian stable and after rebooting I got a black screen and a totally non-responsive keyboard, which made it hard to examine the situation.

That is not what you want on a sunday morning!

The problem was:
There were some xserver-xorg-core upgrades involved and so I had to rerun my ati-installer-*.bin to recompile the fglrx video driver (I can't use the .deb-package because my video card isn't supported by it).

One question: Is it possible to simply undo an apt-get upgrade?

archtoad6 01-05-2011 01:15 PM

Thanks for the tip.

Edit: check out:
Code:

ls -tl /var/lib/dpkg/info/*.list  |less -SN
There is also an awk command that will make a really nice list from this.

phileas 01-06-2011 08:15 AM

Okay! But I don't know what this list actually tells me...
Is it about undo-ing an upgrade?

archtoad6 01-07-2011 08:07 AM

Sorry, my last post was so short -- I was trying to get out the door to a LUG meeting.

The list tells you every package on your machine & when it was installed, because /var/lib/dpkg/info/ contains a .list for each package. Therefore, listing (ls) the .list files gives a list of packages. The "-l" option shows the date/time stamps, & "-t" puts the list in time order. From this you should be able to figure out what was upgraded & therefore what to remove to roll back the upgrade.


For example, I just finished running aptitude safe-upgrade, & this is the beginning of the output of ls -tl /var/lib/dpkg/info/*.list |less -SN:
Code:

      1 -rw-r--r-- 1 root root  7927 2011-01-07 07:15 /var/lib/dpkg/info/dpkg.list
      2 -rw-r--r-- 1 root root  17851 2011-01-06 07:11 /var/lib/dpkg/info/openssl.list
      3 -rw-r--r-- 1 root root    840 2011-01-06 07:11 /var/lib/dpkg/info/libssl0.9.8.list


Adding cut & sed to the command can simplify the output:
Code:

ls -tl /var/lib/dpkg/info/*.list  \
| cut -c 31-47,67-  \
| sed 's,.list$,,'  \
| less -SN

gives:
Code:

      1 2011-01-07 07:15 dpkg
      2 2011-01-06 07:11 openssl
      3 2011-01-06 07:11 libssl0.9.8


You can add some simple formatting to the sed portion:
Code:

ls -tl /var/lib/dpkg/info/*.list  \
| cut -c 31-47,67-  \
| sed 's,.list$,,;s, ,  ,2;s, ,  ,'  \
| less -SN

getting:
Code:

      1 2011-01-07  07:15  dpkg
      2 2011-01-06  07:11  openssl
      3 2011-01-06  07:11  libssl0.9.8


There is a wonderful awk command that makes a list by day:
Code:

      1 2011-01-07  dpkg
      2 2011-01-06  openssl
      3            libssl0.9.8

Unfortunately, I cannot find that awk command, in spite of spending a couple of hours searching for it yesterday. Sorry.


All times are GMT -5. The time now is 12:45 AM.