|
|
由第三方写的一个脚本,用来清除多余的(不被依赖的、陈旧的、不必需的)包,也可以用来
整理 world 文件,使之更干净。我试了一下,感觉很不错。
[color="Red"]使用前必须明白你正在做什么、其后果以及应对措施,否则损失自负
原出处: http://forums.gentoo.org/viewtopic-t-142475.html
下载地址: http://catmur.co.uk/~ed/main/my-bin/dep
本地下载:见[color="Blue"]附件(下载后去除txt扩展名)
________________________________________________________________
[color="Blue"]Edit: this script also now contains an "emerge depclean" that actually works, an "emerge prune" that actually looks at your dependencies, and a "qpkg -q" that isn't horribly broken! 
A world file (/var/cache/edb/world) with lots of entries is no good for keeping your system clean and running smooth. Of course you need to go through it now and again to remove apps you don't want, but the job's easier if it contains as few 'extra' packages as possible i.e. packages that are actually deps on other packages.
Download: http://catmur.co.uk/~ed/main/my-bin/dep
dep v. 0.3.00 "Level Of Incompetence"
an inappropriate Portage engine!
Usage: dep [OPTION]... [PACKAGE]...
List dependencies and reverse dependencies of packages, and clean the world
file and the set of installed packages.
Task selection:
-h, -?, --help Display this help
-P, --purge Unmerge unneeded SLOTted packages
-d, --depclean Unmerge all unneeded packages
-l, --list-depends (default) List dependencies of PACKAGE
-L, --list-raw-depends Display the dependency strings for PACKAGE
-r, --list-rev-depends List reverse dependencies of PACKAGE
-w, --pruneworld Remove redundant entries from the world file
Options:
-b, --no-build-time Omit dependencies needed solely to build PACKAGE
-o, --original-depends Calculate dependencies as when PACKAGE was merged
-a, --ask (default) For -[Pdw]: ask to perform action
-f, --force For -[Pdw]: perform action without asking
-p, --pretend For -[Pdw]: show what action would be taken
A package is unneeded if there is no installed package that depends on it.
An entry in the world file is redundant if there is another installed package
that depends on it.
When merging the new world file, the merging program used is sdiff(1).
Your world file is located at /var/lib/portage/world.
And here's some sample output:
- # dep -w
- !!!REDUNDANT!!! app-admin/gkrellm depended on by:
- x11-plugins/gkrellflynn-0.6
- x11-plugins/gkrellmoon-0.6
- x11-plugins/gkrellmss-2.3
- app-admin/syslog-ng
- !!!REDUNDANT!!! app-editors/gvim depended on by:
- app-text/vim-latex-1.5_rc1
- app-vim/info-1.7-r1
- app-editors/nano
- app-emulation/wine
- ...
- x11-themes/mplayer-skins
- x11-themes/nautilus-themes
-
- 145 packages in worldfile: 137 valid, 8 redundant; 70 packages in system.
- 563 packages installed: 12% in system, 25% in world, 63% deps.
复制代码 |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|