LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 947|回复: 5

[求助]误删/var/lib/portage 目录,怎样才能恢复?

[复制链接]
发表于 2010-1-29 15:36:21 | 显示全部楼层 |阅读模式
刚刚安装好Gentoo,不小心误删了/var/lib/portage整个目录,怎样才能恢复?

这个目录有什么重要性?revdep-rebuild?
 楼主| 发表于 2010-1-29 16:19:15 | 显示全部楼层
Google了一把,按照regenworld后生成的world才41个程序,而按eix -I --only-names显示的有881个程序,为何差别这么大?我是用funtoo的stage3安装系统,打开原stage3,world只包含git和dhcpd
回复 支持 反对

使用道具 举报

 楼主| 发表于 2010-1-29 16:23:25 | 显示全部楼层
regenworld --help
This script regenerates the portage world file by checking the portage
logfile for all actions that you've done in the past. It ignores any
arguments except --help. It is recommended that you make a backup of
your existing world file (/var/lib/portage/world) before using this tool.
回复 支持 反对

使用道具 举报

发表于 2010-1-29 16:23:26 | 显示全部楼层
world不包含依赖关系
回复 支持 反对

使用道具 举报

发表于 2010-1-29 16:40:46 | 显示全部楼层
Congratulations!

You deleted the world and the config file.
> pwd
/var/lib/portage
> ls -l
total 44
-rw-r--r-- 1 root portage 40616 2010-01-14 20:52 config
-rw-r--r-- 1 root portage   842 2010-01-25 14:36 world
>

You can easily restore the world file with your text editor.

But I don't know how to restore the config file.

Maybe emerge -e world can accomplish this if you always run dispath properly after updating your system.
回复 支持 反对

使用道具 举报

发表于 2010-1-29 20:45:41 | 显示全部楼层
重建 world 文件后,你可以试试看用 emerge --depclean -p 来删不需要的包,里面如果有你想要的,那就手动加入那个文件。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表