openSUSE:YaST 开发构建特别版

跳转到:导航搜索
此页面不是最新的。某些信息可能不再有效。

使用 y2makeall 构建 YaST

y2makeall 由 Stefan Hundhammer 增强,现在不再具有固定的核心二进制文件构建列表。它也不再暴力字节编译所有 YCP 模块并将其安装到当前机器。

相反,它现在根据 .spec.in 文件中的“BuildRequires”、“Requires”和“Provides”动态计算正确的构建顺序,并按该顺序调用“make”(包括“make -f Makefile.cvs”)在每个子目录中。

旧行为仍然可用(请参阅 y2makeall --help),供那些想要它的人使用。我还将旧的 y2makeall 保存在 y2makeall-old 中(也在 devtools 中)。

Martin Vidner 已向 y2makeall 添加了前缀构建的支持。它应该仍然有效,但目前这部分未经测试 - 请测试。

现在应该再次能够从 SVN 构建 YaST2,而无需长时间的手动交互 - 最近由于某些依赖关系已更改以及 YCP 包之间添加了新的依赖关系,此功能已消失。

快速入门,适用于完全不了解它的人

构建所有内容

cd ???????/yast2/source
y2makeall

对所有 YaST2 包执行“make clean”,然后执行“make pot”

y2makeall clean
y2makeall pot

如果不需要,请不要执行“make -f Makefile.cvs”(autoreconf 等,configure)

y2makeall --fast

仅在基本包和我在 ~/.yast2/y2makeallrc 文件中的“favorites”部分中添加的子目录中构建,并避免不必要的“make -f Makefile.cvs”调用

y2makeall --fast --favourites

输出正确的构建顺序,然后退出

y2makeall --dump-build-order

更多信息

y2makeall --help

将 YaST 构建到其自身的前缀中

创建一个目录来存储 YaST 源代码

mkdir $HOME/yast-src; cd $HOME/yast-src

检出基本模块(在提示密码时输入 'anonymous')

 cvs -z3 -d:ext:anonymous@forgecvs1.novell.com:/cvsroot/yast co extra-packages liby2util devtools core packagemanager testsuite pkg-bindings qt yast2

extra-packages 是必需的。当然,您也可以检出更多您感兴趣的模块。请查看 CVS 中的模块列表

将 devtools/prefixbuild 添加到您的路径中

export PATH=$HOME/yast-src/devtools/prefixbuild:$PATH

如果您使用 distcc 或 icecream 等分布式编译工具,也将其添加到路径中

export PATH=/opt/icecream/bin:$PATH

启动构建,选择要构建和安装的模块。该脚本将解析依赖关系并构建所需的模块。YaST 将默认构建并安装到 $HOME/pfx 中。

recreate -d yast2

要启动 YaST,请使用 pfx 助手(这将设置环境)

devtools/prefixbuild/pfx $HOME/pfx/lib/YaST2/bin/yast2

将 YaST 构建到挂载的目录中

复制 YaST 库

mkdir /usr/share/YaST2-work
cp /usr/share/YaST2 /usr/share/YaST2-work
mkdir /usr/lib/YaST2-work
cp /usr/lib/YaST2 /usr/lib/YaST2-work


将 YaST2-work 目录挂载到 YaST2 目录上

mount --bind /usr/share/YaST2-work/ /usr/share/YaST2/
mount --bind /usr/lib/YaST2-work/ /usr/lib/YaST2/

从现在开始,所有移动到 YaST2 的内容都将被写入 YaST2-work。如果您想返回旧/工作版本

umount /usr/share/YaST2 && umount /usr/lib/YaST2

可以制作 _x 版本并挂载到已挂载的版本上

mount --bind /usr/share/YaST2_x/ /usr/share/YaST2/
mount --bind /usr/lib/YaST2_x/ /usr/lib/YaST2/