APT Testers..
Hi all,
I have reached a point where I would like it if a few brave people could
give the new version a spin to ensure that it does what it has always
done, still. APT is so large now that I cannot completely test it on my
own in reasonable time :>
This version appears to work, at least my testing suggests it does :>
It is not totally complete and is not really fit for gerneral use just
yet, but at most it will act a bit weird and not hurt anything.
There is also a new apt-utils deb which notably contains apt-ftparchive
which is what is running ftp.debian.org and non-us.debian.org, it is a
performance optimized dpkg-scanpackages, dpkg-scansources and mkcontents.
python-apt is also packaged also available, but undocumented (and
incomplete).
People using APT in other programs will note that this release should hold
the new API fairly constant throughout the 0.4 series, within the usual
fiddling, but represents a substantial source incompatible change from the
0.3 series. The document libapt-pkg2_to_3.txt details the changes.
Can be had at:
deb http://klecker.debian.org/~jgg apt/
You will need to use potato debconf, and remove all APT front ends for
the time being..
Changelog and the semi interesting apt_preferences man page are attached.
Jason
apt (0.4.0) frozen unstable; urgency=low
* Fixed an obscure bug with missing final double new lines in
package files
* Changed the apt-cdrom index copy routine to use the new section
rewriter
* Added a package file sorter, apt-sortpkgs
* Parse obsolete Optional dependencies.
* Added Ben's rsh method. Closes: #57794
* Added IPv6 FTP support and better DNS rotation support.
* Include the server IP in error messages when using a DNS rotation.
Closes: #64895
* Made most of the byte counters into doubles to prevent 32bit overflow.
Closes: #65349
* HTTP Authorization. Closes: #61158
* Ability to parse and return source index build depends from Randolph.
* new 'apt-get build-dep' command from Randolph. Closes: #63982
* Added apt-ftparchive the all dancing all singing FTP archive
maintinance program
* Allow version specifications with /1.2.4-3 and =2.2 or =stable postfixes
in apt-get.
* Removed useless internal cruft including the xstatus file.
* Fixed config parser bugs. Closes: #67848, #71108
* Brain Damanged apt-get config options changed, does not change the command
line interface, except to allow --enable-* to undo a configuration
option:
No-Remove -> Remove
No-Download -> Download
No-Upgrade -> Upgrade
* Made this fix configable (DSelect::CheckDir) and default to disabled:
* No remove prompt if the archives dir has not changed. Closes: #55709
Because it is stupid in the case where no files were downloaded due to
a resumed-aborted install, or a full cache! Closes: #65952
* Obscure divide by zero problem. Closes: #64394
* Update sizetable for mips. Closes: #62288
* Fixed a bug with passive FTP connections
* Has sizetable entry for sparc64. Closes: #64869
* Escape special characters in the ::Label section of the cdroms.lst
* Created apt-utils and python-apt packages
* Due to the new policy engine, the available file may contain entries
from the status file. These are generated if the package is not obsolete
but the policy engine prohibits using the version from the package files.
They can be identified by the lack of a Filename field.
* The new policy engine. Closes: #66509, #66944, #45122, #45094, #40006,
#36223, #33468, #22551
* Fixed deb-src line for non-us. Closes: #71501, #71601
* Fixes for G++ 2.96, s/friend/friend class/
* Fixed mis doc of APT::Get::Fix-Missing. Closes: #69269
* Confirmed fix for missing new line problem. Closes: #69386
* Fixed up dhelp files. Closes: #71312
* Added some notes about dselect and offline usage. Closes: #66473, #38316
* Lock files on read only file systems are ignored w/ warning.
Closes: #61701
* apt-get update foo now gives an error! Closes: #42891
* Added test for shlibs on hurd. Closes: #71499
* Clarified apt-cache document. Closes: #71934
* DocBook SGML man pages and some improvements in the text..
* sigwinch thing. Closes: #72382
* Caching can be turned off by setting the cache file names blank.
* Ignores arches it does not know about when autocleaning. Closes: #72862
* New function in apt-config to return dirs, files, bools and integers.
apt_preferences
Name
apt_preferences -- Preference control file for APT
Description
The APT preferences file controls various aspects of the APT system.
It is ment to be user editable and manipulatable from software. The
file consists of a number of records formed like the dpkg status file,
space seperated sections of text with at the start of each line tags
seperated by a colon. It is stored in /etc/apt/preferences.
Versioning
One purpose of the preferences file is to let the user select which
version of a package will be installed. This selection can be made in
a number of ways that fall into three categories, version, release and
origin.
Selection by version can be done by exact match or prefix match. The
format is 2.1.2 or 2.2* for a prefix match. Matching by prefix can be
used to ignore the r in the Debian release versioning, like 2.1r* or
to ignore Debian specific revisions, 1.1-*. When matching versions
with a prefix the highest matching version will always be picked.
Selection by release is more complicated and has three forms. The
primary purpose of release selections is to identify a set of packages
that match a specific vendor, or release (ie Debian 2.1). The first
two forms are shortcuts intended for quick command line use. If the
first character of the specification is a digit then it is considered
to be a release version match, otherwise a release label match.
Specifications which contain equals are full release data matches and
are a comma seperated list of one letter keys followed by an equals
then by the string. Examples:
v=2.1*,o=Debian,c=main
l=stable
a=Debian
The data for these matches are taken from the Release files that APT
downloads during an update. The available keys are:
a= Archive
This is the common name we give our archives, such as stable or
unstable.
c= Component
Referes to the sub-component of the archive, main, contrib etc.
Component may be omitted if there are no components for this
archive.
v= Version
This is a version string with the same properties as in the
Packages file. It represents the release level of the archive.
Typical Debian release numbers look like 2.1r2 with the r
designating the release of 2.1. New releases are limited to
security updates.
o= Origin
This specifies who is providing this archive. In the case of
Debian the string will read Debian. Other providers may use
their own string.
, l= Label
This carries the encompassing name of the distribution. For
Debian proper this field reads Debian. For derived
distributions it should contain their proper name.
The final selection method is by origin. This is simply the site name
of the originating package files. The empty string is used for file
URIs.
Version selection, particularly the latter two methods, are used in
may different part of APT, not just the preferences file.
Candidate Version Policy
Interaly APT maintains a list of all available versions for all
packages. If you place multiple releases or vendors in your
sources.list(5) file then these features are available. By default APT
selects the highest version from all automatic sources. Some sources,
such as project/experimental are marked Not Automatic - these fall to
the bottom of the selection pile.
When deciding what version to use APT assigns a priority to each
available version of the package. It then does two things, first it
selects the highest priorty version that is newer than the installed
version of the package, then it selects the highest priority version
that is older than the installed version. Next, if the older versions
have a priority greater than 1000 they are compared with the priority
of the upgrade set, the larger becomes the selected result. Otherwise
the downgrade versions are ignored and the highest priority of the
ugprade set is selected.
It is possible to think of the priorities in strata:
1000 and up
Downgradable priorities
1000
The downgrade prevention barrier
100 to 1000
Standard priorities. 990 is the priority set by the
--target-dist apt-get(8) option. 989 is the start for auto
priorities and 500 are all the default package files.
100
The currently installed version
0 to 100
Non automatic priorities. These are only used if the package is
not installed and there is no other version available.
less than 0
The version is never selected.
Giving a pin a priority greater than 1000 will allow APT to downgrade
in order to get to that version.
Each package may be pinned to a specific version and each Package file
has a priority for every package inside. The highest priority assigned
to a package is the one that is used.
A package pin looks like this:
Package: apt
Pin: version 0.4.0
Pin-Priority: 1001
The first line specifies the package, the second gives the Pin
specification and the last gives the priority of this pin. The first
word of the pin specification may be version, release or origin, the
remainder of the field is described in the Versioning sectin above.
A default pin is how the priorities of package files are set. Any
number of default pins may be specified, the first matching default
will select the priority of the package file. Only release or origin
may be used in the Pin specification since they match Package files.
Package: *
Pin: release v=2.1*
Pin-Priority: 998
If the Pin-Priorty field is omitted then the priority defaults to 989
for both cases.
Interesting Effects
Due to the downgrade prevention barrier at priority 1000 it is
possible that a lower priority version will be selected if the higher
priority would casue a downgrade. For instance, if package foo has
versions 1.2, 1.1 and 1.0 installed, with 1.1 being the currently
installed version and the priorities of each version being 900, 100
and 950 repectively the winning version will be 1.2.
In practice this is often desired. A user may use a default pin to
make the stable distribution the default and then use the
--target-dist option with apt-get(8) to select newer versions from
unstable. The packages that have been upgraded to unstable will
continue to follow the versions that are available in unstable since
the stable versions now fall below the downgrade prevention barrier.
If this is not desired then a default pin should be used to make
unstable have a priority less than 100.
Users of 3rd party add ons such as Helix GNOME can use this mechanism
to force the usage of Helix packages, or force the usage of Debian
packages by setting the priority of that source sufficiently high. It
is even possible to mass downgrade from one set of packages to another
by using a priority larger than 1000.
See Also
apt-cache(8) apt.conf(5)
Bugs
See the APT bug page. If you wish to report a bug in apt-cdrom, please
see /usr/doc/debian/bug-reporting.txt or the bug(1) command.
Author
APT was written by the APT team <apt@packages.debian.org>.
Reply to: