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

Re: both tk40/tcl74 & tk41/tcl75 on same system?

On Mon, 20 May 1996, David Engel wrote:

> Yes.

Good.  i thought i remembered reading something saying it was possible some
time ago...perhaps in your announce message for 7.5/4.1. 

> > pn  tk              <unknown>      (no description available)
> > un  tk-dev          <unknown>      (no description available)
> > pn  tcl             <unknown>      (no description available)
> > un  tcl-dev         <unknown>      (no description available)
> I have no idea where these came from.

my system was upgraded from 0.93r6. these are probably left over from

Anyone know if there's a tool or dpkg option to get rid of old package
details like these?  Unless they're actually needed (e.g. virtual
packages) i don't want them on my system...they just make the output of
'dpkg -l' confusing and slightly harder to parse. 

a shell script like the following might be a good start for a tool to do

---cut here---
#! /bin/bash
# warning: untested code.  may not do what's intended.  don't trust!!!
# i.e. it works, but i'm not 100% sure that it finds what it's supposed
# find.

# this is an ugly brute-force method...if i knew more about dpkg then i
# could probably write it better.  what the hell, rely on the disk
# buffering to speed up all the greps :-)

function isinstalled() {
  test -e /var/lib/dpkg/info/$1.list

function isvirtual() {
  grep "^Provides:.* $1 \|^Provides:.* $1\$" /var/lib/dpkg/status >/dev/null

function blow_it_away() {
  echo "i don't know how to do this yet: $1"

for i in `grep "^Package:" /var/lib/dpkg/status | sed -e 's/Package: //'` ; do
  isinstalled $i || isvirtual $i || blow_it_away $i
---cut here---

> You need to install the -3 versions of these.  The -2 versions won't
> coexist with tcl75 and tk41.

done.  thanks, works like a charm :-)


Reply to: