gentoo linux的包维护(portage)和系统管理

jw.emerge_update的Python项目详细描述


这是gentoo的portage包管理器中用于包更新和一般系统管理的脚本。目的是 尽可能直接地自动化系统更新和维护。有很多命令要运行 保持gentoo linux系统的健康和整洁。单独出现并没有多大作用。这就是剧本的用武之地。

emerge_update做什么?

运行以下任务:

  1. 运行qcheck --badonly--all检查属于emerge安装的包的已更改文件。有几个 例外情况不应修改任何文件。这是一种检测恶意活动的简单方法,例如由入侵者检测。[1]
  2. 运行eix-sync-q更新包存储库
  3. 备份(参见Backups
  4. 运行emerge @world。提供了许多选项,请参见Emerge Options
  5. 如果检测到包的自动取消屏蔽,则运行etc-update--automode=-5 /etc/portage进行更改 由〈cite〉提出,浮现〈cite〉永久。如果甲骨文的jdk应该下载,它就会下载。然后,emerge @world再次运行。
  6. 运行emerge --depclean以删除不必要的包
  7. 运行revdep-rebuild--ignore重新生成由于最后一个emerge而导致共享库依赖关系中断的包。
  8. 运行emerge @preserved-rebuild。修复损坏的库依赖项的另一个措施。Gentoo推荐跑步 revdep rebuild和preserved rebuild都是。
  9. 如果检测到python的更新,则运行python-updater
  10. 运行perl-cleaner--all
  11. 运行cfg-update--update--automatic-only更新所有可以自动更新的配置文件。
  12. 运行cfg-update--index为下一次运行cfg update创建更新索引。
  13. 运行prelink --all以预链接所有二进制文件以加快加载速度。
  14. 备份(见Backups)。如果这个目录被破坏了,您就陷入了最严重的麻烦
  15. 运行qcheck --all--update为下次运行更新校验和。
  16. 运行emaint -c all检查潜在的问题或改进点。这不能修复任何东西。你可以跑 emaint -f ...例如emaint -f all来修复问题。

使用emerge_update

选项

-h, --helpshow the help
--dry-run, -ndon’t execute commands, just print them
--verbose, -vprint commands as they are executed
--version, -Vshow program’s version number and exit
--output OUTPUT, -o OUTPUT
specify output file
--append, -aappend to output file instead of overwriting

要测试脚本,请使用emerge_update --dry-run运行它。这样,它只显示将要做什么。

提示

使用--verbose--output /var/log/emerge_update --append运行脚本,以便对发生的情况有一个很好的日志。

提示

使用nice -19ionice -c3运行脚本,以避免使系统承受太多负载。

备份

备份是通过重命名和硬链接目标~/.local/share/applications/mimeapps.list(如果可能)来完成的。这 但不适用于装入点。作为挂载点的目录作为tar文件备份到 备份目录(默认情况下,/var/lib/emerge_update)。如有必要,将创建备份目录。

注意

您应该通过删除旧备份来维护备份目录(通常是/var/lib/emerge_update)。你可以的 这是一个带有tmpwatch的包。移动和链接备份保留8代。

出现选项

Emerge使用以下选项运行:

--nospinnerThis is not desirable in automated runs of emerge
--updateOnly update packages
--newuseUpdate packages when the USE configuration changes
--deepConsider updating dependencies
--keep-goingContinue in case of error to update as much as possible
--autounmask yUnmask required packages
--autounmask-write y
Make unmasking permanent
--jobs nwhere ^{tt22}$ = 4. This runs a maximum of 4 parallel emerge jobs
--load-average n

where ^{tt22}$ is the number of processors on-line in the system or 3 if this number cannot be determined.

This prevents creating new emerge jobs if the load average if above n

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
@SpringBootTest的java一次性配置   java如何在JSF中使用facelets创建左导航窗格?   [Java]检查一个数字是否为素数,使用extra-isPrime标志不起作用   关于java中的单线计算器的一个问题?   Java代码在Java环境中运行良好,但在Android环境中抛出错误   java使用int数组的元素初始化字符串   sqlquery中的mysql Java Hibernate常量   java在使用同一实例时从外部类调用内部类方法   中的java CriteriaBuilder   对JPA实体使用BaseEntity时,Sonar中的java“等于错误”   java获取数组的平均值   java ANDROID:在主细节流布局的另一个活动中更新数据   java如何使用SpringGateway以字符串形式获取响应体?   jsp中分页公告板的javasql