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

Re: Debian (sid) painfully slow.



Hi,

Wolodja Wentland wrote:
It would be great if you could save the attached script and provide the
output of the following command:

# for dist in lenny squeeze sid; do echo $dist; list_repositories | grep $dist | wc -l; done

I've refined that a little, because it gave me some "false" results....


#!/bin/bash

function list_repositories
{
        dpkg -l | \
                awk '/^.i/ {print $2}' | \
                xargs apt-cache policy | \
awk '/^[a-z0-9.\-]+:/ {pkg=$1}; /\*\*\*/ {OFS="\t"; ver=$2; getline; print pkg,ver,$2,$3}'
}

function show_release_package_count
{
        for dist in lenny lenny-backports squeeze sid
        do
                echo $dist: $(list_repositories|grep ${dist}/|wc -l)
        done
}




Now after doing:
  # . ./script

I can then do:
  # show_release_count


I know it's only sort of once off, but this was a little fun and I might actually use it again.


--
Kind Regards
AndrewM

Andrew McGlashan
Broadband Solutions now including VoIP


Reply to: