emerge参数-1的问题

13 views
Skip to first unread message

Zhang Le

unread,
Apr 12, 2008, 1:36:36 PM4/12/08
to ocea...@gmail.com, Gentoo 中文
不在world里的,已经装过的软件一定需要-1
一般的,重装软件的时候,都可以加-1,没有害处

--
Zhang Le, Robert
http://r0bertz.blogspot.com
http://zh.gentoo-wiki.com
http://savannah.nongnu.org/projects/pgubook
http://groups.google.com/group/gentoo-china
http://groups.google.com/group/szlug

余钰炜

unread,
Apr 13, 2008, 1:01:31 AM4/13/08
to gentoo...@googlegroups.com
嗯,我以前就是没有用-1导致world中有很多本来仅仅是依赖的包。后来一个个过
才把依赖删掉,很麻烦。

Zhang Le 写道:

signature.asc

DawnFantasy

unread,
Apr 13, 2008, 9:50:03 AM4/13/08
to Gentoo 中文
如果是你自己想装的软件,就不用 -1,这样包就被加入到 world 里边。
如果是重装软件,最好 -1,这样不会更新 world 记录。

一条规矩:你想让portage认为这个是被动加入(dependency)的,就-1,如果是你主动要求安装的,那就别 -1。这样在
depclean 的时候,你主动要求的就不会被X掉了。

余钰炜

unread,
Apr 13, 2008, 1:54:15 PM4/13/08
to gentoo...@googlegroups.com
DawnFantasy 写道:
其实-1 或者--onshot的作用是在emerge后不对world文件
(/var/lib/portage/world)作出修改,就是说不对portage 保存的系统信息做出改变。
因为world中放的是你要求安装的目标包,依赖是不在world中的。用-1就是为了不
让你在手动emerge依赖包的时候(比如你遇到了问题时),依赖包进入了world。

signature.asc

93free

unread,
Apr 13, 2008, 7:34:59 PM4/13/08
to gentoo...@googlegroups.com
Is there any command like "emerge -xx " to auto change "/var/lib/portage/world" for dependency reasons ?
Seems the echo "app/foo" >> /var/lib/portage/world  way not very smart .

2008/4/14 余钰炜 <ace...@gmail.com>:



--
93free
--------------
zm3...@gmail.com

余钰炜

unread,
Apr 13, 2008, 11:10:34 PM4/13/08
to gentoo...@googlegroups.com
93free 写道:

> Is there any command like "emerge -xx " to auto change
> "/var/lib/portage/world" for dependency reasons ?
> Seems the echo "app/foo" >> /var/lib/portage/world way not very smart .
>
默认情况下,portage会把你emerge的目标记入world中,假设,你emerge
gnome-terminal,而portage发现你需要装上gtk+作为依赖,此时,portage就会将
gtk+一并装上,但是记入world的只有你想要装的软件gnome-terminal, gtk+是不
会被记入world的。也就是说你emerge的东西,也只有你要emerge的东西,默认是
会被加入world中的。

有时候,你会手动升级一些以前作为依赖的软件,比如,今天我更新了portage后
发现cairo升级了,同时也有不少软件也更新了,假设 openoffice也更新了。此
时,我只想更新一下cairo但不想把openoffice以及其它软件也更新了,这时候显
然就不能简单地用 emerge -DNu world了。此时你就可以用emerge --oneshot
cairo仅对cairo进行更新。

因为cairo是已经安装在你的系统中的,你只是想更新,也就是说你不需要对world
的文件进行改变。当你用emerge -DNu world的时候也时不对world文件进行修改的。


signature.asc

Zhang Le

unread,
Apr 13, 2008, 11:35:59 PM4/13/08
to gentoo...@googlegroups.com
2008/4/14 93free <zm3...@gmail.com>:

> Is there any command like "emerge -xx " to auto change
> "/var/lib/portage/world" for dependency reasons ?
> Seems the echo "app/foo" >> /var/lib/portage/world way not very smart .

emerge -n foo
if foo is already installed, and you want keep it.

DawnFantasy

unread,
Apr 13, 2008, 11:02:28 PM4/13/08
to Gentoo 中文
On Apr 14, 12:34 am, 93free <zm3...@gmail.com> wrote:
> Is there any command like "emerge -xx " to auto change
> "/var/lib/portage/world" for dependency reasons ?
> Seems the echo "app/foo" >> /var/lib/portage/world way not very smart .

This is THE smart way to do it..:). Why do you think a emerge -XX
command is more smart?

DawnFantasy

unread,
Apr 14, 2008, 7:00:47 AM4/14/08
to Gentoo 中文
学到了。谢谢:)。

93free

unread,
Apr 15, 2008, 2:10:41 AM4/15/08
to gentoo...@googlegroups.com
学习了,谢谢。

ps:笔记本硬盘被摔坏了,临时装了个Debian在用,还没来得及装输入法,所以用E文回了。让大伙忙活了,再次感谢!



 "Zhang Le" <robert.zhan...@gmail.com> wrote:
> emerge -n foo
> if foo is already installed, and you want keep it.
>
> --

--
93free
--------------
zm3...@gmail.com
Reply all
Reply to author
Forward
0 new messages