Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Resolved]overlay中有个同名的ebuild, emerge时怎么决定用哪个
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index 中文 (Chinese)
View previous topic :: View next topic  
Author Message
ccgoo
n00b
n00b


Joined: 19 Jul 2007
Posts: 47

PostPosted: Mon May 26, 2008 4:22 am    Post subject: [Resolved]overlay中有个同名的ebuild, emerge时怎么决定用哪个 Reply with quote

比如我的
$PORTDIR/app-misc/xxx/xxx-1.0.0.ebuild
$PORTDIR_OVERLAY/app-misc/xxx/xxx-1.0.0.ebuild

假设这两个ebuild完全一样,一模一样
当我
emerge xxx的时候,emerge用的是哪一个ebuild呢?我又如何能指定emerge用某一个ebuild呢?

这个问题,官方没有文档说明吗?


Last edited by ccgoo on Mon May 26, 2008 5:03 pm; edited 1 time in total
Back to top
View user's profile Send private message
SeaTiger
l33t
l33t


Joined: 22 Nov 2007
Posts: 603
Location: Toronto, Ontario, Canada

PostPosted: Mon May 26, 2008 4:30 am    Post subject: Reply with quote

會用最新而沒有屏閉的那個.
Back to top
View user's profile Send private message
ccgoo
n00b
n00b


Joined: 19 Jul 2007
Posts: 47

PostPosted: Mon May 26, 2008 4:37 am    Post subject: Reply with quote

肯定都没有屏蔽

你说的最新,是指xxx-1.0.0.ebuild这个文件的时间最新吗?emerge 就是看文件时间决定的吗?

哪有这方面的说明吗

谢谢
Back to top
View user's profile Send private message
SeaTiger
l33t
l33t


Joined: 22 Nov 2007
Posts: 603
Location: Toronto, Ontario, Canada

PostPosted: Mon May 26, 2008 5:29 am    Post subject: Reply with quote

賤兔overlay的說明:
http://www.gentoo.org/proj/en/overlays/userguide.xml
http://gentoo-wiki.com/TIP_Overlays
Back to top
View user's profile Send private message
SeaTiger
l33t
l33t


Joined: 22 Nov 2007
Posts: 603
Location: Toronto, Ontario, Canada

PostPosted: Mon May 26, 2008 5:51 am    Post subject: Reply with quote

如果想知道emerge用那一個ebuild,用
Code:
emerge -av <package name>
overlay的會有[x]在尾部.
例:
Code:
emerge -av compiz

顯示
Code:
These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   ] x11-wm/compiz-9999  USE="dbus fuse gnome gtk svg xcb -kde -kde4" 0 kB [1]

Total: 1 package (1 reinstall), Size of downloads: 0 kB
Portage tree and overlays:
 [0] /usr/portage
 [1] /usr/portage/local/layman/desktop-effects

Would you like to merge these packages? [Yes/No]
Back to top
View user's profile Send private message
ccgoo
n00b
n00b


Joined: 19 Jul 2007
Posts: 47

PostPosted: Mon May 26, 2008 6:01 am    Post subject: Reply with quote

Oh yeah, 这个我在你给我的那个网页里也看到了。现在我能清楚emerge xxx的时候用的是哪个了。
那个网页里是这样说的
Portage automatically searches your main Portage tree (in /usr/portage), and all of the overlays that you've installed, and picks the latest version of the package that it can find.

所以这里又出现了一个新问题:
我刚才说
$PORTDIR/app-misc/xxx/xxx-1.0.0.ebuild
$PORTDIR_OVERLAY/app-misc/xxx/xxx-1.0.0.ebuild
这两个ebuild是完全一样的

那么emerge是根据什么认为哪个ebuild是lastest version呢,不可能是根据文件名里的版本号吧,因为它们都一样。
也好像不是根据这两个ebuild的文件时间,因为我分别touch了两个ebuild,但emerge总是选择了固定的那一个,没有因为文件时间的改变而改变选择。。。


junksiu wrote:
如果想知道emerge用那一個ebuild,用
Code:
emerge -av <package name>
overlay的會有[x]在尾部.
例:
Code:
emerge -av compiz

顯示
Code:
These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   ] x11-wm/compiz-9999  USE="dbus fuse gnome gtk svg xcb -kde -kde4" 0 kB [1]

Total: 1 package (1 reinstall), Size of downloads: 0 kB
Portage tree and overlays:
 [0] /usr/portage
 [1] /usr/portage/local/layman/desktop-effects

Would you like to merge these packages? [Yes/No]
Back to top
View user's profile Send private message
jojoyakira
n00b
n00b


Joined: 04 May 2007
Posts: 17
Location: Taiwan

PostPosted: Mon May 26, 2008 1:20 pm    Post subject: Reply with quote

我不曉得別人是怎麼使用不同的overlay,但我是這麼選用不同的overlay。
借用你的例子說明一下:
Code:
These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   ] x11-wm/compiz-9999  USE="dbus fuse gnome gtk svg xcb -kde -kde4" 0 kB [1]

Total: 1 package (1 reinstall), Size of downloads: 0 kB
Portage tree and overlays:
 [0] /usr/portage
 [1] /usr/portage/local/layman/desktop-effects

Would you like to merge these packages? [Yes/No]

1.選用[0] /usr/portage
Code:
# PORTDIR_OVERLAY="/usr/portage" emerge -av compiz

2.選用[1] /usr/portage/local/layman/desktop-effects
Code:
# PORTDIR_OVERLAY="/usr/portage/local/layman/desktop-effects" emerge -av compiz

這樣你就可以隨意切換使用ebuild了,用-av options就可以看出使用的是哪個overlay,只是這個方式麻煩一點,需要多打一點字。 :wink:
Back to top
View user's profile Send private message
ccgoo
n00b
n00b


Joined: 19 Jul 2007
Posts: 47

PostPosted: Mon May 26, 2008 5:03 pm    Post subject: Reply with quote

嗯,多谢。
确实是这样的

我google到了这样文字证明了你的说法
Code:

當要安裝這些套件時,系統中因為 overlay 的關係會有不只一種版本可以選擇,那這時 Portage 會選擇安裝哪個 repository 提供的套件呢?原則上,官方的 repository 也就是 official Portage tree 中的套件優先權最低,只要 overlay 中有提供版號相同的套件,那麼 overlay 的套件就會被 Portage 選來安裝。另外,如果有兩個以上的 overlays 提供同樣的套件,版號也相同,那麼最後一個被 included 進來的 overlay 則會取得最高的優先權,例如在 /etc/make.conf 中:

PORTDIR_OVERLAY="
        /usr/portage/local/sunrise
        /usr/local/portage
"

則 local overlay 中的套件優先權會高於 sunrise 的套件,這在想要控制要裝哪個 overlay 的軟體的時候是個有用的技巧。


非常感谢你的帮助。 :D
经验值又长了一成 :D
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index 中文 (Chinese) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum