portage-utils和eix的一些常用命令选项


#------------------------------------------------------------------------------
qfile <filename>
Options: -[ef:m:oRx:vqChV]
-e, --Exact          *精确匹配,类似eix -e gcc只查到包名为gcc的包效果一样
-f, --from <arg>     *Read arguments form file <arg> ("-" for stdio)
                     *将读入文件作为qfile的输入(有待考证)

-m, --max-args <arg> * Treat from file arguments by groups of args(默认为5000)
-o, --orphans        *显示孤立文件 这个是显示孤儿文件,就是不包含在任何安装包里边的文件。(不是通过ebuild安装的,可能是你手工安装的程序,也可能是反删除时候留下的文件),这个一般用来清除系统垃圾文件。
-R, --root-prefix, Assume arguments are already prefixed by $ROOT
                     *假设已将参数前缀设置为$ROOT了(不知如何表达)

-x, --exclude <arg>  * Don't look in package <arg>排除xxxx

<注>当equery b filename时未找到匹配时可以试试qfile,可能会给你带来惊喜
#------------------------------------------------------------------------------

    
#------------------------------------------------------------------------------
qlop <opts> <pkgname>
-g, --gauge      * Gauge number of times a package has been merged
                   比较准确估算出一个包已merged的时间

-t, --time       *计算一个指定包merge的时间
-H, --human      *输出的是秒形式,所以用此参数转化为人性化的显示方式(需要-t参数的支持)
-l, --list       *显示merge历史
-u, --unlist     *显示unmerge 历史
-c, --current    *显示当前正在emerging的包,相当于genlop -c

-f, --logfile <arg> *Read emerge logfile instead of /var/log/emerge.log
                    *用logfile的文件来代替/var/log/emerge.log 
#------------------------------------------------------------------------------


#------------------------------------------------------------------------------
quse <opts> <useflag>
-e, --exact          *精确比较,不使用正则表达式
-a, --all            *Show annoying things in IUSE (不管3721全显)
-K, --keywords       *Use the KEYWORDS vs IUSE
-L, --license        *Use the LICENSE vs IUSE
-D, --describe       *显示USE的描述信息,类似 euse -i xxx
-F, --format   <arg> * Use your own variable formats. -F NAME=
-N, --name-only      * Only show package name
#------------------------------------------------------------------------------


#------------------------------------------------------------------------------
qcheck <opts> <pkgname>
-e, --exact          *Exact match (only CAT/PN or PN without PV)
-a, --all            *显示所有包
-u, --update         *更新包的缺失的文件,校验码和修改时间(不要乱用)
-A, --noafk          *忽略缺失的文件
-H, --nohash         *Ignore differing/unknown file chksums
-T, --nomtime        *Ignore differing file mtimes
-v, --verbose
#------------------------------------------------------------------------------

#------------------------------------------------------------------------------
qsize <opts> <pkgname>
-f, --filesystem    *显示已使用的磁盘空间(包占用大小)
-a, --all           *显示所有安装包的大小
-s, --sum           *Include a summary 还会显示一个总和
-S, --sum-only      *仅显示总和 
-m, --megabytes     *用M方式显示 xMbytes
-k, --kilobytes     *用K方式显示 Kbytes
-b, --bytes
-v, --version
#------------------------------------------------------------------------------

#------------------------------------------------------------------------------
qdepends <opts> <pkgname>
-d, --depend        *显示依赖信息
-r, --rdepend       *显示反向依赖信息
-p, --pdepend       *显示PDEPEND信息 (未理解到)
-k, --key <arg>     *User defined vdb key
-Q, --query <arg>   *查询反向依赖
-N, --name-only     *仅显示包名
-a, --all           *显示所有依赖信息
-v, --verbose
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------

Usage: qtbz2 <opts> <misc args> : manipulate tbz2 packages

