l i n u x - u s e r s - g r o u p - o f - d a v i s
Next Meeting:
July 7: Social gathering
Next Installfest:
Latest News:
Jun. 14: June LUGOD meeting cancelled
Page last updated:
2004 Jan 25 19:09

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox-tech] extracting more deb package info
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox-tech] extracting more deb package info

On Thu, Jan 22, 2004 at 12:44:46AM -0800, Charles McLaughlin wrote:
> I installed Debian via Morhpix (like Knoppix, but I choose a Gnome
> version).  Now my wireless card finally works... whooohooo!
> Anyway...  The install came with some "experimental" packages that made it
> hard for me to use apt-get.  I kept have dependency problems.  I've gotten
> rid of most of these expermental packages by downgrading to their
> equivalent in the testing distribution.
> I'd like to know if I have any more of these experimental packages left on
> my system...
> Is their a way to print out a list of all the packages I have
> installed with an indication of which distribution the package came from?
> I found dpkg -l, but that doesn't give me enough info.
> Thanks for any suggestions.

Try out this perl script I created when I was running a mixed box to
see what I had that came from unstable and what came from testing.
(now I just use straight sid)

#!/usr/bin/perl -w

@policies=`dpkg --get-selections | grep -v deinstall | cut -f 1 | xargs apt-cache policy`;
foreach $x ( @policies ) {
  if ($x =~ /^[a-z]/){ #matches lines with package names
    if ($started==1) { #print last package info
      print $instdist;
      print "\n";
    chomp $x;  #first *chomp* off a newline
    chop $x;   #then *chop* off a colon
    print $x;
    print '/';
  if ($x =~ /[0-9]+\.[0-9]+/) {$instversion=0;} #match a version number
  if ($x =~ /\*\*\*/ ) {$instversion=1;} #match the current version's ***
  if ($instversion==1 && ($x =~ /http/ || $x =~ /ftp/)){ #match a url line
    if ( $x =~ / stable/ ) {$instdist="stable";}
    if ( $x =~ /testing/ && $instdist ne "stable")
    if ( $x =~ /unstable/ && $instdist ne "stable"
         && $instdist ne "testing")

#print again after the last line
print $instdist;
print "\n";

I usually have a GPG digital signature included as an attachment.
See http://www.gnupg.org/ for info about these digital signatures.
My key was last signed 10/14/2003. If you use GPG *please* see me about 
signing the key. ***** My computer can't give you viruses by email. ***

Attachment: signature.asc
Description: Digital signature

LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
Sunset Systems
Who graciously hosts our website & mailing lists!