LinuxSir.cn,穿越时空的Linuxsir!

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

问一下emerge的应用

[复制链接]
发表于 2006-5-21 17:44:54 | 显示全部楼层 |阅读模式
有没有什么办法可以在emerge出错时自动跳过,并继续下去的方法,最好还能记录出错的包?
这样像emerge -e system或emerge -w world时就方便多了。
我对脚本不太熟悉
发表于 2006-5-21 19:11:31 | 显示全部楼层
想看出错的包的话,直接看
/var/log/emerge.log(忘了有没有.log了,可以自动补齐) 就行了
回复 支持 反对

使用道具 举报

发表于 2006-5-21 21:21:05 | 显示全部楼层
回复 支持 反对

使用道具 举报

发表于 2006-5-21 22:53:38 | 显示全部楼层
sorry, post error
回复 支持 反对

使用道具 举报

发表于 2006-5-22 12:56:30 | 显示全部楼层
emerge --skipfirst ?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-5-23 10:49:12 | 显示全部楼层

emwrap.sh不错,只是觉得里面说的步骤太多了,好像总的要编译整个系统好几次了。
回复 支持 反对

使用道具 举报

发表于 2006-5-23 13:47:24 | 显示全部楼层
Post by superekcah
emwrap.sh不错,只是觉得里面说的步骤太多了,好像总的要编译整个系统好几次了。

不会啦,有很多参数可以用的,远行时如果不加任何参数,会出现Help:
  1. # /path/to/emwrap.sh

  2.       emwrap.sh  v. 4.0.1 "cats is rats mit fuzzy tails"
  3.       A wrapper for emerge so you can control toolchain updates!

  4. Usage: emwrap.sh [OPTION]

  5. Date 4-23-05
  6. Use at yee own risk. It works for me, but then I wrote it.
  7. This wrapper can do 3 things for you:
  8. 1. Test if there is a toolchain, TC, update in "emerge system/world -uD".
  9. 2. If there is and you want to, then you can rebuild all or part of your TC and then
  10.    using an edited list to build the other items scheduled to be updated.
  11. 3. Do the update without updating the TC, toolchain.
  12. Options:
  13.    These first flags are the same as what you use with emerge [options] See "man emerge"
  14.    -h, help   Display this help (default)
  15.    -f   Fetchs files only
  16.    -u   update
  17.    -D   deep
  18.    -e   Does an  emerge "--emptytree" world/sytem
  19.    -p   Just like pretend in emerge. Works with all other flags.
  20.    -N   Tells emerge to include installed packages that are affected by the new USE flags
  21.    that have changed since the program was built.
  22.    -B/b build packages only or build them as you emerge packages
  23.    resume, -r    Continues emwrap from where it stoped. To use rerun the same command
  24.    and add "r" DONT USE EMWRAP.SH FOR ANYTHING ELSE UNTIL YOU RUN THE -r
  25.    and emwrap will start from where it stopped without haveing to rebuild everything
  26.    already done.
  27.    -K/k   use packages. For use if you have --buildpkg in your /etc/make.conf  or use -B/b
  28.    -G/g use packages from a  PORTAGE_BINHOST server.
  29.    system, -s   "-s" is short for system.The same as "emerge system"
  30.    world, -w    "-w" is short for world. The same as "emerge world"

  31. For use by the script
  32.    -t      Rebuilds the toolchain componets only
  33.    -b      Rebuilds the toolchain and resumeinues the emerge.
  34.    -1      For use with "t" or "b" only builds the TC once.
  35.    -S      This is short for a "emerge system --emptytree" build.
  36.    -W      builds the world files, "emerge world -e", BUT minus the system files.
  37.    failed     builds the files in the failed list.
  38.    nc      Turns off color in the script. You still get color in emerge out put.

  39. The flags are chainable and change whether your doing a system or world emerge and
  40. from -uD, -N, to -e. There is also a pretend mode, -p. Like emerge -p it
  41. shows you what will be emerged. I recomemnd that instead of boldy going forth, add
  42. the -p to the end of the switchs first, to see whats going to be emerged. Then you
  43. can remove it.

  44. [color="Red"]Example emwrap.sh -sep ==> emerge system --emptytree -pretend. If you remove the
  45.    -p it    will do a build of all packages in system except for the TC.
  46.    NOTE -se or -S do the same thing
  47. emwrap.sh -set or -wet ==> updates the entire TC.  If the -b switch is used instead
  48.    of -t then the entire TC is built and then all system/world packages minus
  49.    toolchain files.

  50. Examples
  51.    emwrap.sh  prints help.
  52.    emwrap.sh -wuDbp Checks for updates to the TC and in the world.
  53.    emwrap.sh -wuDt==>  emerge world -uD and only does TC update if any.
  54.    emwrap.sh -wuDb==> updates, if any, the TC and then the world files.
  55.    emwrap.sh -f{other flags} will fetch the files for you.
  56.    emwrap.sh system -uDN==> emerge system -uDN, update deep newuse
  57.    emwrap.sh -Sb1==> emerge system -e build TC once and then system files

  58. emwrap.sh can "emerge system -e" with or without the TC and remove all packages
  59.    built during the system emerge for a following "emerge world -e". This is a major
  60.    time savings as 130+ packages wont be rebuilt during the world half.
  61.    NOTE -d -c -r have been changed. -d is now -S, -W takes on the old
  62.    role of -r.-r is now resume and -c has been removed.
  63.    emwrap.sh -Sb ,builds TC and sytem -e. When it completes run
  64.    emwrap.sh -W ,this picks where -Sb stoped and builds the rest of
  65.    the files in the " world -e ". Why use this, well if you want to break an
  66.    " emerge world -e " up into 2 chunks for two different nights this will do it.[/color]

  67. Here are the TC build list used in this wraper when doing updates. The first 3 are
  68.    double builds.
  69.    If linux-headers   TC="linux-headers glibc $tc_conf binutils gcc glibc binutils gcc"
  70.    If glibc      TC_glb="glibc $tc_conf binutils gcc glibc binutils gcc"
  71.    If binutils or gcc   TCmini="$tc_conf binutils gcc binutils gcc"
  72. These are the single build TC list
  73.    If linux-headers   TC1="linux-headers glibc $tc_conf binutils gcc "
  74.    If glibc      TC_glb1="glibc $tc_conf binutils gcc "
  75.    If binutils or gcc   TCmini1="$tc_conf binutils gcc"

  76. The TC build sripts are basicly fall through. If you have a linux-headers update
  77.    then the srcipt will use TC, if its a glibc update then TC_glib and
  78.    if binutils and/or gcc then TCmini. To force a full TC build use -set, -St or
  79.    -wet or -seb, -Sb or -web.
复制代码
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-5-23 15:03:05 | 显示全部楼层
我的意思是说他在那个版上讨论的更新整个系统的步骤
gcc-config -l    # make sure of gcc before beginning
emwrap.sh -set or -St
gcc-config -l                 #select the new gcc
emwrap.sh -seb  or -Sb  # We rebuild the TC and then the rest of the system
emwrap.sh -se  or -S      # doing the 2nd system emerge minus the TC
emwrap.sh -set or  -wet   # rebuilds TC against clean system
emwrap.sh -W       # first build of the world files against clean TC system
emwrap.sh -W       # second world rebuild and done
回复 支持 反对

使用道具 举报

发表于 2006-5-23 15:25:14 | 显示全部楼层
讨论归讨论,使用上不受影响,如emwrap.sh -Sb1 = emerge -e systyem;
emwrap.sh -W = emerge -e world-system (或emwrap.sh -Sb1 && emwrap.sh -W = emerge -e world) 等,看你怎么用了。
回复 支持 反对

使用道具 举报

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

本版积分规则

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