Options: -[jstxOvqChV]
  -j, --join           * Join tar.bz2 + xpak into a tbz2
  -s, --split          * Split a tbz2 into a tar.bz2 + xpak
  -t, --tarbz2         * Just split the tar.bz2
  -x, --xpak           * Just split the xpak
  -O, --stdout         * Write files to stdout
  -v, --verbose        * Make a lot of noise
  -q, --quiet          * Tighter output; suppress warnings
  -C, --nocolor        * Don't output color
  -h, --help           * Print this help and exit
  -V, --version        * Print version and exit
  


Usage: qxpak <opts> <misc args> : manipulate xpak archives

Options: -[lxcd:OvqChV]
  -l, --list           * List the contents of an archive
  -x, --extract        * Extract the contents of an archive
  -c, --create         * Create an archive of a directory/files
  -d, --dir      <arg> * Change to specified directory
  -O, --stdout         * Write files to stdout
  -v, --verbose        * Make a lot of noise
  -q, --quiet          * Tighter output; suppress warnings
  -C, --nocolor        * Don't output color
  -h, --help           * Print this help and exit
  -V, --version        * Print version and exit

#------------------------------------------------------------------------------
Usage: qatom <opts> <pkg> : split atom strings
                            拆分原子字符串
Options: -[cvqChV]
  -c, --compare        * Compare two atoms     
                       * 比较两个原子
  -v, --verbose        * Make a lot of noise 
  -q, --quiet          * Tighter output; suppress warnings
  -C, --nocolor        * Don't output color
  -h, --help           * Print this help and exit
  -V, --version        * Print version and exit

#------------------------------------------------------------------------------
Usage: qgrep <opts> <misc args> : grep in ebuilds
Options: -[IiHNclLexJEsS:B:A:vqChV]
  -I, --invert-match   * Select non-matching lines
                       * 选择不匹配的行
  -i, --ignore-case    * Ignore case distinctions
                       * 忽略大小分
  -H, --with-filename  * Print the filename for each match
                       * 打印每个匹配的文件名
  -N, --with-name      * Print the package or eclass name for each match
                       * 打印每个匹配的包名或eclass名
  -c, --count          * Only print a count of matching lines per FILE
                       * 只显示每个文件匹配行总个数
  -l, --list           * Only print FILE names containing matches
                       * 只打印文件名里面包含的匹配
  -L, --invert-list    * Only print FILE names containing no match
                       * 只打印文件名里面不匹配的内容
  -e, --regexp         * Use PATTERN as a regular expression
                       * 使用正则表达式
  -x, --extended       * Use PATTERN as an extended regular expression
                       * 使用正则表达式的扩展语法
  -J, --installed      * Search in installed ebuilds instead of the tree
                       * 搜索已安装的ebuilds
  -E, --eclass         * Search in eclasses instead of ebuilds
                       * 搜索
  -s, --skip-comments  * Skip comments lines
                       * 跳过注释行 只要重要的信息
  -S, --skip     <arg> * Skip lines matching <arg>
                       * 跳过匹配<arg>的行
  -B, --before   <arg> * Print <arg> lines of leading context
                       * 打印
  -A, --after    <arg> * Print <arg> lines of trailing context
  -v, --verbose        * Make a lot of noise
  -q, --quiet          * Tighter output; suppress warnings
  -C, --nocolor        * Don't output color
  -h, --help           * Print this help and exit
  -V, --version        * Print version and exit

#------------------------------------------------------------------------------
Usage: qmerge <opts> <pkgnames> : fetch and merge binary package

Options: -[fFsKUpuyO5vqChV]
  -f, --fetch          * Fetch package and newest Packages metadata
                       * 获取包和最新的包metadata,等同emerge -f
  -F, --force          * Fetch package (skipping Packages)
                       * 获取包 (跳过包)
  -s, --search         * Search available packages
                       * 搜过有效包
  -K, --install        * Install package
                       * 安装包
  -U, --unmerge        * Uninstall package
                       * 卸载包
  -p, --pretend        * Pretend only
                       * 假打
  -u, --update         * Update only
                       * 仅更新
  -y, --yes            * Don't prompt before overwriting
                       * 直接代替你输入yes
  -O, --nodeps         * Don't merge dependencies
                       * 不emerge依赖包
  -5, --nomd5          * Don't verify MD5 digest of files
                       * 不校验文件的MD5信息
  -v, --verbose        * Make a lot of noise
  -q, --quiet          * Tighter output; suppress warnings
  -C, --nocolor        * Don't output color
  -h, --help           * Print this help and exit
  -V, --version        * Print version and exit
#------------------------------------------------------------------------------
Usage: qsearch <opts> <regex> : search pkgname/desc

Options: -[acsSNHvqChV]
  -a, --all            * List the descriptions of every package in the cache
                       * 显示cache中每个包的描述信息
  -c, --cache          * Use the portage cache
                       * 使用portage cache
  -s, --search         * Regex search package basenames
                       * 用正则表达式搜索包的基本名字
  -S, --desc     <arg> * Regex search package descriptions
                       * 用正则表达式搜索包的基本描述信息
  -N, --name-only      * Only show package name
                       * 只显示包名
  -H, --homepage       * Show homepage info
                       * 显示主页信息
  -v, --verbose        * Make a lot of noise
                       * 详细
  -q, --quiet          * Tighter output; suppress warnings
  -C, --nocolor        * Don't output color
  -h, --help           * Print this help and exit
  -V, --version        * Print version and exit

#------------------------------------------------------------------------------
Usage: qcache <opts> <action> <args> : search the metadata cache

Options: -[p:c:idtansvqChV]
  -p, --matchpkg <arg> * match pkgname
                       * 匹配包名
  -c, --matchcat <arg> * match catname
                       * 匹配
  -i, --imlate         * list packages that can be marked stable on a given arch
                       * 显示可以
  -d, --dropped        * list packages that have dropped keywords on a version bump on a given arch
                       * 
  -t, --testing        * list packages that have ~arch versions, but no stable versions on a given arch
                       *
  -s, --stats          * display statistics about the portage tree
  -a, --all            * list packages that have at least one version keyworded for on a given arch
                       * 
  -n, --not            * list packages that aren't keyworded on a given arch.
                       *
  -v, --verbose        * Make a lot of noise
  -q, --quiet          * Tighter output; suppress warnings
  -C, --nocolor        * Don't output color
  -h, --help           * Print this help and exit
  -V, --version        * Print version and exit

#------------------------------------------------------------------------------

www.linuxsir.org/bbs/thread312978.html

//---------------------------------------------------------------
//---------------------------------------------------------------
eix_tag
update-eix-remote update 可以查到未下载的overlay里的东西
equery uses XXX    查询XXX包带的USE标志
equery hasuse X    查询使用X这个USE标志的包
eix -2 -I --only-names 查slot
eix -1 -I --only-names 
eix -U(--use) ithread 查询USE为ithread的包 
eix -v(--verbose)    详细查询

eix -l( --versionlines )  每个版本都以行列出
eix -c(--compact) 只列出一些信息

eix -d , --dup-packages  只匹配duplicated的包 如果sys-foo/bar同时存在不同
的overlay里面(包括官方portage)

eix -D, --dup-versions  同时在存不同的版本,类似-d
eix -P,--provide i.e "virtual/blackbox"

eix --only-names 只列出名字
eix -I(--installed) 列出已完装的
eix -i(--multi-installed)
eix -u(--upgrade, --upgrade+, --upgrade-) 升级
eix --stable    至少有一个是稳定版的包
eix --system 列出是system的包
eix -O, --overlay             到少匹配一个包版本在Overaly里的包
eix --in-overlay overlay_name 列出在overlay_name里的包(注:不能加overlay_name不知为何)
eix --only-in-overlay overlay_name
eix -J(--installed-overlay)  安装了overaly的包
eix --installed-from-overlay overlay

eix -s, --name 默认以名字查询
eix -S, --description 以描述查询
eix -C, --category  i.e. "app-portage"
eix -A, --category-name  i.e. "app-portage/eix"
eix -H, --homepage   i.e "http://xxx"
eix -L, --license    i.e "GPL-2"
eix --installed-with-use  安装包带use参数的
eix --installed-without-use
eix -e, --exact  直接查完整包名 如 eix -e gcc 查出只是gcc的包
eix -f, --fuzzy 模糊查找
eix -p, --pattern 
eix -r, --regex 正规表达式

eix -I -J  列出已安装的overlay的包
eix --fetch  列出最后一个版本是需要自己手动下载的包
eix --mirror 列出最后一个版本是 !m 的包
//-------------------------
 x11-themes/thinkeramik
     Available versions:  3.2.1!m {debug elibc_FreeBSD xine                                                                   rama}
     Homepage:            http://www.kde-look.org/content/s                                                                   how.php?content=10919
     De
--------------------------------------
eix --stable 列出最后一个版本为stable的包
eix --upgrade, --upgrade+, --upgrade- 最后一个版本为可升级的或是降级+ - 表示LOCAL_PORTAGE_CONFIG的真和假
eix --testing, --testing+,--testing-
eix --non-masked, --non-masked+, --non-masked-
eix --system, --system+, --system-
eix -O, --overlay 只列出包最后一个版本在overlay,无论是否安装,注意跟-J的区别
eix -T, --test-obsolete 测试陈旧的包
eix -l, --pipe 
eix -!, --not  


非常有用的FORMAT
   Application:
       FORMAT='{downgrade}%{FORMAT_COMPACT}{}' eix -I
              This  will  print  all installed packages for which there are downgrade recommendations.  Note that
              the compact format is used to output the packages: We  cannot  use  FORMAT='{downgrade}%{FORMAT}{}'
              because  this  would be a self-reference.  However, if you want to use the default FORMAT layout to
              output the packages, we can use FORMAT_COMPACT to wrap around FORMAT:

       FORMAT_COMPACT='{downgrade}%{FORMAT}{}' eix -cI
              This is as above, but the matching packages will be printed with the default (non-compact)  format.
              The  option  -c  is  needed  so  that eix will use our FORMAT_COMPACT variable as the format string
              (which we "misused" as a "wrapper" for FORMAT in this example).
//---------------------------------------------------------------

www.linuxsir.org/bbs/thread311868.html

调整分区

根目录快满了,今天将从/home分出5G给/usr/portage,并换成了ReiserFS,小记一下。

主要参考了这篇文章www.cublog.cn/u/13991/showart_138823.html感谢~

1、

df

 

/dev/hda6              20G   12G  2.6G  60% /home

2、

sudo fdisk -l

记录/dev/hda6的起始柱面s,结束柱面e1,unit值。

3、计算调整后hda6的终止柱面号e2 = s+[(15*1024*1024*1024)/unit],15为调整后为15G

4、一些准备工作:
重新编译内核加入ReiserFS支持。

emerge reiserfsprogs



5、重启进入单用户模式 init 1 ,现在正式开始

6、检查文件系统

fsck.ext3 /dev/hda6



7、去除ext3文件系统的日志

tune2fs -O ^has_journal /dev/hda6



8、调整文件系统大小

resize2fs /dev/hda6 15G



9、再加上日志

tune2fs -j /dev/hda9



10、再次检查文件系统

fsck.ext3 /dev/hda6



11、用fdisk分区

fdisk /dev/hda


进入后用d删掉hda6。新建分区,起始柱面为s,结束柱面为e2,为hda9。新建分区,起始为e2+1,结束为e1,为/hda10。用w保存退出。

12、格式化新分区

mkfs.reiserfs /dev/hda10



13、修改/etc/fstab,将原来的hda6改为hda10,新加一行
/dev/hda10    /usr/portage    reiserfs    noatime        0 2

14、将/dev/hda10挂到/media上,将原来/usr/portage中的所有东西移到/media/下面。

16、重启,一切ok

注:没有做备份,/home太大了有12G,没地方放。