[devel] kernel modules list

Денис Смирнов mithraen at altlinux.ru
Sun Oct 18 14:56:32 UTC 2009


On Sat, Sep 12, 2009 at 05:23:30PM +0300, Michael Shigorin wrote:

MS> Скриптик или ручки? :)  Первое можно приложить, а можно
MS> и закронить куда-нить на www.

Прикладываю :)

Заодно хочу сказать что вид результирующего отчета вызывает у меня грусть.


-- 
С уважением, Денис

http://freesource.info
----------------------------------------------------------------------------
-------------- next part --------------
MODULE              hpc-std  ovz-rhel ovz-smp  rt-smp   rt-up    sec-def  std-def  std-pae  tmc-tc   
acerhk                  Ok     -----      Ok     -----    -----    -----    -----    -----    -----  
alsa                    Ok     -----      Ok       Ok       Ok       Ok       Ok     i586     i586   
bcmwl                   Ok     -----      Ok     -----    -----    -----      Ok     i586     -----  
blcr                    Ok     -----    -----    -----    -----    -----    -----    -----    -----  
compcache             -----    -----    -----    -----    -----    -----    -----    -----    i586   
cronyx                  Ok       Ok       Ok       Ok       Ok       Ok       Ok     i586     -----  
dahdi                   Ok       Ok       Ok       Ok       Ok       Ok       Ok     i586     -----  
drbd8                   Ok       Ok       Ok     -----    -----    -----    -----    -----    -----  
drm                     Ok     -----      Ok       Ok       Ok       Ok       Ok     i586     i586   
dst                     Ok     -----      Ok     -----    -----    -----    -----    -----    -----  
etercifs                Ok     -----      Ok     -----    -----    -----    -----    -----    -----  
fglrx                   Ok       Ok       Ok     -----    -----    -----      Ok     i586     i586   
gfs                     Ok     -----      Ok     -----    -----    -----    -----    -----    -----  
gnbd                    Ok     -----      Ok     -----    -----    -----    -----    -----    -----  
heci                    Ok     -----      Ok     -----    -----    -----      Ok     i586     -----  
igb                     Ok     -----      Ok     -----    -----    -----      Ok     i586     -----  
kqemu                   Ok       Ok       Ok     -----    -----    -----      Ok     i586     -----  
kvm                     Ok     -----      Ok     -----    -----    -----      Ok     i586     -----  
lirc                  -----    -----    -----    -----    -----    -----      Ok     i586     -----  
lustre                  Ok     -----    -----    -----    -----    -----    -----    -----    -----  
madwifi                 Ok       Ok       Ok     -----    -----    -----    -----    -----    -----  
madwifi-ar5007          Ok     -----      Ok     -----    -----    -----    -----    -----    -----  
madwifi-dfs             Ok     -----      Ok     -----    -----    -----    -----    -----    -----  
madwifi-hal           -----    -----    -----    -----    -----    -----      Ok     i586     -----  
ndiswrapper           -----      Ok       Ok     -----    -----    -----      Ok     i586     -----  
nvidia                  Ok       Ok       Ok     -----    -----    -----      Ok     i586     i586   
ofa                     Ok     -----    -----    -----    -----    -----    -----    -----    -----  
omnibook                Ok     -----      Ok     -----    -----    -----      Ok     i586     -----  
oss                     Ok     -----      Ok       Ok       Ok       Ok       Ok     i586     -----  
rt2860                  Ok     -----      Ok     -----    -----    -----      Ok     i586     -----  
rtl8187se             -----    -----    -----    -----    -----    -----      Ok     i586     -----  
subfs                   Ok       Ok       Ok     -----    -----    -----      Ok     i586     -----  
svgalib_helper        -----      Ok     -----    -----    -----    -----    -----    -----    -----  
tp_smapi                Ok       Ok       Ok     -----    -----    -----      Ok     i586     -----  
v4l                     Ok     -----      Ok       Ok       Ok       Ok       Ok     i586     -----  
virtualbox              Ok       Ok       Ok     -----    -----    -----      Ok     i586     -----  
virtualbox-addition     Ok     -----      Ok     -----    -----    -----      Ok     i586     -----  
wanpipe                 Ok       Ok       Ok       Ok       Ok       Ok       Ok     i586     -----  
-------------- next part --------------
#!/bin/sh
find /var/lib/altlinux/sisyphus/files/ \
	-type f \
	| grep /kernel-modules \
	| grep -v .src.rpm$ \
	| xargs rpm -qp --qf '%{ARCH}\t%{NAME}\n' \
	| sed 's/kernel-modules-//'

-------------- next part --------------
#!/usr/bin/perl -w
use strict;

my %flavours;
my %pkgs;

open( IN, "utils/list-pkg-kernel |" );
while (<IN>) {
    chomp;
    /^([^\s]+)\s+(.+)/;
    my $arch = $1;
    my $name = $2;
    my $flavour;

    die "$_" unless $name =~ s/-([^-]+-[^-]+)$//;
    $flavour = $1;

    $flavours{$flavour} = 1;

    $pkgs{$name}->{$flavour}->{$arch} = 1;
}
close(IN);

# п═п╟я│я│я┤п╣я┌ я─п╟п╥п╪п╣я─п╟ п©п╬п╩я▐ я│ п╦п╪п╣п╫п╣п╪ п╪п╬п╢я┐п╩я▐
my $l = 0;
foreach ( keys %pkgs ) {
    my $l2 = length $_;
    $l = $l2 if $l2 > $l;
}
$l++;

printf "%-${l}s", "MODULE";

my @flavours = sort keys %flavours;
foreach (@flavours) {
    printf "%-9s", $_;
}
print "\n";

#print "@flavours\n";

foreach ( sort keys %pkgs ) {
    printf "%-${l}s", $_;
    foreach my $f (@flavours) {
        if ( defined $pkgs{$_}->{$f} ) {
            my $t = $pkgs{$_}->{$f};
            if ( defined $t->{x86_64} ) {
                if ( defined $t->{i586} ) {
                    print "    Ok   ";
                }
                else {
                    print "  x86_64 ";
                }
            }
            else {
                print "  i586   ";
            }
        }
        else {
            print "  -----  ";
        }
    }
    print "\n";
}

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.altlinux.org/pipermail/devel/attachments/20091018/4798e191/attachment.bin>


More information about the Devel mailing list