LinuxSir.cn,穿越时空的Linuxsir!

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

请教 ebuild 的一个问题

[复制链接]
发表于 2010-4-26 01:41:16 | 显示全部楼层 |阅读模式
用了这么久 gentoo,今天突然想自己写写 ebuild,但遇到一个问题

我的 ebuild 如下:
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=2

inherit eutils gnome2 mono

DESCRIPTION="Desktop note-taking application"
HOMEPAGE="http://www.beatniksoftware.com/tomboy/"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~x86"
IUSE="eds galago"

RDEPEND=">=dev-lang/mono-2
    >=dev-dotnet/gtk-sharp-2.12.6-r1
    >=dev-dotnet/gconf-sharp-2.24.0
    >=dev-dotnet/gnome-sharp-2.24.0
    >=dev-dotnet/gnome-panel-sharp-2.24.0
    >=dev-dotnet/gnome-desktop-sharp-2.24.0
    >=dev-dotnet/dbus-sharp-0.4
    >=dev-dotnet/dbus-glib-sharp-0.3
    >=dev-dotnet/mono-addins-0.3
    >=x11-libs/gtk+-2.12.0
    >=dev-libs/atk-1.2.4
    >=gnome-base/gconf-2
    >=app-text/gtkspell-2.0.9
    >=gnome-base/gnome-panel-2.24.0
    eds? ( dev-libs/gmime:2.4[mono] )
    galago? ( =dev-dotnet/galago-sharp-0.5* )"
DEPEND="${RDEPEND}
    app-text/gnome-doc-utils
    dev-libs/libxml2[python]
    sys-devel/gettext
    dev-util/pkgconfig
    >=dev-util/intltool-0.35"

DOCS="AUTHORS ChangeLog INSTALL NEWS README"

src_prepare() {
    sed -i -e '/DISABLE_DEPRECATED/d' $(find . -name 'Makefile.in') || die
}

src_unpack() {
    gnome2_src_unpack

    epatch "${FILESDIR}/${PN}-wrapper.patch"
}

src_configure() {
    gnome2_src_configure $(use_enable galago) $(use_enable eds evolution)
}


emerge 之后 编译提示错误
* This package will overwrite one or more files that may belong to other
* packages (see list below). You can use a command such as `portageq
* owners / <filename>` to identify the installed package that owns a
* file. If portageq reports that only one package owns a file then do
* NOT file a bug report. A bug report is only useful if it identifies at
* least two or more packages that are known to install the same file(s).
* If a collision occurs and you can not explain where the file came from
* then you should simply ignore the collision since there is not enough
* information to determine if a real problem exists. Please do NOT file
* a bug report at http://bugs.gentoo.org unless you report exactly which
* two packages install the same file(s). Once again, please do NOT file
* a bug report unless you have completely understood the above message.
*
* Detected file collision(s):
*
*         /usr/share/mime/XMLnamespaces
*         /usr/share/mime/globs
*         /usr/share/mime/icons
*         /usr/share/mime/magic
*         /usr/share/mime/types
*         /usr/share/mime/subclasses
*         /usr/share/mime/globs2
*         /usr/share/mime/treemagic
*         /usr/share/mime/aliases
*         /usr/share/mime/generic-icons
*         /usr/share/mime/mime.cache


我看了一下 fedora 的 spec,别人的处理手法是在打包前把那些文件删除,这样就不会提示有文件未打包了。
cd $RPM_BUILD_ROOT%{_datadir}/mime
for i in *; do
  if [ ! "$i" = "packages" ]; then
    rm -rf ./$i
  fi
done


但在 Gentoo 中 ebuild 应该怎么处理
发表于 2010-4-26 07:29:48 | 显示全部楼层
先用equery belong *查看那些文件的归属。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2010-4-26 17:52:48 | 显示全部楼层
tux tomboy # equery belongs /usr/share/mime/XMLnamespaces
[ Searching for file(s) /usr/share/mime/XMLnamespaces in *... ]
app-misc/tomboy-1.2.0 (/usr/share/mime/XMLnamespaces)


只有我自己打包的这个
回复 支持 反对

使用道具 举报

发表于 2010-4-26 19:02:34 | 显示全部楼层
你的这个包就是app-misc/tomboy-1.2.0么?不该冲突啊,这还真没遇见过。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2010-4-26 20:15:17 | 显示全部楼层
Post by coderoar;2085934
你的这个包就是app-misc/tomboy-1.2.0么?不该冲突啊,这还真没遇见过。


对 就是 tomboy-1.2.0 官方的只有 1.1.1 搞不懂是什么问题
回复 支持 反对

使用道具 举报

 楼主| 发表于 2010-4-26 21:27:42 | 显示全部楼层
查了一下,那几个文件是 update-mime-database 产生的。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2010-4-26 21:46:26 | 显示全部楼层
暂时的解决办法
gnome2_src_configure $(use_enable galago) $(use_enable eds evolution) '--disable-update-mimedb'
回复 支持 反对

使用道具 举报

发表于 2010-4-26 21:48:40 | 显示全部楼层
恩,有些其它包也是这么办的,此外gnome2.eclass会更新那些文件。
回复 支持 反对

使用道具 举报

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

本版积分规则

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