LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
楼主: meteo

如何在保持系统精简干净的情况下升级,欢迎拍砖

[复制链接]
发表于 2004-6-11 09:23:38 | 显示全部楼层
这里是不是用emerge -UDv更好?可以防止降级

不过,如果用了packages.keyword,好像-U -u也就没什么区别了。。 
 楼主| 发表于 2004-6-11 09:44:37 | 显示全部楼层
不是,emerge -uDv更好
原因我在文里说过了呵呵,我举个例子吧
装有a b两个包

b的1.0版本被~x86屏蔽了,如果直接emerge b,装的是0.9版,可是我需要用b的1.0版。于是我就通过ACCEPT_KEYWORDS装上了b的1.0版本
a没有被屏蔽,current的版本比如是1.0,我通过emerge a装上了
这时候如果新版本的portage出来了,gentoo在a的1.0版里发现了一个漏洞,这个漏洞在1.0版本里面解决不了,在这种情况下必须downgrade回0.9版本
可是这时候由于我是用ACCEPT_KEYWORDS装的b,我已经记不清楚b是用这个装的,可是我又怕用ACCEPT_KEYWORDS装的包被降级回0.9,于是我就用emerge -UDv world,这下麻烦了,虽然我装的~x86的包没有被降级,但是有一个有问题的需要降级的包a却没有被降级。

如果用/etc设置的话,那么emerge -uDv world就会去查找配置文件,所有用了~x86关键字的包仍然用~x86关键字,其他的包则是x86,然后,所有的包都是该升级的升级,该降级的降级。
 楼主| 发表于 2004-6-11 09:46:17 | 显示全部楼层
换句话说-U开关对所有包一律升级,不作区分,这点上是不安全的,而用etc配置后用-u升级则是因材施教,该升级的升级,该降级的降级。
发表于 2004-6-11 16:25:31 | 显示全部楼层
最初由 penny 发表
这里是不是用emerge -UDv更好?可以防止降级

不过,如果用了packages.keyword,好像-U -u也就没什么区别了。。 

这里主要是怕某个包新发现有漏洞给hard mask了,第二个链结有个很好的例子:
rsync-2.6.2 was released a few weeks ago. An ebuild went into portage, and was quickly bumped to -r1. It was marked stable after a couple of days in testing. Those doing daft things like using ACCEPT_KEYWORDS on the command line, and -U to update, got the update to rsync-2.6.2-r1. Then, later that day, it transpired that rsync-2.6.2 and 2.6.2-r1 didn't play nicely with the Gentoo rsync servers. Now, seeing as how rsync is a fairly critical part of a Gentoo system, it was decided that if people couldn't reliably "emerge sync", then this version should be hard masked. So it was hard masked, and everyone who was sensibly using -u to update got rsync-2.6.0 back, and all was well. All those who were using -U got a corrupted portage tree every time they used an rsync server which was under heavy load. The result? Hundreds of invalid bug reports. People posting all over the forums that they were having trouble doing "emerge sync". And so on and so forth.
发表于 2004-6-11 19:35:01 | 显示全部楼层
那谁能教教我现在该怎么做?
发表于 2004-6-12 01:20:29 | 显示全部楼层
qpkg -I -nc |awk '{print $1}' > world
我用这个!
呵呵
 楼主| 发表于 2004-6-12 04:33:21 | 显示全部楼层
平时自己最好不要随便改动world文件,如果world文件出了问题或者丢了,用regenworld命令来恢复,这个命令是根据emerge 的log文件,把你过去通过emerge xxx安装的包都给记下来。如果用qpkg,它是把你安装的所有包都给记到world里,那么depclean就分不清楚哪些包是真正不需要的了,也就没办法精简系统了。
 楼主| 发表于 2004-6-12 04:38:16 | 显示全部楼层
我好像听说现在gentoo在打算取消直接emerge ebuild文件的功能,因为这样会造成混乱。如果以后需要emerge自己的ebuild文件,就应该放在/usr/local/portage/category/package-name/目录下,并且在make.conf里设置PORTDIR_OVERLAY="/usr/local/portage"
发表于 2004-6-12 05:46:11 | 显示全部楼层
据某些人说连-U这个参数都有可能会取消呢!
发表于 2004-6-12 07:54:43 | 显示全部楼层
小锁兄的那个是什么意识?
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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