Reply
Thread Tools
Posts: 36 | Thanked: 16 times | Joined on Dec 2009
#1
Just wrote a little script to check for non-opt packages and their sizes... it is a dirty hack to give me an idea of what's not optified and the size, so I can remove it if I want.

I wrote this for myself with no intention of maintain it, but I see so many people having full rootfs problem and don't know what to delete that I thought to share it.

Please feel free to modify it, improve it or anything you want, as I stated before I do not plan to maintain it nor support it

USE AT YOUR OWN RISK.

1. root
2. run:
dpkg -l | awk '{print $2}' | grep -vE '^(Status|Err|Name|^$)' > pkg.list
3. run checkpkg.pl in the same directory where pkg.list is located

checkpkg.pl:

#!/usr/bin/perl

my $file = 'pkg.list' ;

open (FH, $file) ;
while (<FH>) {
chomp ($_) ;
my $pkg = $_ ;

next if ($pkg =~ /l10n/) ;

my $optified = 0 ;
my @filelist = `dpkg -L $pkg` ;
foreach my $file (@filelist) {
chomp $file ;
$optified = 1 and last if ($file =~ /^\/opt/) ;
}
if ($optified == 0) {
my @duFileList ;
foreach my $file (@filelist) {
next if ($file =~ /^\/home/) ;
push @duFileList, $file if ($file =~ /.+\/.+\..+$/) ;
}
my @out = `du -ch @duFileList 2>stderr` ;
foreach my $duOut (@out) {
next if ($duOut !~ /total/) ;
chomp $duOut ;
print "$duOut \t $pkg\n" ;
}
}
}
close (FH) ;
 

The Following 4 Users Say Thank You to gesperon For This Useful Post:
Posts: 97 | Thanked: 24 times | Joined on Jan 2010 @ Planet Earth
#2
Thanks for the script, i will try it and give feedback.

Edit: not very usefull if lists ALL packages, a better option should be to exclude the core and default installed packages that come out of the box from Nokia.

Last edited by MatMat; 2010-01-12 at 01:03.
 

The Following User Says Thank You to MatMat For This Useful Post:
Posts: 336 | Thanked: 610 times | Joined on Apr 2008 @ France
#3
There is also a very useful script by ccooke which allows to check, sort and move packages from the rootfs to an alternate partition.

http://talk.maemo.org/showthread.php?t=33429
 

The Following 2 Users Say Thank You to CrashandDie For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 04:24.