2

EDIT: For the avoidance doubt, this question is not about how to get a list of files that a package installs, as in the suggested duplicate.

Is there a standard way to find out the purpose of a package, that is detailed enough that you can work out what you will get from the package and whether or not it is something that you want?

I'll give a couple of examples to explain what I mean. The first, postgresql-contrib, is what lead me to ask this question. I've come across various installation instructions for PostgreSQL that tell you to install this package in addition to postgresql, without explaining why in any meaningful way (example 1, example 2).

apt-cache show postgresql-contrib only gives me a vague and general description:

additional facilities for PostgreSQL (supported version) This metapackage always depends on the currently supported PostgreSQL database contrib package.

PostgreSQL is a fully featured object-relational database management system. It supports a large part of the SQL standard and is designed to be extensible by users in many aspects. Some of the features are: ACID transactions, foreign keys, views, sequences, subqueries, triggers, user- defined types and functions, outer joins, multiversion concurrency control. Graphical user interfaces and bindings for many programming languages are available as well.

What I'm after is a proper description of what additional facilities I get if I install this package.

Another example is libreoffice-templates, where apt-cache show doesn't provide any useful information about what you'd actually get:

Additional set of templates for LibreOffice
 Additional set of templates for:
  - LibreOffice Calc spreadsheets
  - LibreOffice Writer texts
  - LibreOffice Impress presentations

Is there a standard way of getting more detailed information than apt-cache show gives?

  • I don't see any confusion in "Additional set of templates for Libreoffice" description. These are templates you use/get installed with any office suite – Anwar Apr 27 '17 at 18:14
  • contrib is usually used with packages contributed by 3rd party which depends on non-free softwares. Check here – Anwar Apr 27 '17 at 18:18
  • @Anwar It's not a matter of confusion. It's that the description doesn't tell me anything useful. What kind of templates would I get? Templates for party invitations? Invoices? Business letters? To find out I have to install it. I would like to know what is in a package without needing to install it. Take for example the well written description of the vlc package: "VLC is the VideoLAN project's media player. It plays MPEG, MPEG-2, MPEG-4, DivX, MOV, WMV, QuickTime, WebM, FLAC, MP3, Ogg/Vorbis files, DVDs, VCDs, podcasts, and multimedia streams from various network sources." – Jon Bentley Apr 27 '17 at 18:20
  • @Anwar I know straight away from reading that that I'm getting a media player, and a little summary of some of the main features. I can decide if that seems useful to me or not. "additional facilities for PostgreSQL" tells me nothing. In the case of libreoffice-templates, the description doesn't even tell me anything that I can't guess from the package name itself. – Jon Bentley Apr 27 '17 at 18:21
  • If you're willing to see the contents of a package without installing, it's a duplicate question. If you're complaining that some of the packages' description are vague, it's beyond our doing anything. I suggest reporting bug to the package maintainers for this. Check here – Anwar Apr 27 '17 at 18:27
  • @anwar I hope I don't come across as rude, but I don't think you're reading my question properly. I'm asking if there is a way to get a more detailed description than what apt-cache show provides. A list of files is not a description. If the answer is "no there is nothing else" then that's fine, and I'll accept that. I'm not complaining about a specific description (so reporting a bug isn't appropriate). My question is a general one - the packages I mentioned are just examples. – Jon Bentley Apr 27 '17 at 18:30
  • @Anwar I've removed my side-question to keep my post more narrowly scoped. – Jon Bentley Apr 27 '17 at 18:32
  • Ok, I've answered that part. We all do different kind of things to know about a package. But those aren't official, alogorithmic style way about that. apt-cache show is the most official for this task and regarded as such. – Anwar Apr 27 '17 at 19:00

2 Answers2

2

Let's focus on the first example: postgresql-contrib

This metapackage always depends on the currently supported PostgreSQL database contrib package.

The keyword here is that it is a metapackage. You will find many instances of metapackages in the repository. By itself, metapackages don't really contain anything, so there is nothing to document except what package it points to. If you look at the info provided by apt-cache show postgresql-contrib again, you'll notice there is a line there that shows:

Depends: postgresql-contrib-9.5

The actual documentation you need to look at is contained in this package. The following is the result of apt-cache show postgresql-contrib-9.5:

Package: postgresql-contrib-9.5
Priority: optional
Section: database
Installed-Size: 1999
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Debian PostgreSQL Maintainers <pkg-postgresql-public@lists.alioth.debian.org>
Architecture: amd64
Source: postgresql-9.5
Version: 9.5.6-0ubuntu0.16.04
Depends: postgresql-9.5 (= 9.5.6-0ubuntu0.16.04), libc6 (>= 2.15), libpq5 (>= 9.2~beta3), libselinux1 (>= 2.1.12), libssl1.0.0 (>= 1.0.0), libuuid1 (>= 2.16), libxml2 (>= 2.7.4), libxslt1.1 (>= 1.1.25), zlib1g (>= 1:1.1.4)
Suggests: libdbd-pg-perl
Filename: pool/main/p/postgresql-9.5/postgresql-contrib-9.5_9.5.6-0ubuntu0.16.04_amd64.deb
Size: 446848
MD5sum: a05acc14f59c7d0f98bfc854a90447d7
SHA1: 398b18b8660537ac114eceb1212ff831d911c856
SHA256: 6ef4578df2026a72e9c85715ea112f4077209490beb18e3e715621319d5861f0
Description-en: additional facilities for PostgreSQL
 The PostgreSQL contrib package provides several additional features
 for the PostgreSQL database. This version is built to work with the
 server package postgresql-9.5.  contrib often serves as a testbed for
 features before they are adopted into PostgreSQL proper:
 .
  adminpack      - File and log manipulation routines, used by pgAdmin
  btree_gist     - B-Tree indexing using GiST (Generalised Search Tree)
  chkpass        - An auto-encrypted password datatype
  cube           - Multidimensional-cube datatype (GiST indexing example)
  dblink         - Functions to return results from a remote database
  earthdistance  - Operator for computing the distance (in miles) between
                   two points on the earth's surface
  fuzzystrmatch  - Levenshtein, metaphone, and soundex fuzzy string matching
  hstore         - Store (key, value) pairs
  intagg         - Integer aggregator/enumerator
  _int           - Index support for arrays of int4, using GiST (benchmark
                   needs the libdbd-pg-perl package)
  isn            - type extensions for ISBN, ISSN, ISMN, EAN13 product numbers
  lo             - Large Object maintenance
  ltree          - Tree-like data structures
  oid2name       - Maps OIDs to table names
  pageinspect    - Inspection of database pages
  passwordcheck  - Simple password strength checker
  pg_buffercache - Real time queries on the shared buffer cache
  pg_freespacemap- Displays the contents of the free space map (FSM)
  pg_trgm        - Determine the similarity of text based on trigram matching
  pg_standby     - Create a warm stand-by server
  pgbench        - TPC-B like benchmark
  pgcrypto       - Cryptographic functions
  pgrowlocks     - A function to return row locking information
  pgstattuple    - Returns the percentage of dead tuples in a table; this
                   indicates whether a vacuum is required.
  postgresql_fdw - foreign data wrapper for PostgreSQL
  seg            - Confidence-interval datatype (GiST indexing example)
  sepgsql        - mandatory access control (MAC) based on SELinux
  spi            - PostgreSQL Server Programming Interface; 4 examples of
                   its use:
                   autoinc    - A function for implementing AUTOINCREMENT/
                                IDENTITY
                   insert_username - function for inserting user names
                   moddatetime - Update modification timestamps
                   refint     - Functions for implementing referential
                                integrity (foreign keys).  Note that this is
                                now superseded by built-in referential
                                integrity.
                   timetravel - Re-implements in user code the time travel
                                feature that was removed in 6.3.
  tablefunc      - examples of functions returning tables
  uuid-ossp      - UUID generation functions
  vacuumlo       - Remove orphaned large objects
 .
 PostgreSQL is an object-relational SQL database management system.
Description-md5: 633a4e0645b2b02e72f77a260d0f4030
Homepage: http://www.postgresql.org/
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu
Supported: 5y
Task: postgresql-server

You will notice that the documentation for the actual package is way more detailed.

  • Ah! You have written about a good point. +1. But it is true that some packages have vague description. Though they are not very common – Anwar Apr 27 '17 at 19:37
  • Thanks, that's very helpful. I'll +1 this and accept Anwar's answer as it addresses the more general point, but this answer takes care of a likely cause of the problem in a lot of cases. – Jon Bentley Apr 27 '17 at 19:49
1

From a general user's perspective, who just come to know a package name, his/her primary source of information on what this does is checking apt-cache show command. I always do so. This is the definitive and official way to discover a package's intent. Just like the man command to know about a command.

However, it is not the only way. Of course there are many other way to know about a package. But those aren't a cookbook style guide to follow. What usually I do is checking the homepage of the package description. I use synaptic package manage and there is a link for each package description. This should land you to the home page of the package or the (debian package) maintainer's page.

I also use https://packages.ubuntu.com to see the content and find other related links to the package. You can go to the launchpad page from it and then you can find the upstream/original developer's link. If still unsure, you can contact the mailing list, ask a question or even the developers. You can check the filelist and see what that package contains and then use some searching to find what they do.

For example, When I used postgresql-contrib package in the packages.ubuntu.com, I've found this file list. Now, it's just a goggle search to check what those commands do. For example, searching for pg_archivecleanup yields this result in google. You should get a very good general sense about the purpose of the package from there. Another very good way to know about that command is using man, but if the package isn't installed yet, then you may need to use http://manpages.ubuntu.com/ instead.

There may have other ways to find a package's purpose. Most of the people in Linux world follow this rather path. Having being said, if you're asking if there is a definitive way beyond apt-cache show or apt show, then I'd say No. A debian package's description was supposed to be the official and first source of a package's purpose.

Anwar
  • 76,649
  • Thanks. Expanding on one of your suggestions, I suppose a reasonable method might be seeing what files end up in a bin folder and then perusing the man pages for those commands. – Jon Bentley Apr 27 '17 at 19:04
  • @JonBentley yes, excellent! I actually thought about man too. But lost the string between threads of thoughts. Adding it to the answer – Anwar Apr 27 '17 at 19:05