Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 13078 Details for
Bug 22574
pkg-size should handle multiple packages
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Improved pkg-size that does multiple packages.
pkg-size (text/plain), 1.28 KB, created by
Kenny Drobnack
on 2003-06-10 15:02:12 UTC
(
hide
)
Description:
Improved pkg-size that does multiple packages.
Filename:
MIME Type:
Creator:
Kenny Drobnack
Created:
2003-06-10 15:02:12 UTC
Size:
1.28 KB
patch
obsolete
>#!/bin/sh ># Copyright 1999-2003 Gentoo Technologies, Inc. ># Distributed under the terms of the GNU General Public License v2 ># $Header: /home/cvsroot/gentoo-x86/app-admin/gentoolkit/files/scripts/pkg-size,v 1.3 2003/02/14 22:06:54 vapier Exp $ ># Author: Karl Trygve Kalleberg <karltk@gentoo.org> > >function tryfile() { > local foo > foo=/var/db/pkg/$1/CONTENTS > bar=`ls $foo 2> /dev/null` > for i in $bar ; do > if [ -f "$i" ] ; then > echo $i > break > fi > done >} > > >until [ -z "$1" ]; do > name=`echo $1 | sed "s/\([^/]*\)\///"` > category=`echo $1 | sed "s/\/.*//"` > > if [ "$category" == "$name" ] ; then > category= > fi > > file=`tryfile "${category}/${name}"` > if [ -z $file ] ; then > file=`tryfile "${category}/${name}*"` > if [ -z $file ] ; then > file=`tryfile "${category}*/${name}"` > if [ -z $file ] ; then > file=`tryfile "${category}*/${name}*"` > if [ -z $file ] ; then > echo "!!! Package resembling ${category}/${name} not found" > exit 1 > fi > fi > fi > fi > > pkgname=`echo $file | sed -e "s:\/var\/db\/pkg\/::" -e "s:\/CONTENTS::"` > > totals=`cat $file|grep "obj"|awk '{ print $2 }' | sed "s/ /\\ /" | xargs du -scb | grep total | cut -f 1` > > size=0 > for i in $totals ; do > size=$[size+i] > done > > echo "$pkgname $size ($[size/1024]KB)" > shift >done
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 22574
: 13078