swim - chapter 6
IMPORTANT DEBIAN DATABASES FOR NOT-INSTALLED DATABASES


6.1 A. downloading the important databases with --ftp.

usage: swim --ftp

options: --Contents <DF|directory>
         --Packages <DF|directory> 
         [--dists <distribution>] [--arch <architecture>]
         [--onec] [--Release_only]

6.2 OVERVIEW

swim provides a method so that all information about an existing Debian distribution is quickly accessible through databases. Debian already provides flat file databases for all its distributions. One database called ``Contents-(architecture)'' provides a complete listing of all the files associated with each package, the other much more important database called ``Packages'' provides everything from the Package's description, to all the dependencies for that package. The Packages database is a crucial database for other important Debian administrative tools like dpkg and apt.

6.3 DISTRIBUTION DEFINED

Debian Distributions choose a name which reflect the development state of that distribution. The distribution named ``unstable'' is where the majority of the development processing occurs, after unstable has reached a certain level of maturity, it's copied over to a new distribution called ``frozen'' which is tested extensively before becoming the new ``stable'' distribution. The frozen distribution retains the Release version number of the unstable distribution, and the unstable distribution receives a new Release version number. Eventually, frozen becomes stable, and at this point both frozen, and the older stable distribution are removed. Code names are associated with the Release Version number given for each of the distributions. This is much better for mirroring Debian sites.

swim was designed to ignore these code names, and instead shows the user the Release version number associated with the distribution. Swim users must always use the real distribution name, or swim will not work properly. This is a nice feature because it allows user to make decisions related to the management of their databases, and makes research much more easier.

The other Debian distribution which swim recognizes is experimental. This distribution does not have any Release version number, and contains packages which are considered risky because of their development level.


6.4 SECTIONS

Each Debian distribution has sections related to the relationship of each of the packages to the Debian's Policy Manual. In ``main'' there are packages which have a correct relationship with these Policies. Packages in ``contrib'' comply with the DFSG (Debian Free Software Guidelines found in the Debian Policy Manual) but have various limitations like requiring a package which is found in non-free, or is not in the Debian archive. Packages in ``non-free'' do not comply with the DFSG but are electronically distributable across international borders. The ``non-us'' section is found outside of the United States and exists for packages which have export restrictions.


6.5 ARCHITECTURES

Distributions also have architecture specific sections since not all packages compiled for one architecture can run on all other archictectures, however, there are a large percentage of packages which do run on all architectures. The architectures are alpha, arm, i386, m68k, powerpc, sparc, and more recently hurd-i386 which represents packages for the hurd GNU kernel for the i386 architecture.


6.6 SWIMZ.LIST

--ftp uses a file called swimz.list which has the same type of format (see format below) as the sources.list(5) which apt uses. There are some differences. The first difference mentioned above (see DISTRIBUTION DEFINED , section 6.3) requires that the distribution names never should be the code names for the Release version. Secondly, apt only retrieves databases specific to one archictecture, normally the one you are running apt on. With swim though you can fetch databases for any, or every architecture by adding the architecture to ``deb'' with a hyphen (deb-hurd-i386). If deb has no architecture appended it is assumed that the architecture you want is the same as the system you are running swim on. Thirdly, at this time swim only supports the ftp method. Fourthly, you can change swimz.list as often as you want without worrying about databases being removed so that that the swimz.list and the downloaded databases match. This would occur with apt's sources.list(5) if you removed a site. Fifthly, databases are kept in a compressed state. Sixthly because the list is used for both Contents and Packages, more flexibility is provided by only allowing the default distribution/archictecture or distribution/architecture provided on the commandline to be downloaded.

For apt users: If you are using apt, and swim together it is a good strategy to use the real distribution name in the sources list(8), and to have an exact copy of the sources.list(5) ftp sites in the swimz.list. Packages databases specific to the architecture apt is using can be retrieved using swim --apt --update (this also will keep track of the Release version), and then swim can be used to fetch the architecture specific Contents database as shown below. It should also be of interest to note that Packages downloaded by either swim or apt can be used interchangeably by using 'cp -a' and 'gzip -d' or 'gzip -9'.

Here is a brief outline of the format required by swimz.list.

deb uri distribution [section ... ]

deb - represents a standard Debian distribution. And is simply written as deb or with the architecture appended (deb or deb-alpha).

uri - Universal Resource Identifier is exactly how you would enter an address into a web browser. This address is the base of a Debian distribution, generally this is right before the directory called ``dists''. So if dists is found in /stuff/pub/debian/dists, and the site is somewhere.com then the uri would be ftp://somewhere.com/stuff/pub/debian.

distribution - This can be unstable, frozen, stable, experimental. Distribution can also be a path which must end with a slash like unstable/binary-i386/. This is used when there is no section as in the experimental distribution or in sites which do not have symlinks to the non-us section. No section would be mentioned in this situation.

section - main, contrib, non-free, non-US (write it this way).


6.7 SWIMZ.LIST EXAMPLES

Examples (each on one line):

deb-alpha ftp://somewhere.com/stuff/pub/debian unstable main contrib non-US

This will fetch the alpha databases from somewhere.com for the unstable distribution for the main, contrib and non-US sections.

Note: In these next two examples you can not append any architecture to deb with a hyphen.

deb ftp://somewhere.com/stuff/pub/debian project/experimental/

This will fetch the experimental database, but there is not a Contents-(architecture) database for this distribution. Notice that it ends with a slash.

deb ftp://somewhere.com/stuff/pub/debian-non-US stable/binary-i386/

This will fetch the i386 databases for the stable distribution for non-us,


6.8 FTP OR APT?

How you use major mode --ftp depends on your goals. Even if you are using apt, you may be interested in keeping tabs on different architectures. In this case you would have to download the Packages databases specific to these architectures. If you are only interested in the architecture which apt is interested in, then you only need to use --ftp to fetch the Contents database(s). But, because it isn't a requirement to set up a virtual filesystem, you are not required to fetch the Contents database. The advantages of fetching the Contents database is determined by the method you choose to make the database (see MAKING NOT-INSTALLED DATABASES , chapter 7). These advantages include the ability to view a listing of the files and directories associated with a package, the ability to query files and directories to find out which packages relate to them, and the ability to perform a powersearch on all the files and directories to find the associated packages.


6.9 OPTIONS

Remember: If you want to download a different distribution/architecture other than the default specified in your configuration file, you must specify this on the commandline.

--Packages determines where you want the Packages database as well as the Release data put when they are downloaded. The DF argument implies that the databases will be put in your default directory (see swimrc(5)). These databases can later be located by the major modes --initndb and --rebuildndb just by using DF as an argument. Alternatively, these databases can be put in any directory you choose by providing a directory as an argument.

--Contents determines where you want the Content-(architecture) database(s) put. (see --Packages).

--onec will download only one Contents-arch per distribution/architecture specified on the commandline or by default.

--Release_only will download only the Release data for the swimz.list or particular Package(s) mentioned on the command line.

--dists will only find the distribution which corresponds to the argument provided this option.

--arch will only find the architecture which corresponds to the argument provided this option. The different architecture needs to be specified in swimz.list with a hyphen and the architecture appended to deb (deb-(arch)).


6.10 B. downloading the important databases with apt, and maintenance options.

usage: swim --apt

options: [--update] [--clean] [--autoclean] [--check]

Please read A. downloading the important databases with --ftp. , section 6.1 for more information.

--update calls apt to download the Packages databases.

--clean is a call to an apt option to remove any packages stored in apt's storage area for downloaded packages. The default for this storage area is /var/cache/apt/arhives

--autoclean will only clean out packages which are not found in apt's cache.

--check tests and updates apt's cache.


swim - Copyright © 1999 Jonathan D. Rosenbaum
Contents; next; back.
15 June 1999
Jonathan D. Rosenbaummttrader@access.mountain.net