Gentoo Tips

记录一下一些有用不好找的小知识:

忽略一些package自带的pre emerge check failed:

export I_KNOW_WHAT_I_AM_DOING=yes

 

建立Hardened Desktop Profile:

Gentoo 以前是有 Hardened Desktop 的Profile的,后来取消了。

使用的话可以自己建一个

mkdir -p  /etc/portage/make.profile && cd /etc/portage/make.profile

echo 5 > eapi

echo “gentoo:hardened/linux/amd64
gentoo:targets/desktop” > parent

echo “-abi_x86_32” > use.mask (启用multilib,不用的话跳过)

 

建立 Package Set:

将一堆包归为一个Set,方便安装和管理:

mkdir /etc/portage/sets && cd /etc/portage/sets

echo “<packages>” > <set name>

比如建立Android编译环境的包:

echo “media-gfx/pngcrush
app-arch/lz4
dev-python/lz4
sys-devel/bison
dev-python/buildutils
net-misc/curl
sys-devel/flex
dev-vcs/git
app-crypt/gnupg
dev-util/gperf
media-libs/audiofile
media-libs/alsa-lib
app-arch/unzip
dev-util/valgrind” > android

emerge -av @android

 

分步编译安装Package:

ebuild myebuild fetch (if you don’t have it in distfiles)

ebuild myebuild unpack (unpacked to /var/tmp/portage/packagename/something)

ebuild myebuild compil

ebuild myebuild install

ebuild myebuild qmerge

 

将package.use,package.keywords等建立为目录:

可以将这些文件用同名目录替代,portage会遍历目录下文件

 

忽略emerge过程中部分失败的包

emerge –keep-going

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *