个人工具

UbuntuHelp:MetaPackages

来自Ubuntu中文

跳转至: 导航, 搜索

Introduction

One of the handy features of apt (the packaging system used by Ubuntu) is the use of metapackages. These packages do not contain actual software, they simply depend on other packages to be installed. This setup allows entire sets of software to be installed by selecting only the appropriate metapackage. For example, an Ubuntu user can install the Kubuntu environment (KDE and all its associated programs) by selecting "kubuntu-desktop."

Desktop Metapackages

  • gnome-desktop-environment: This installs the GNOME Desktop environment, a graphical interface to use on your Debian system. It includes a wide range of applications, including programs for email, messaging, word processing, financial accounting, conferencing, and more.
  • kde: This metapackage includes all the official modules released with KDE that are not specific to development. In addition to the core KDE modules, this includes multimedia, networking, personal information manager (PIM), graphics, education, games, web development, system administration tools, and other artwork and utilities.
  • kde-base: This metapackage includes the nucleus of KDE, namely the minimal package set necessary to run KDE as a desktop environment. This includes the window manager, taskbar, control center, a text editor, file manager, web browser, X terminal emulator, and many other programs and components.
  • xfce: This package is a meta-package; it depends on the core packages of the Xfce4 desktop environment and recommends some extra Xfce4 packages. If you intend to use Xfce4 and want the full experience then installing this package and the packages it Recommends is a great place to start. If you just want to pick and choose the core components then feel free to remove this package.

Ubuntu System Metapackages

  • edubuntu-desktop: This package depends on all of the packages in the edubuntu desktop system
  • edubuntu-server: This package depends on all of the packages in the edubuntu server system
  • kubuntu-desktop: Similar to ubuntu-desktop, but with KDE and related software instead of Gnome
  • ubuntu-base: The basics of Ubuntu, with core system packages
  • ubuntu-desktop: In addition to ubuntu-base, this package depends on all of the packages in the Ubuntu desktop system. It installs a desktop environment (GNOME) and lots of software for home and office use.
  • ubuntu-minimal: This package depends on all of the packages in the Ubuntu minimal system, that is a functional command-line system with the following capabilities: Boot, Detect hardware, Connect to a network, Install packages, and Perform basic diagnostics. It is also used to help ensure proper upgrades, so it is recommended that it not be removed.
  • ubuntu-restricted-extras: Introduced in Feisty, this package depends on some commonly used packages in the Ubuntu multiverse repository. It installs support for java, flash, microsoft truetype fonts, and many multimedia codecs.
  • ubuntu-standard: This package depends on all of the packages in the Ubuntu standard system. This set of packages provides a comfortable command-line Unix-like environment.
  • xubuntu-desktop: The XFCE desktop environment, and all the software distributed with Xubuntu

Kernel Metapackages

These metapackages install the latest linux kernel and modules through a series of dependencies. These make upgrading the kernel much easier, and safer, since they ensure that all required modules and headers are also installed.

  • linux-generic: Always depends on the latest generic Linux kernel available.
  • linux-headers-generic: This package always depends on the latest generic kernel headers available.
  • linux-image-generic: This package always depends on the latest generic kernel image available.
  • linux-restricted-modules-generic: This package always depends on the latest restricted modules available for generic kernels.

Obsolete kernel packages:

  • linux-386, linux-686, linux-686-smp
  • linux-k7, linux-k7-smp,
  • linux-amd64-generic, linux-amd64-k8, linux-amd64-k8-smp, linux-amd64-xeon
  • linux-powerpc, linux-powerpc-smp, linux-power3, linux-power3-smp, linux-power4, linux-power4-smp

Language Metapackages

  • language-support-*: Depends on all packages that provide native language support for applications in Ubuntu (like spell checkers, dictionaries, OpenOffice and Mozilla locale packages, etc.).

Creating Metapackages

Below there is a comment about "recommended not to be removed" by Markus Majer. I'll try to address the issue of metapackage removal, and metapackage creation. A metapackage, such as ubuntu-minimal or ubuntu-desktop, can have a long list of dependencies. So, when a metapackage is automatically removed by the removal or purging of any one, or more, of its underlying dependencies, all of the other packages that were in the metapackage's depends list are still installed on the system. If at a later time, there is an upgrade to the metapackage, the upgrade cannot occur, because the metapackage to be upgraded is no longer installed on the system. It may be possible to create a replacement metapackage to enable an upgrade, but some packages may then need to be removed or purged upon the upgrade of the metapackage. A metapackage which defines some Conflict or Replacement dependencies might be able to stop some of the unwanted packages from being reinstalled. Some trickery is needed. To create a metapackage, the equivs package can be used. equivs-control creates a template, and after editing, equivs-build will create the deb file. A dpkg -i *.deb command can install the deb package, or you can create a Personal repository as in Personal|Repositories to let the package managers like apt-get do the work. Note: In the control_file template from equivs-control control_file, conditional-OR-dependencies in "Depends:" are separated by '|', not a comma. For example an ubuntu-minimal dependency statement would be:

Depends: adduser, apt, apt-utils, bzip2, console-setup, debconf, dhcp3-client, eject, gnupg, ifupdown, initramfs-tools, iproute, iputils-ping, kbd | kbd-compat, less, libc6-i686, locales, lsb-release, makedev, mawk, module-init-tools, net-tools, netbase, netcat | netcat-openbsd | netcat-traditional, ntpdate, passwd, procps, python, startup-tasks, sudo | sudo-ldap, sysklogd, system-services, tasksel, tzdata, ubuntu-keyring, udev, upstart, upstart-compat-sysv, upstart-logd, vim-tiny, whiptail

This is what you'd see from apt-cache show ubuntu-minimal.


"recommended not to be removed" Sorry for writing my question here, but that is some very general stuff on what every advanced ubuntu user will stumble - in this text, on the "ubuntu-minimal" package, it is noted: "It is also used to help ensure proper upgrades, so it is recommended that it not be removed." - but this line appears not only there, but in all the descriptions of all ubuntu metapackages - see packages.ubuntu.com or apt-cache show ubuntu-desktop, for example. Me, like many others use alternative software than those which is provided in the ubuntu-desktop metapackage (for example, using Thunderbird or Mutt instead of Evolution) or need more hard disk space, or just want a cleaner install who gets rid of not used software. It should be at least stated here, how it affects upgrading if somebody, for example, deinstalls evolution*, and because of that, also ubuntu-desktop, and why it is recommended not to do so, even somebody never uses some of the tools. The same, perhaps better example of redundant programs, which on deinstalling remove a metapackage are the alsa-* packages in ubuntu-server, which nobody needs on his server at his housing provider or so. Sorry for writing in the official documentation, but I know how many people really have this question. Please write something here about that general question. -- Markus Majer


Please see Forums Thread MetaPackages Info & Discussion