Table of Contents

手册

小型自动化软件包管理器

语法

tazpkg [命令] [包|路径|匹配项|list|cat|–opt] [路径|–opt]

描述

tazpkg是一个超级轻量级(约35KB)的软件包管理软件,可以执行下载,安装,列表,更新和删除预编译软件包等操作。
tazpkg提供命令行执行搜索和创建独立的软件包。
*.tazpkg扩展包的格式是一种含有cpio归档的gzip,收条和可选的说明压缩的文件格式。
tazpkg还通过收条管理依赖包信息。每个收条包含所有有关的信息,还可以包括前,后安装的功能,收条还被tazwok用来编译和创建软件包。
tazpkg完全使用shell脚本,bash兼容,运行于ASH-busybox项目的一部分,遵循自由GNU协议GPL V3.

命令

list

列出系统里所有安装过的软件包。
此命令将显示所有已安装软件包列表,它也允许列出类别,和所有按类别分类的软件包。
还可以使用'search'命令列出所有包含关键字的项目或软件包。

 # tazpkg list                 #列出所有已安装的软件
 # tazpkg list cat|categories  #列出可用类别
 # tazpkg list blocked         #列出设置了禁止升级的软件包

xhtml-list

'xhtml-list'命令会创建一个XHTML文件,里面包含了系统上已安装的软件清单,以便用网页浏览器浏览查看。
默认会在当前目录下创建的文件名为 'installed-packages.html'的文件.你也可以自定义其名称:

 # tazpkg xhtml-list
 # tazpkg xhtml-list list-name.html

list-mirror

列出源里可用软件清单. 此命令会显示用recharge命令从源里获得到 'packages.list' 文件。 –diff 选项用来列出源里最新的软件清单与之前的区别:

 # tazpkg list-mirror  
 # tazpkg list-mirror --diff  

info

列出安装包里处方的信息- 版本, 类别, 维护者, 网站 和依赖。(关于'处方'的更多详情请参见 Tazwok ):

 # tazpkg info busybox

desc

显示安装包里的描述文件 (若存在的话). 本命令用来显示安装包里的'description.txt'文件 (简洁的文本文件, 只显示其中的80个字符或40个汉字):

 # tazpkg desc busybox

list-config

列出系统的配置文件清单,–box 选项表示以表格形式显示:

 # tazpkg list-config
 # tazpkg list-config --box

list-files

列出软件包里的所有文件清单. 本命令会读取并显示软件包里的 'files.list'文件。 此文件是在创建包的时候自动生成的,在卸载时也要用到该文件.
以下命令列出已安装的bc软件的所包含的所有文件清单:

 # tazpkg list-files bc

Search for packages by owner or package name. This command will search for the term wanted in the installed packages and the list of available packages on the mirror. To obtain the latest list of installable packages on the mirror, just run 'tazpkg recharge' before conducting a search:

# tazpkg search gcc

search-file

The 'search-file' command allows you to search for a file among the files installed by the packages. This command is very useful to find the full path to a file and determine if a file is present on the system. Example:

$ tazpkg search-file libnss

install

This command allows the installation of a local package with the .tazpkg extension. See 'get-install' to install a package from the internet. Note that you can force the installation via the –forced, uninstall and reinstall options or specify the root system where you want to install the packages via the -root= option:

# tazpkg install package-1.0.tazpkg Or : # tazpkg install path/to/package-1.0.tazpkg –forced Or : # tazpkg install path/to/package-1.0.tazpkg –root=/mnt/rootfs

install-list or get-install-list

Install a set of packages listed in a file. This command allows you to (download and) install several packages with a single command and can also be forced:

# tazpkg install-list my-packages.list # tazpkg get-install-list my-packages.list –forced

This command allows the installation of a package from another media device. The set up is done through symbolic links and consumes very little memory. It is generally used within the system RAM to install add-ons from an USB key:

# tazpkg link openoffice /media/usbdisk

remove

Remove a package. You will be asked for confirmation (y/N). This command will delete all files installed with the package. To view the list of files, use the 'list-files' command followed by the name of the package. Example with the package bc:

# tazpkg remove bc

extract

Extract a package into a directory. If you do not specify the destination directory, the package will be extracted in the current directory using the name package-version:

# tazpkg extract package.tazpkg # tazpkg extract package.tazpkg target/dir

pack

The 'pack' command will create a package from a directory prepared in advance or from an unpacked package. It can also manually create a .tazpkg package (see the Tazwok documentation for the automatic creation of packages). To pack a package:

# tazpkg pack package-version

repack

The 'repack' command allows you to recreate a package from the files on a system where it was previously installed. To repack a package:

# tazpkg repack package

repack-config

The 'repack-config' command recreates a package of the system configuration files (see list-config). It is enough to install the package to find the current configuration. To repack the configuration files:

# tazpkg repack-config

recharge

Recharge the list of available packages on the mirror. This command will download the most recent 'packages.list' of installable packages on the mirror and before starting will save the old list. Once the list is updated you can then use the 'list' and 'search' commands. To view and list the differences, you can use 'list-mirror –diff', and to view and update packages, you can simply 'upgrade'. To recharge the latest list of packages:

# tazpkg recharge

upgrade

Upgrade allows you to update all installed packages available on the current mirror. Upgrading packages is an important part of system security, it helps to keep you secure with the latest updates and fixes. The SliTaz project, although tiny, provides regular updates on security and generally offers the latest versions of software. Note that this function is aimed at people with SliTaz installed on a hard drive. Updated packages in LiveCD mode will be lost on system shutdown. To upgrade:

# tazpkg upgrade

check

The 'check' command can check dependencies on installed packages and determine whether all the files needed for the repacking of packages are present:

# tazpkg check package block or unblock

The 'block' and 'unblock' commands permit you to block installed package versions so that they are not maintained by an 'upgrade'. The list of packages on hold are contained in the /var/lib/tazpkg/blocked-packages.list. This file can also be edited by hand. To block or unblock a package such as Grub:

# tazpkg block grub Or : # tazpkg unblock grub

get

Get a package from the mirror (if it exists). The downloaded package is stored in the current directory. To find the path you can use 'pwd'. To get the Grub package:

# tazpkg get grub

get-install

Get and install a package from a mirror on the internet. The 'get-install' command begins by checking whether the package exists on the mirror and if it has been already downloaded. For a list of packages on the mirror, we must use the 'list-mirror' command. To install the package Grub:

# tazpkg get-install grub

clean-cache

Remove *.tazpkg packages downloaded to the cache. During installation, Tazpkg keeps a copy of packages downloaded from the web. This is done to save bandwidth in case of reinstallation, but you may want to free up space on the hard drive or re-download the packages:

# tazpkg clean-cache

setup-mirror

Setup the URL for the mirror. The 'setup-mirror' command will ask for the URL of the new mirror. You can specify multiple URLs separated by spaces. Note that you can also modify the main /var/lib/tazpkg/mirror file. The URL must point to the directory containing the 'packages.list' and packages:

# tazpkg setup-mirror

reconfigure

Replays the post-install script from the package. Example using gcc:

# tazpkg reconfigure gcc

depends or rdepends

Displays a dependency tree or reverse dependency tree for a package. Examples using mpd:

# tazpkg depends mpd # tazpkg rdepends mpd

add-undigest or setup-undigest

Set the URL of an additional unofficial mirror to test packages that are not yet present on the official mirrors. Note, you can also manually edit the file in /var/lib/tazpkg/undigest/'repository'. The URL must point to the directory containing the packages and 'packages.list':

# tazpkg add-undigest public-repository http://my.home.org/slitaz # tazpkg setup-undigest local-repository /home/slitaz/packages

remove-undigest

Removes the URL of an undigest mirror:

# tazpkg remove-undigest my-repository list-undigest

Lists additional undigest mirrors:

# tazpkg list-undigest

convert

Converts a Debian package (.deb), Redhat (.rpm), Slackware (.tgz) or Archlinux (.pkg.tar.gz) package into a SliTaz package (.tazpkg):

# tazpkg convert alien-package set-release

The 'set-release' command changes the current version and upgrades the packages to the latest release:

# tazpkg set-release cooking

bugs

Generates a list of known bugs in the packages:

# tazpkg bugs

英文作者 Christophe Lincoln <pankso at slitaz.org> uboat维护