[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Downgrading (script)



I can Identify with Mehul's plight - what would I do if I hadn't done all my mixing through editing /etc/apt/preferences (pinning) and then apt-get re-installing? I'm mixing some woody in with my sarge, (xplanet, for example, breaks Hans Ecke's fabulous scripts) and each unusual package's origin is (thankfully) recorded in one place.

Here's a solution that I came up with (in my /etc/apt/preferences. But I thought about it for a bit, and bashed on the keyboard a bit, and came up with this solution:

# for pk in `dpkg --get-selections | awk '{print $1}' `; do echo -n $pk " "; installed=`COLUMNS=200 dpkg -l $pk | awk '$1 == "ii" {print $3}'` ; apt-cache showpkg $pk | grep -A10 Vers | grep ${installed}\( | awk -F_ '{print $4}' ; done

It's not particularly fast, but brute force is a valid computing style.
Output should look like this:

adduser  sarge
alien  sarge
anarchism  sarge
apache  woody
apache-common  woody
apt  sarge

...and so on. If your results look totally off, change the $4 to $0 and then grep for 'sid' and 'unstable'.


Peter Rooney

Wolfgang Pfeiffer wrote:
ls -lt -c /var/lib/dpkg/info/ | grep list | less

The command above gives you hopefully a list of packages you installed
the last time, IINM. It won't tell you about which branch they were
pulled from: But perhaps it might help remember the package you
installed from unstable ... Sorry, but this seems to be a weak point
on Debian
[snip]



Reply to: