Difference between revisions of "Emerge/zh-cn"

From Funtoo
Jump to navigation Jump to search
(Created page with "; --autounmask-write : 根据需要自动编写 package.use 设置来满足依赖关系。")
 
(5 intermediate revisions by the same user not shown)
Line 73: Line 73:
}}
}}


{{Note|This requirement of running {{c|perl-cleaner}} will eventually go away, once all perl-related ebuilds are updated to EAPI 5. EAPI 5 is a version of the Ebuild specification that supports smart updating of perl-related bits.}}
{{Note|一旦所有与 perl 相关的 ebuilds 更新到 EAPI 5,运行 {{c|perl-cleaner}} 的这个要求最终将消失。EAPI 5 Ebuild 规范的一个版本,它支持 perl 相关部分的智能更新。}}


== Emerge 选项 ==
== Emerge 选项 ==
Line 96: Line 96:


; --update -u
; --update -u
: Updates  packages to the best version available, which may not always be the  highest version number due to masking for testing and development.
: 将软件包更新为可用的最佳版本, which may not always be the  highest version number due to masking for testing and development.


; --deep [DEPTH] -D
; --deep [DEPTH] -D
Line 105: Line 105:


; --depclean -c
; --depclean -c
: Remove orphaned packages. Cleans the system by removing packages that are not associated with explicitly merged packages.
: 移除孤立的包。通过移除与明确合并的包无关的包来清理系统。


; --autounmask-write
; --autounmask-write
Line 114: Line 114:


; --jobs[=JOBS] -j [JOBS]
; --jobs[=JOBS] -j [JOBS]
: Specifies the number of packages to build simultaneously.
: 指定同时构建的包的数量。


; --load-average [LOAD]
; --load-average [LOAD]
: Specifies  that  no  new  builds should be started if there are other builds running and the load average is at least LOAD (a floating-point number).
: 指定如果有其他构建在运行,并且平均负载量至少为 LOAD(浮点数),则不应该启动新的构建。


== Configuration ==
== Configuration ==

Latest revision as of 19:29, March 26, 2021

Other languages:
English • ‎Türkçe • ‎español • ‎português do Brasil • ‎русский • ‎中文(中国大陆)‎

Emerge 是 funtoo 的 Portage 软件包管理器的前端。有了 emerge,安装、更新或删除软件包就变得很容易了。

更新软件包数据库

同步 meta-repo。这将用最新的 Funtoo ebuilds 来更新你本地的 Portage 树。

root # ego sync

参见 app-admin/ego。(Wiki Page) 获取更多关于 ego 的信息。也可以参考 man 页面。ego, ego-profile, ego-syncFuntoo 配置文件 wiki 页面。

搜索软件包

依据名称搜索软件包。

root # emerge -s firefox
root # emerge --search firefox

依据描述搜索软件包。

root # emerge -S web browser
root # emerge --searchdesc web browser

安装软件包

安装软件包。

root # emerge firefox

安装多个包。

root # emerge firefox thunderbird

安装软件包。在执行任何更改之前要求确认。显示详细的输出。

root # emerge -av firefox
root # emerge --ask firefox

移除软件包

移除软件包。

root # emerge -C firefox
root # emerge --unmerge firefox

移除软件包。在进行任何更改之前要求确认。

root # emerge -aC firefox

移除孤立的包。在进行任何更改之前要求确认。

root # emerge -a --depclean

更新软件包

更新所有的包。

root # emerge -uDN @world

更新所有的包。在执行任何更改之前要求确认。显示详细的输出。

root # emerge -uavDN @world

当升级到新版本的 perl 时,还需要在升级后运行 perl-cleaner

root # emerge -auvDN @world
root # perl-cleaner --all
   Note

一旦所有与 perl 相关的 ebuilds 更新到 EAPI 5,运行 perl-cleaner 的这个要求最终将消失。EAPI 5 是 Ebuild 规范的一个版本,它支持 perl 相关部分的智能更新。

Emerge 选项

--sync
更新默认位于 /usr/portage 的 portage 树。
--search -s
在 portage 树中搜索与所提供字符串匹配的内容。
--searchdesc -S
将搜索字符串与描述字段以及包名进行匹配。
--ask -a
在进行任何更改之前要求确认。
--pretend -p
如果不使用 --pretend,则只需显示*应该*安装的内容,而不是实际执行合并。
--unmerge -C
移除所有匹配的包。
--update -u
将软件包更新为可用的最佳版本, which may not always be the highest version number due to masking for testing and development.
--deep [DEPTH] -D
迫使 emerge 考虑包的整个依赖树,而不是只检查包的直接依赖关系。
--newuse -N
告诉 emerge,将已安装的、自编译以来 USE 标记发生过变化的软件包包括在内。
--depclean -c
移除孤立的包。通过移除与明确合并的包无关的包来清理系统。
--autounmask-write
根据需要自动编写 package.use 设置来满足依赖关系。
--resume -r
恢复最近一次因错误而中止的合并列表。
--jobs[=JOBS] -j [JOBS]
指定同时构建的包的数量。
--load-average [LOAD]
指定如果有其他构建在运行,并且平均负载量至少为 LOAD(浮点数),则不应该启动新的构建。

Configuration

make.conf

Emerge can be configured by editing /etc/make.conf to customize settings that are set in profiles. However, it's recommended to try to use Funtoo Profiles as much as possible to avoid having to clutter up /etc/make.conf. Also note that /etc/portage/make.conf is the same as /etc/make.conf -- they are symlinked.

   /etc/portage/make.conf - See Make.conf
# override subarch profile
CFLAGS="-march=native -O2 -pipe"
CXXFLAGS="-march=native -O2 -pipe"

MAKEOPTS="-j2"
EMERGE_DEFAULT_OPTS="--jobs 2 --load-average 2"
INPUT_DEVICES="evdev synaptics"
VIDEO_CARDS="intel i965"
LINGUAS="en en_US en_GB"
ACCEPT_LICENSE="*"

# Generally, your subarch profile and flavor/mix-ins will set these for you:
USE="mmx mmxext sse sse2 sse3 ssse3 threads alsa X gtk xcb dri opengl vaapi udev \
     svg x264 xvid gstreamer webm vpx icu bash-completion vim-pager \
     -gnome -xscreensaver -cups -fortran -deprecated -iptables -ipv6 -geoloc \
     -mta -sendmail -kmod -tiff -live -quicktime -real -gpm -themes"

Package.use

每个包各自的 use 标记可以在此文件中配置:

   /etc/portage/package.use
x11-wm/dwm savedconfig
x11-drivers/ati-drivers qt4
media-sound/ncmpcpp visualizer clock taglib

package.accept_keywords

如果你想安装一个没有在你的架构上测试过的包,你需要编辑

   /etc/portage/package.accept_keywords
=app-misc/screenfetch-9999 **

其他资源

更多信息见 emerge man 页面。

user $ man emerge