summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorIan Jackson <ian@chiark.chu.cam.ac.uk>1996-05-16 00:01:21 +0100
committerIan Jackson <ian@chiark.chu.cam.ac.uk>1996-05-16 00:01:21 +0100
commitd4d3484ac88ca3953fef3cf2c0464cdc776b6574 (patch)
treeab15ab1e585e5c1d97b44f7b880af96632b1f08c /main
parent258ed6ae6ff639a76b534353fcc502d4ca97ca8c (diff)
downloaddpkg-d4d3484ac88ca3953fef3cf2c0464cdc776b6574.tar.gz
dpkg (1.2.0); priority=MEDIUM
* dselect can sort packages by available and installed states, and display their version numbers. (Use O, o and V.) * Hold is properly integrated as a real `wanted state', rather than a separate flag. * Epochs in version numbers implemented, using the syntax <epoch>:<version>-<revision>. (Epoch not usually displayed.) * dselect disk method is architecture-independent (uses dpkg's installation architecture, and looks in the right part of the tree). * dselect disk method doesn't try to satisfy the predependencies of packages which are on hold. * Fixed conflict-related assertion failure. (Bug#2784.) * conffiles do not cause file conflicts if the conflicting package is in the `configuration only' state. (Bug#2720.) * Fixed messages where available version number was reported as installed version in conflict and dependency messages. (Bug#2654, Bug#2974.) * New format .deb files are default even for a.out compiles (but a.out version of dpkg is in old format). * Characters @:= (at colon equals) in package names now strictly forbidden everywhere (_ is still allowed in existing packages). * New dpkg --print-installation-architecture option prints installation architecture (compiled in), rather than build architecture (determined from gcc -print-libgcc-file-name). * Version messages show whether compiled a.out or ELF (i386 only). * Fixed missing space in version syntax error messages. * Manpage dpkg.8 installed with warning about inaccuracy. * Guidelines don't say to stop and restart daemons in runlevels 2345; instead they say to start in 2345 and stop in 016. * Guidelines and version messages say just Debian Linux. * Guidelines typo fix `"stop2' => `"stop"'. (Bug#2867.) * doc/Makefile.in clean properly deletes various guidelines.info* files. -- Ian Jackson <ian@chiark.chu.cam.ac.uk> Thu, 16 May 1996 00:01:21 +0100
Diffstat (limited to 'main')
-rw-r--r--main/archives.c142
-rw-r--r--main/cleanup.c28
-rw-r--r--main/configure.c4
-rw-r--r--main/depcon.c72
-rw-r--r--main/dpkg.8619
-rw-r--r--main/dpkg.8-null20
-rw-r--r--main/dpkg.8-vuori588
-rw-r--r--main/enquiry.c18
-rw-r--r--main/errors.c2
-rw-r--r--main/help.c8
-rw-r--r--main/main.c15
-rw-r--r--main/main.h8
-rw-r--r--main/packages.c8
-rw-r--r--main/processarc.c54
-rw-r--r--main/remove.c6
15 files changed, 802 insertions, 790 deletions
diff --git a/main/archives.c b/main/archives.c
index 7b17e2081..fa1d286ec 100644
--- a/main/archives.c
+++ b/main/archives.c
@@ -137,12 +137,12 @@ static int does_replace(struct pkginfo *newpigp,
struct dependency *dep;
debug(dbg_depcon,"does_replace new=%s old=%s (%s)",newpigp->name,
- oldpigp->name,versiondescribe(oldpigp->installed.version,
- oldpigp->installed.revision));
+ oldpigp->name,versiondescribe(&oldpigp->installed.version,
+ vdew_always));
for (dep= newpifp->depends; dep; dep= dep->next) {
if (dep->type != dep_replaces || dep->list->ed != oldpigp) continue;
debug(dbg_depcondetail,"does_replace ... found old, version %s",
- versiondescribe(dep->list->version,dep->list->revision));
+ versiondescribe(&dep->list->version,vdew_always));
if (!versionsatisfied(&oldpigp->installed,dep->list)) continue;
debug(dbg_depcon,"does_replace ... yes");
return 1;
@@ -339,6 +339,11 @@ int tarobject(struct TarInfo *ti) {
}
/* Nope ? Hmm, file conflict, perhaps. Check Replaces. */
if (otherpkg->clientdata->replacingfilesandsaid) continue;
+ /* Is the package with the conflicting file in the `config files
+ * only' state ? If so it must be a config file and we can
+ * silenty take it over.
+ */
+ if (otherpkg->status == stat_configfiles) continue;
/* Perhaps we're removing a conflicting package ? */
if (otherpkg->clientdata->istobe == itb_remove) continue;
if (does_replace(tc->pkg,&tc->pkg->available,otherpkg)) {
@@ -547,75 +552,82 @@ void check_conflict(struct dependency *dep, struct pkginfo *pkg,
varbuffree(&removalwhy);
return;
}
- if (fixbyrm &&
- ((pkg->available.essential && fixbyrm->installed.essential) ||
- ((fixbyrm->want != want_install || does_replace(pkg,&pkg->available,fixbyrm)) &&
- (!fixbyrm->installed.essential || fc_removeessential)))) {
+ if (fixbyrm) {
ensure_package_clientdata(fixbyrm);
- assert(fixbyrm->clientdata->istobe == itb_normal);
- fixbyrm->clientdata->istobe= itb_remove;
- fprintf(stderr, DPKG ": considering removing %s in favour of %s ...\n",
- fixbyrm->name, pkg->name);
- if (fixbyrm->status != stat_installed) {
- fprintf(stderr,
- "%s is not properly installed - ignoring any dependencies on it.\n",
- fixbyrm->name);
- pdep= 0;
- } else {
- for (pdep= fixbyrm->installed.depended;
- pdep;
- pdep= pdep->nextrev) {
- if (pdep->up->type != dep_depends && pdep->up->type != dep_predepends) continue;
- if (depisok(pdep->up, &removalwhy, 0,0)) continue;
- varbufaddc(&removalwhy,0);
- if (!try_remove_can(pdep,fixbyrm,removalwhy.buf))
- break;
- }
- if (!pdep) {
- /* If we haven't found a reason not to yet, let's look some more. */
- for (providecheck= fixbyrm->installed.depends;
- providecheck;
- providecheck= providecheck->next) {
- if (providecheck->type != dep_provides) continue;
- for (pdep= providecheck->list->ed->installed.depended;
- pdep;
- pdep= pdep->nextrev) {
- if (pdep->up->type != dep_depends && pdep->up->type != dep_predepends)
- continue;
- if (depisok(pdep->up, &removalwhy, 0,0)) continue;
- varbufaddc(&removalwhy,0);
- fprintf(stderr, DPKG
- ": may have trouble removing %s, as it provides %s ...\n",
- fixbyrm->name, providecheck->list->ed->name);
- if (!try_remove_can(pdep,fixbyrm,removalwhy.buf))
- goto break_from_both_loops_at_once;
+ if (fixbyrm->clientdata->istobe == itb_installnew) {
+ fixbyrm= dep->up;
+ ensure_package_clientdata(fixbyrm);
+ }
+ if (((pkg->available.essential && fixbyrm->installed.essential) ||
+ (((fixbyrm->want != want_install && fixbyrm->want != want_hold) ||
+ does_replace(pkg,&pkg->available,fixbyrm)) &&
+ (!fixbyrm->installed.essential || fc_removeessential)))) {
+ assert(fixbyrm->clientdata->istobe == itb_normal);
+ fixbyrm->clientdata->istobe= itb_remove;
+ fprintf(stderr, DPKG ": considering removing %s in favour of %s ...\n",
+ fixbyrm->name, pkg->name);
+ if (fixbyrm->status != stat_installed) {
+ fprintf(stderr,
+ "%s is not properly installed - ignoring any dependencies on it.\n",
+ fixbyrm->name);
+ pdep= 0;
+ } else {
+ for (pdep= fixbyrm->installed.depended;
+ pdep;
+ pdep= pdep->nextrev) {
+ if (pdep->up->type != dep_depends && pdep->up->type != dep_predepends)
+ continue;
+ if (depisok(pdep->up, &removalwhy, 0,0)) continue;
+ varbufaddc(&removalwhy,0);
+ if (!try_remove_can(pdep,fixbyrm,removalwhy.buf))
+ break;
+ }
+ if (!pdep) {
+ /* If we haven't found a reason not to yet, let's look some more. */
+ for (providecheck= fixbyrm->installed.depends;
+ providecheck;
+ providecheck= providecheck->next) {
+ if (providecheck->type != dep_provides) continue;
+ for (pdep= providecheck->list->ed->installed.depended;
+ pdep;
+ pdep= pdep->nextrev) {
+ if (pdep->up->type != dep_depends && pdep->up->type != dep_predepends)
+ continue;
+ if (depisok(pdep->up, &removalwhy, 0,0)) continue;
+ varbufaddc(&removalwhy,0);
+ fprintf(stderr, DPKG
+ ": may have trouble removing %s, as it provides %s ...\n",
+ fixbyrm->name, providecheck->list->ed->name);
+ if (!try_remove_can(pdep,fixbyrm,removalwhy.buf))
+ goto break_from_both_loops_at_once;
+ }
}
+ break_from_both_loops_at_once:;
}
- break_from_both_loops_at_once:;
}
- }
- if (!pdep && skip_due_to_hold(fixbyrm)) {
- pdep= &flagdeppossi;
- }
- if (!pdep && (fixbyrm->eflag & eflagf_reinstreq)) {
- if (fc_removereinstreq) {
- fprintf(stderr, DPKG ": package %s requires reinstallation, but will"
- " remove anyway as you request.\n", fixbyrm->name);
- } else {
- fprintf(stderr, DPKG ": package %s requires reinstallation, will not remove.\n",
- fixbyrm->name);
+ if (!pdep && skip_due_to_hold(fixbyrm)) {
pdep= &flagdeppossi;
}
+ if (!pdep && (fixbyrm->eflag & eflagf_reinstreq)) {
+ if (fc_removereinstreq) {
+ fprintf(stderr, DPKG ": package %s requires reinstallation, but will"
+ " remove anyway as you request.\n", fixbyrm->name);
+ } else {
+ fprintf(stderr, DPKG ": package %s requires reinstallation, "
+ "will not remove.\n", fixbyrm->name);
+ pdep= &flagdeppossi;
+ }
+ }
+ if (!pdep) {
+ /* This conflict is OK - we'll remove the conflictor. */
+ *conflictorp= fixbyrm;
+ varbuffree(&conflictwhy); varbuffree(&removalwhy);
+ fprintf(stderr, DPKG ": yes, will remove %s in favour of %s.\n",
+ fixbyrm->name, pkg->name);
+ return;
+ }
+ fixbyrm->clientdata->istobe= itb_normal; /* put it back */
}
- if (!pdep) {
- /* This conflict is OK - we'll remove the conflictor. */
- *conflictorp= fixbyrm;
- varbuffree(&conflictwhy); varbuffree(&removalwhy);
- fprintf(stderr, DPKG ": yes, will remove %s in favour of %s.\n",
- fixbyrm->name, pkg->name);
- return;
- }
- fixbyrm->clientdata->istobe= itb_normal; /* put it back */
}
varbufaddc(&conflictwhy,0);
fprintf(stderr, DPKG ": regarding %s containing %s:\n%s",
diff --git a/main/cleanup.c b/main/cleanup.c
index b12e3cf16..a7057805e 100644
--- a/main/cleanup.c
+++ b/main/cleanup.c
@@ -104,8 +104,8 @@ void cu_prermupgrade(int argc, void **argv) {
if (cleanup_pkg_failed++) return;
maintainer_script_installed(pkg,POSTINSTFILE,"post-installation",
"abort-upgrade",
- versiondescribe(pkg->available.version,
- pkg->available.revision),
+ versiondescribe(&pkg->available.version,
+ vdew_nonambig),
(char*)0);
pkg->status= stat_installed;
pkg->eflag &= ~eflagf_reinstreq;
@@ -128,11 +128,11 @@ void cu_prermdeconfigure(int argc, void **argv) {
maintainer_script_installed(deconf,POSTINSTFILE,"post-installation",
"abort-deconfigure", "in-favour", infavour->name,
- versiondescribe(infavour->available.version,
- infavour->available.revision),
+ versiondescribe(&infavour->available.version,
+ vdew_nonambig),
"removing", conflictor->name,
- versiondescribe(conflictor->installed.version,
- conflictor->installed.revision),
+ versiondescribe(&conflictor->installed.version,
+ vdew_nonambig),
(char*)0);
deconf->status= stat_installed;
modstatdb_note(deconf);
@@ -145,8 +145,8 @@ void cu_prerminfavour(int argc, void **argv) {
if (cleanup_conflictor_failed++) return;
maintainer_script_installed(conflictor,POSTINSTFILE,"post-installation",
"abort-remove", "in-favour", infavour->name,
- versiondescribe(infavour->available.version,
- infavour->available.revision),
+ versiondescribe(&infavour->available.version,
+ vdew_nonambig),
(char*)0);
conflictor->status= stat_installed;
conflictor->eflag &= ~eflagf_reinstreq;
@@ -175,8 +175,8 @@ void cu_preinstnew(int argc, void **argv) {
if (cleanup_pkg_failed++) return;
maintainer_script_new(POSTRMFILE,"post-removal",cidir,cidirrest,
- "abort-install", versiondescribe(pkg->installed.version,
- pkg->installed.revision),
+ "abort-install", versiondescribe(&pkg->installed.version,
+ vdew_nonambig),
(char*)0);
pkg->status= stat_configfiles;
pkg->eflag &= ~eflagf_reinstreq;
@@ -193,8 +193,8 @@ void cu_preinstupgrade(int argc, void **argv) {
if (cleanup_pkg_failed++) return;
maintainer_script_new(POSTRMFILE,"post-removal",cidir,cidirrest,
"abort-upgrade",
- versiondescribe(pkg->installed.version,
- pkg->installed.revision),
+ versiondescribe(&pkg->installed.version,
+ vdew_nonambig),
(char*)0);
pkg->status= *oldstatusp;
pkg->eflag &= ~eflagf_reinstreq;
@@ -207,8 +207,8 @@ void cu_postrmupgrade(int argc, void **argv) {
if (cleanup_pkg_failed++) return;
maintainer_script_installed(pkg,PREINSTFILE,"pre-installation",
- "abort-upgrade", versiondescribe(pkg->available.version,
- pkg->available.revision),
+ "abort-upgrade", versiondescribe(&pkg->available.version,
+ vdew_nonambig),
(char*)0);
cleanup_pkg_failed--;
}
diff --git a/main/configure.c b/main/configure.c
index 6ec20cfea..f56348bda 100644
--- a/main/configure.c
+++ b/main/configure.c
@@ -378,8 +378,8 @@ void deferred_configure(struct pkginfo *pkg) {
if (maintainer_script_installed(pkg, POSTINSTFILE, "post-installation",
"configure",
- versiondescribe(pkg->configversion,
- pkg->configrevision),
+ versiondescribe(&pkg->configversion,
+ vdew_nonambig),
(char*)0))
putchar('\n');
diff --git a/main/depcon.c b/main/depcon.c
index 7e90464a5..389ff4daf 100644
--- a/main/depcon.c
+++ b/main/depcon.c
@@ -30,12 +30,12 @@
#include "main.h"
-int versionsatisfied5(const char *itver, const char *itrev,
- const char *refver, const char *refrev,
+int versionsatisfied3(const struct versionrevision *it,
+ const struct versionrevision *ref,
enum depverrel verrel) {
int r;
if (verrel == dvr_none) return 1;
- r= versioncompare(itver,itrev,refver,refrev);
+ r= versioncompare(it,ref);
switch (verrel) {
case dvr_earlierequal: return r <= 0;
case dvr_laterequal: return r >= 0;
@@ -47,27 +47,7 @@ int versionsatisfied5(const char *itver, const char *itrev,
}
int versionsatisfied(struct pkginfoperfile *it, struct deppossi *against) {
- return versionsatisfied5(it->version, it->revision,
- against->version, against->revision, against->verrel);
-}
-
-const char *versiondescribe(const char *ver, const char *rev) {
- static char bufs[10][512];
- static int bufnum=0;
- char *buf;
-
- buf= bufs[bufnum]; bufnum++; if (bufnum == 10) bufnum= 0;
-
- if (!ver || !*ver) {
- strcpy(buf,"<unknown>");
- } else {
- if (rev && *rev) {
- sprintf(buf, "%.250s-%.250s", ver, rev);
- } else {
- sprintf(buf, "%.250s", ver);
- }
- }
- return buf;
+ return versionsatisfied3(&it->version,&against->version,against->verrel);
}
struct cyclesofarlink {
@@ -245,30 +225,28 @@ int depisok(struct dependency *dep, struct varbuf *whynot,
* the end we'll have accumulated all the reasons in whynot and
* can return `0'.
*/
-
+
for (possi= dep->list; possi; possi= possi->next) {
switch (possi->ed->clientdata->istobe) {
case itb_remove:
- sprintf(linebuf, " %.250s is to be removed.\n", possi->ed->name);
+ sprintf(linebuf," %.250s is to be removed.\n",possi->ed->name);
break;
case itb_deconfigure:
- sprintf(linebuf, " %.250s is to be deconfigured.\n", possi->ed->name);
+ sprintf(linebuf," %.250s is to be deconfigured.\n",possi->ed->name);
break;
case itb_installnew:
- if (versionsatisfied(&possi->ed->available, possi)) return 1;
- sprintf(linebuf, " %.250s is to be installed, but is version %.250s.\n",
+ if (versionsatisfied(&possi->ed->available,possi)) return 1;
+ sprintf(linebuf," %.250s is to be installed, but is version %.250s.\n",
possi->ed->name,
- versiondescribe(possi->ed->available.version,
- possi->ed->available.revision));
+ versiondescribe(&possi->ed->available.version,vdew_nonambig));
break;
case itb_normal: case itb_preinstall:
switch (possi->ed->status) {
case stat_installed:
- if (versionsatisfied(&possi->ed->installed, possi)) return 1;
- sprintf(linebuf, " %.250s is installed, but is version %.250s.\n",
+ if (versionsatisfied(&possi->ed->installed,possi)) return 1;
+ sprintf(linebuf," %.250s is installed, but is version %.250s.\n",
possi->ed->name,
- versiondescribe(possi->ed->available.version,
- possi->ed->available.revision));
+ versiondescribe(&possi->ed->installed.version,vdew_nonambig));
break;
case stat_notinstalled:
/* Don't say anything about this yet - it might be a virtual package.
@@ -280,24 +258,20 @@ int depisok(struct dependency *dep, struct varbuf *whynot,
case stat_unpacked:
case stat_halfconfigured:
if (allowunconfigd) {
- if (!possi->ed->configversion || !*possi->ed->configversion) {
+ if (!informativeversion(&possi->ed->configversion)) {
sprintf(linebuf, " %.250s is unpacked, but has never been configured.\n",
possi->ed->name);
break;
} else if (!versionsatisfied(&possi->ed->installed, possi)) {
sprintf(linebuf, " %.250s is unpacked, but is version %.250s.\n",
possi->ed->name,
- versiondescribe(possi->ed->available.version,
- possi->ed->available.revision));
+ versiondescribe(&possi->ed->available.version,vdew_nonambig));
break;
- } else if (!versionsatisfied5(possi->ed->configversion,
- possi->ed->configrevision,
- possi->version, possi->revision,
- possi->verrel)) {
+ } else if (!versionsatisfied3(&possi->ed->configversion,
+ &possi->version,possi->verrel)) {
sprintf(linebuf, " %.250s latest configured version is %.250s.\n",
possi->ed->name,
- versiondescribe(possi->ed->configversion,
- possi->ed->configrevision));
+ versiondescribe(&possi->ed->configversion,vdew_nonambig));
break;
} else {
return 1;
@@ -396,8 +370,7 @@ int depisok(struct dependency *dep, struct varbuf *whynot,
if (!versionsatisfied(&possi->ed->available, possi)) break;
sprintf(linebuf, " %.250s (version %.250s) is to be installed.\n",
possi->ed->name,
- versiondescribe(possi->ed->available.version,
- possi->ed->available.revision));
+ versiondescribe(&possi->ed->available.version,vdew_nonambig));
varbufaddstr(whynot, linebuf);
if (!canfixbyremove) return 0;
nconflicts++;
@@ -411,8 +384,7 @@ int depisok(struct dependency *dep, struct varbuf *whynot,
if (!versionsatisfied(&possi->ed->installed, possi)) break;
sprintf(linebuf, " %.250s (version %.250s) is %s.\n",
possi->ed->name,
- versiondescribe(possi->ed->available.version,
- possi->ed->available.revision),
+ versiondescribe(&possi->ed->installed.version,vdew_nonambig),
statusstrings[possi->ed->status]);
varbufaddstr(whynot, linebuf);
if (!canfixbyremove) return 0;
@@ -455,8 +427,8 @@ int depisok(struct dependency *dep, struct varbuf *whynot,
case itb_installnew:
/* Don't pay any attention to the Provides field of the
* currently-installed version of the package we're trying
- * to install. We dealt with that by using the available
- * information above.
+ * to install. We dealt with that package by using the
+ * available information above.
*/
continue;
case itb_remove:
diff --git a/main/dpkg.8 b/main/dpkg.8
index bf760f430..9d4de1307 100644
--- a/main/dpkg.8
+++ b/main/dpkg.8
@@ -1,20 +1,613 @@
-.\" Hey, Emacs! This is an -*- nroff -*- source file.
-.TH DPKG 8 "29th November 1995" "Debian Project" "Debian GNU/Linux"
+.TH dpkg 8
.SH NAME
-dpkg \- Debian package installation tool
+dpkg - a low-level package manager for Debian GNU/Linux
+
+.SH SYNOPSIS
+
+.B dpkg
+[options] action
+
+.SH WARNING WARNING WARNING
+
+This manual was inaccurate when it was written and is now also out of
+date.
+
+It should
+.I not
+be used by package maintainers wishing to understand how
+.B dpkg
+will install their packages.
+
+It may be useful to users wishing to understand
+.BR "dpkg"'s
+command line options and package states in more detail than that
+provided by
+.BR "dpkg --help" .
+
+The descriptions of what
+.B dpkg
+does when installing and removing packages are particularly
+inadequate. For detailed information about this please refer to the
+Debian Packaging Guidelines, available under
+.I guidelines
+in the GNU Info system.
+
.SH DESCRIPTION
+
+.B dpkg
+is a medium-level tool to install, build, remove and manage Debian
+GNU/Linux packages. The primary and more user-friendly front-end
+for
.B dpkg
-does not have a useful man page. Please do not report this as a bug,
-as this has already been done many times.
+is
+.B dselect(8).
+.B dpkg
+itself is totally controlled via command line parameters, whose include
+one or more options and exactly one action. The action-parameter tells
+dpkg what to do and options control the behaviour of the action in some
+way.
+
+.B dpkg
+can be also be used as a front-end to
+.B dpkg-deb.
+Actions
+.B -b
+,
+.B --build
+,
+.B -c
+,
+.B --contents
+,
+.B -I
+,
+.B --info
+,
+.B -f
+,
+.B --field
+,
+.B -e
+,
+.B --control
+,
+.B -x
+,
+.B --extract
+,
+.B -X
+,
+.B --vextract
+and
+.B --fsys-tarfile
+are
+.B dpkg-deb
+actions and if they are encountered,
+.B dpkg
+just runs
+.B dpkg-deb
+with the parameters given to it. Please refer to
+.B dpkg-deb(8)
+for information about these actions.
+
+.SS ACTIONS
+
+.TP
+.B dpkg -i | --install <package file name> ...
+Install specified packages. If
+.B --recursive
+or
+.B -R
+option is specified,
+.I <package file name>
+must refer to a directory instead.
+
+Installation consists of the following steps:
+.br
+.B 1.
+Extract the controlfiles of the new package.
+.br
+.B 2.
+If another version of the same package was installed before the
+new installation, execute
+.I prerm
+script of the old package.
+.br
+.B 3.
+Run
+.I preinst
+script, if provided by the package.
+.br
+.B 4.
+Unpack the files and at the same time, backup the old files
+so that if something goes wrong, we can restore them.
+.br
+.B 5.
+If another version of the same package was installed before
+the new installation, execute the
+.I postrm
+script of the old package. Note that this script is executed after the
+.I preinst
+script of the new package, because new files are written at the same
+time, old files are removed.
+.br
+.B 6.
+eonfigure the package. See
+.B --configure
+for detailed information about how this is done.
+.TP
+.B dpkg --unpack <package file name> ...
+Unpack package, but don't configure it. If
+.B --recursive
+or
+.B -R
+option is specified,
+.I <package file name>
+must refer to a directory instead.
+.TP
+.B dpkg --configure <package name> ... | -a|--pending
+Reconfigure an unpacked package.
+If
+.B -a
+or
+.B --pending
+is given instead of package name, all unpacked, but unconfigured
+packages are configured.
+
+Configuring consists of the following steps:
+.br
+.B 1.
+Unpack the configuration files and at the same time, backup the old
+configuration files, so that we can restore them, if
+something goes
+wrong.
+.br
+.B 2.
+Run
+.I postinst
+script, if provided by the package.
+.TP
+.B dpkg -r|--remove | --purge <package name> ... | -a|--pending
+Remove an installed package.
+.B --purge
+removes everything, including configuration files,
+.B --remove
+removes everything, but not configuration files. (configuration files are
+the files listed in
+.I conffiles
+-control file). If
+.B -a
+or
+.B --pending
+is given instead of package name all packages unpacked, but marked to be
+removed or purged are removed or purged (in file
+.I /var/lib/dpkg/status
+).
+
+Removing of a package consists of the following steps:
+.br
+.B 1.
+Run prerm script
+.br
+.B 2.
+Remove the installed files
+.br
+.B 3.
+Run postrm script
+.br
+.TP
+.B dpkg -A | --avail <package file name> ...
+Update
+.B dpkg
+and
+.B dselect's
+idea of which packages are available with information about the package
+.I <package file name>.
+If
+.B --recursive
+or
+.B -R
+option is specified,
+.I <package file name>
+must refer to a directory instead.
+.TP
+.B dpkg --update-avail | --merge-avail <Packages-file>
+Update
+.B dpkg's
+and
+.B dselect's
+idea of which packages are available. With action
+.B --merge-avail,
+information is combined from the old information and from the
+.I <Packages-file>.
+With action
+.B --update-avail,
+old information is replaced with the information in the
+.I <Packages-file>.
+The
+.I <Packages-file>
+distributed with Debian GNU/Linux is simply named
+.I Packages.
+.TP
+.B dpkg --yet-to-unpack
+Searches for packages selected for installation, but which for some
+reason still haven't been installed.
+.TP
+.B dpkg -l|--list [<package-name-pattern> ...]
+List packages matching given pattern. If no
+.B <package-name-pattern>
+is given, list all packages in
+.I /var/lib/dpkg/available.
+Normal shell wildchars are allowed in
+.B <package-name-pattern>.
+.TP
+.B dpkg -L|--listfiles <package-name> ...
+List files installed to your system from a package
+.B <package-name>.
+However, note that files created by package-specific
+installation-scripts are not listed.
+.TP
+.B dpkg -C|--audit
+Searches for packages that have been installed only partially on your
+system.
+.B dpkg
+will suggest what to do with them to get them working.
+.TP
+.B dpkg -S|--search <filename-search-pattern> ...
+Search for a filename from installed packages. All standard shell
+wildchars can be used in the pattern.
+.TP
+.B dpkg -s|--status <package-name> ...
+Report status of specified package. This just displays the entry in from
+the installed package status database.
+.TP
+.B dpkg --help
+Display a brief help.
+.TP
+.B dpkg --licence
+Display licence of
+.B dpkg.
+.TP
+.B dpkg --version
+Display version information.
+.TP
+.B dpkg-deb-actions
+See
+.B dpkg-deb(8)
+for more information about these actions.
+
+.B dpkg -b|--build <directory> [<filename>]
+- Build a Debian GNU/Linux package.
+.br
+.B dpkg -c|--contents <filename>
+- List contents of Debian GNU/Linux package.
+.br
+.B dpkg -e|--control <filename> [<directory>]
+- Extract control-information from a package.
+.br
+.B dpkg -x|--extract <filename> <directory>
+- Extract the files contained by package.
+.br
+.B dpkg -f|--field <filename> [<control-field>...]
+- Display control field(s) of a package.
+.br
+.B dpkg --fsys-tarfile <filename>
+- Display the filesystem tar-file contained by a Debian package.
+.br
+.B dpkg -I|--info <filename> [<control-file>]
+- Show information about a package.
+.br
+.B dpkg -X|--vextract <filename> <directory>
+- Extract and display the filenames contained by a package.
-Instead, if you are a competent and accurate writer and are willing to
-spend the time reading the source code and writing good manpages
-please write a better man page than this one.
+.SS OPTIONS
-Type
-.B dpkg \-\-help
-for a brief summary of how to use dpkg.
+.TP
+.B -B | --auto-deconfigure
+While a package is removed, there is a possibility that another
+installed package depended on the removed package. Specifying this
+option will cause automatical deconfiguration of the package which
+depended on the removed package.
+.TP
+.B -Dh | --debug=help
+Give help about debugging options.
+.TP
+.B -D<octal> | --debug=<octal>
+Set debugging on.
+.B <octal>
+is a octal number formed by bitwise-orring desired values together from
+the list below (note that these values may change in future releases).
+ number description
+ 1 Generally helpful progress information
+ 2 Invocation and status of maintainer scripts
+ 10 Output for each file processed
+ 100 Lots of output for each file processed
+ 20 Output for each configuration file
+ 200 Lots of output for each configuration file
+ 40 Dependencies and conflicts
+ 400 Lots of dependencies/conflicts output
+ 1000 Lots of drivel about eg the dpkg/info dir
+ 2000 Insane amounts of drivel
+.TP
+.B --force-<things> | --no-force-<things> | --refuse-<things>
+Force or refuse (no-force and refuse stands for the same thing) to do
+some things.
+.B <things>
+is a comma separated list of things specified below:
+
+.I downgrade(*):
+Install a package, even if newer version of it is already installed.
+
+.I configure-any:
+Configure also unpacked, but unconfigured packages on whose current
+package depends on.
+
+.I remove-reinstreq:
+Remove a package, even if it's broken and marked to require
+reinstallation. This may, for example, cause parts of the package to
+remain on the system, which will then be forgotten by
+.B dpkg.
+
+.I hold:
+Don't care, wheter a package is on hold or not.
+
+.I remove-essential:
+Remove, even if the package is considered essential. Essential packages
+contains mostly very basic unix commands and such. Removing them might
+cause the whole system to stop working, so use with caution.
+
+.I conflicts:
+Install, even if it conflicts with another package. This is dangerous,
+for it will usually cause overwriting of some files.
+
+.I depends:
+Remove, even if another package depends on this one. This will usually
+break the other package.
+
+.I depends-version:
+Don't care about versions when checking depencies. This will usually
+break the other package.
+
+Things marked with (*) are forced by default.
+.I Warning:
+These options are mostly intended to be used by experts only. Using them
+without fully understanding their effects may break your whole system.
+
+.TP
+.B --ignore-depends=<package>,...
+Ignore depency-checking for specified packages (actually, checking is
+performed, but only warnings about conflicts are given, nothing else).
+.TP
+.B --largemem | --smallmem
+Tells
+.B dpkg
+wheter to preserve memory or consume it as much as needed.
+.TP
+.B --new | --old
+Select new or old package format. This is a
+.B dpkg-deb(8)
+option.
+.TP
+.B --nocheck
+Don't read or check contents of control file while building a package.
+This is a
+.B dpkg-deb(8)
+option.
+.TP
+.B --no-act
+Do everything, which is supposed to be done, but don't write any
+changes. This is used to see, what would happen with specified action,
+without actually modifying anything.
+
+Be sure to give
+.B --no-act
+before action-parameter, or you might end up with undesirable results.
+(e.g.
+.B dpkg --purge foo --no-act
+will first purge package foo and then try to purge package --no-act,
+even though you propably expected it to actually do nothing)
+.TP
+.B -R | --recursive
+Recursively handle all regular files matching pattern
+.I *.deb
+found at specified directories and all of its subdirectories. This
+can be used with
+.B -i
+,
+.B -A
+,
+.B --install
+,
+.B --unpack
+and
+.B --avail
+actions.
+.TP
+.B -G
+Don't install package, if newer version of the same package is already
+installed. This is an alias to
+.B--refuse-downgrade.
+.TP
+.B -R|--root=<dir> | --admindir=<dir> | --instdir=<dir>
+Change default directories.
+.B admindir
+defaults to
+.I /var/lib/dpkg
+and contains many files that give information about status of installed
+or uninstalled packages, etc.
+.B instdir
+defaults to
+.I /
+and refers to the directory where packages are to be installed.
+.B instdir
+is also the directory passed to
+.B chroot(2)
+before running package's installation scripts, which means that the
+scripts see
+.B instdir
+as a root directory.
+Changing
+.B root
+changes
+.B instdir
+to
+.I <dir>
+and
+.B admindir
+to
+.I <dir>/var/lib/dpkg.
+.TP
+.B -O | --selected-only
+Only process the packages that are selected for installation. The actual
+marking is done with
+.B dselect
+or by
+.B dpkg,
+when it handles packages. i.e. When, for example a package is removed,
+it will be marked selected for installation, etc.
+.TP
+.B -E | --skip-same-version
+Don't install the package, if the same version of the package is already
+installed.
+
+.SH INFORMATION ABOUT PACKAGES
+.B dpkg
+maintains some usable information about available packages. The
+information is divided in three classes:
+.B states
+,
+.B selection states
+and
+.B flags.
+These values are intended to be changed mainly with
+.B dselect.
+.SS PACKAGE STATES
+.TP
+.B installed
+The package is unpacked and configured ok.
+.TP
+.B half-installed
+The installation of the package has been started, but not completed for
+some reason.
+.TP
+.B not-installed
+The package is not installed on your system.
+.TP
+.B unpacked
+The package is unpacked, but not configured.
+.TP
+.B half-configured
+The package is unpacked and configuration has been started, but not yet
+completed for some reason.
+.TP
+.B config-files
+Only the configuration files of the package exist on the system.
+.SS PACKAGE SELECTION STATES
+.TP
+.B install
+The package is selected for installation.
+.TP
+.B deinstall
+The package is selected for deinstallation (i.e. we want to remove all
+files, except configuration files).
+.TP
+.B purge
+The package is selected to be purged (i.e. we want to remove everything,
+even configuration files).
+.SS PACKAGE FLAGS
+.TP
+.B hold
+A package marked to be on
+.B hold
+is not handled by
+.B dpkg,
+unless forced to do that with option
+.B --force-hold.
+.TP
+.B reinst-required
+A package marked
+.B reinst-required
+is broken and requires reinstallation. These packages cannot be removed,
+unless forced with option
+.B --force-reinstreq.
+
+.SH FILES
+The files listed here are in their default directories, see option
+.B --admindir
+to see how to change locations of these files.
+.TP
+.I /var/lib/dpkg/available
+List of available packages.
+.TP
+.I /var/lib/dpkg/status
+Statuses of available packages. This file contains information about
+wheter a package is marked for removing or not, wheter it is installed
+or not, etc. See section
+.B INFORMATION ABOUT PACKAGES
+for more info.
+.TP
+.I control
+See
+.B deb(5)
+for more information about this file.
+.TP
+.I conffiles
+.B dpkg.
+See
+.B deb(5)
+for more information about this file.
+.TP
+.I preinst
+See
+.B deb(5)
+for more information about this file.
+.TP
+.I postinst
+See
+.B deb(5)
+for more information about this file.
+.TP
+.I prerm
+See
+.B deb(5)
+for more information about this file.
+.TP
+.I postrm
+See
+.B deb(5)
+for more information about this file.
+
+.SH ENVIRONMENT VARIABLES
+.TP
+.B DPKG_NO_TSTP
+Define this to something, if you prefer
+.B dpkg
+starting a new shell rather than suspending
+.B dpkg,
+while doing a shell escape.
+.TP
+.B SHELL
+The program
+.B dpkg
+will execute while starting a new shell.
+
+.SH SEE ALSO
+.B deb(5)
+,
+.B dpkg-deb(8)
+,
+.B dselect(8)
+and
+.B deb-control(5)
+
+.SH BUGS
+
+.B --no-act
+usually gives less information that might be helpful.
.SH AUTHOR
-Ian Jackson <ijackson@gnu.ai.mit.edu>; tarfile extraction code
-contributed by Bruce Perens <bruce@pixar.com>.
+.B dpkg
+is written by Ian Jackson (ian@chiark.chu.cam.ac.uk). Manual page added
+by Juho Vuori (javuori@cc.helsinki.fi).
+
+
diff --git a/main/dpkg.8-null b/main/dpkg.8-null
new file mode 100644
index 000000000..bf760f430
--- /dev/null
+++ b/main/dpkg.8-null
@@ -0,0 +1,20 @@
+.\" Hey, Emacs! This is an -*- nroff -*- source file.
+.TH DPKG 8 "29th November 1995" "Debian Project" "Debian GNU/Linux"
+.SH NAME
+dpkg \- Debian package installation tool
+.SH DESCRIPTION
+.B dpkg
+does not have a useful man page. Please do not report this as a bug,
+as this has already been done many times.
+
+Instead, if you are a competent and accurate writer and are willing to
+spend the time reading the source code and writing good manpages
+please write a better man page than this one.
+
+Type
+.B dpkg \-\-help
+for a brief summary of how to use dpkg.
+
+.SH AUTHOR
+Ian Jackson <ijackson@gnu.ai.mit.edu>; tarfile extraction code
+contributed by Bruce Perens <bruce@pixar.com>.
diff --git a/main/dpkg.8-vuori b/main/dpkg.8-vuori
deleted file mode 100644
index 18cc4c0f2..000000000
--- a/main/dpkg.8-vuori
+++ /dev/null
@@ -1,588 +0,0 @@
-.TH dpkg 8
-.SH NAME
-dpkg - a low-level package manager for Debian GNU/Linux
-
-.SH SYNOPSIS
-
-.B dpkb
-[options] action
-
-.SH DESCRIPTION
-
-.B dpkg
-is a medium-level tool to install, build, remove and manage Debian
-GNU/Linux packages. The primary and more user-friendly front-end
-for
-.B dpkg
-is
-.B dselect(8).
-.B dpkg
-itself is totally controlled via command line parameters, whose include
-one or more options and exactly one action. The action-parameter tells
-dpkg what to do and options control the behaviour of the action in some
-way.
-
-.B dpkg
-can be also be used as a front-end to
-.B dpkg-deb.
-Actions
-.B -b
-,
-.B --build
-,
-.B -c
-,
-.B --contents
-,
-.B -I
-,
-.B --info
-,
-.B -f
-,
-.B --field
-,
-.B -e
-,
-.B --control
-,
-.B -x
-,
-.B --extract
-,
-.B -X
-,
-.B --vextract
-and
-.B --fsys-tarfile
-are
-.B dpkg-deb
-actions and if they are encountered,
-.B dpkg
-just runs
-.B dpkg-deb
-with the parameters given to it. Please refer to
-.B dpkg-deb(8)
-for information about these actions.
-
-.SS ACTIONS
-
-.TP
-.B dpkg -i | --install <package file name> ...
-Install specified packages. If
-.B --recursive
-or
-.B -R
-option is specified,
-.I <package file name>
-must refer to a directory instead.
-
-Installation consists of the following steps:
-.br
-.B 1.
-Extract the controlfiles of the new package.
-.br
-.B 2.
-If another version of the same package was installed before the
-new installation, execute
-.I prerm
-script of the old package.
-.br
-.B 3.
-Run
-.I preinst
-script, if provided by the package.
-.br
-.B 4.
-Unpack the files and at the same time, backup the old files
-so that if something goes wrong, we can restore them.
-.br
-.B 5.
-If another version of the same package was installed before
-the new installation, execute the
-.I postrm
-script of the old package. Note that this script is executed after the
-.I preinst
-script of the new package, because new files are written at the same
-time, old files are removed.
-.br
-.B 6.
-eonfigure the package. See
-.B --configure
-for detailed information about how this is done.
-.TP
-.B dpkg --unpack <package file name> ...
-Unpack package, but don't configure it. If
-.B --recursive
-or
-.B -R
-option is specified,
-.I <package file name>
-must refer to a directory instead.
-.TP
-.B dpkg --configure <package name> ... | -a|--pending
-Reconfigure an unpacked package.
-If
-.B -a
-or
-.B --pending
-is given instead of package name, all unpacked, but unconfigured
-packages are configured.
-
-Configuring consists of the following steps:
-.br
-.B 1.
-Unpack the configuration files and at the same time, backup the old
-configuration files, so that we can restore them, if
-something goes
-wrong.
-.br
-.B 2.
-Run
-.I postinst
-script, if provided by the package.
-.TP
-.B dpkg -r|--remove | --purge <package name> ... | -a|--pending
-Remove an installed package.
-.B --purge
-removes everything, including configuration files,
-.B --remove
-removes everything, but not configuration files. (configuration files are
-the files listed in
-.I conffiles
--control file). If
-.B -a
-or
-.B --pending
-is given instead of package name all packages unpacked, but marked to be
-removed or purged are removed or purged (in file
-.I /var/lib/dpkg/status
-).
-
-Removing of a package consists of the following steps:
-.br
-.B 1.
-Run prerm script
-.br
-.B 2.
-Remove the installed files
-.br
-.B 3.
-Run postrm script
-.br
-.TP
-.B dpkg -A | --avail <package file name> ...
-Update
-.B dpkg
-and
-.B dselect's
-idea of which packages are available with information about the package
-.I <package file name>.
-If
-.B --recursive
-or
-.B -R
-option is specified,
-.I <package file name>
-must refer to a directory instead.
-.TP
-.B dpkg --update-avail | --merge-avail <Packages-file>
-Update
-.B dpkg's
-and
-.B dselect's
-idea of which packages are available. With action
-.B --merge-avail,
-information is combined from the old information and from the
-.I <Packages-file>.
-With action
-.B --update-avail,
-old information is replaced with the information in the
-.I <Packages-file>.
-The
-.I <Packages-file>
-distributed with Debian GNU/Linux is simply named
-.I Packages.
-.TP
-.B dpkg --yet-to-unpack
-Searches for packages selected for installation, but which for some
-reason still haven't been installed.
-.TP
-.B dpkg -l|--list [<package-name-pattern> ...]
-List packages matching given pattern. If no
-.B <package-name-pattern>
-is given, list all packages in
-.I /var/lib/dpkg/available.
-Normal shell wildchars are allowed in
-.B <package-name-pattern>.
-.TP
-.B dpkg -L|--listfiles <package-name> ...
-List files installed to your system from a package
-.B <package-name>.
-However, note that files created by package-specific
-installation-scripts are not listed.
-.TP
-.B dpkg -C|--audit
-Searches for packages that have been installed only partially on your
-system.
-.B dpkg
-will suggest what to do with them to get them working.
-.TP
-.B dpkg -S|--search <filename-search-pattern> ...
-Search for a filename from installed packages. All standard shell
-wildchars can be used in the pattern.
-.TP
-.B dpkg -s|--status <package-name> ...
-Report status of specified package. This just displays the entry in from
-the installed package status database.
-.TP
-.B dpkg --help
-Display a brief help.
-.TP
-.B dpkg --licence
-Display licence of
-.B dpkg.
-.TP
-.B dpkg --version
-Display version information.
-.TP
-.B dpkg-deb-actions
-See
-.B dpkg-deb(8)
-for more information about these actions.
-
-.B dpkg -b|--build <directory> [<filename>]
-- Build a Debian GNU/Linux package.
-.br
-.B dpkg -c|--contents <filename>
-- List contents of Debian GNU/Linux package.
-.br
-.B dpkg -e|--control <filename> [<directory>]
-- Extract control-information from a package.
-.br
-.B dpkg -x|--extract <filename> <directory>
-- Extract the files contained by package.
-.br
-.B dpkg -f|--field <filename> [<control-field>...]
-- Display control field(s) of a package.
-.br
-.B dpkg --fsys-tarfile <filename>
-- Display the filesystem tar-file contained by a Debian package.
-.br
-.B dpkg -I|--info <filename> [<control-file>]
-- Show information about a package.
-.br
-.B dpkg -X|--vextract <filename> <directory>
-- Extract and display the filenames contained by a package.
-
-.SS OPTIONS
-
-.TP
-.B -B | --auto-deconfigure
-While a package is removed, there is a possibility that another
-installed package depended on the removed package. Specifying this
-option will cause automatical deconfiguration of the package which
-depended on the removed package.
-.TP
-.B -Dh | --debug=help
-Give help about debugging options.
-.TP
-.B -D<octal> | --debug=<octal>
-Set debugging on.
-.B <octal>
-is a octal number formed by bitwise-orring desired values together from
-the list below (note that these values may change in future releases).
-
- number description
- 1 Generally helpful progress information
- 2 Invocation and status of maintainer scripts
- 10 Output for each file processed
- 100 Lots of output for each file processed
- 20 Output for each configuration file
- 200 Lots of output for each configuration file
- 40 Dependencies and conflicts
- 400 Lots of dependencies/conflicts output
- 1000 Lots of drivel about eg the dpkg/info dir
- 2000 Insane amounts of drivel
-.TP
-.B --force-<things> | --no-force-<things> | --refuse-<things>
-Force or refuse (no-force and refuse stands for the same thing) to do
-some things.
-.B <things>
-is a comma separated list of things specified below:
-
-.I downgrade(*):
-Install a package, even if newer version of it is already installed.
-
-.I configure-any:
-Configure also unpacked, but unconfigured packages on whose current
-package depends on.
-
-.I remove-reinstreq:
-Remove a package, even if it's broken and marked to require
-reinstallation. This may, for example, cause parts of the package to
-remain on the system, which will then be forgotten by
-.B dpkg.
-
-.I hold:
-Don't care, wheter a package is on hold or not.
-
-.I remove-essential:
-Remove, even if the package is considered essential. Essential packages
-contains mostly very basic unix commands and such. Removing them might
-cause the whole system to stop working, so use with caution.
-
-.I conflicts:
-Install, even if it conflicts with another package. This is dangerous,
-for it will usually cause overwriting of some files.
-
-.I depends:
-Remove, even if another package depends on this one. This will usually
-break the other package.
-
-.I depends-version:
-Don't care about versions when checking depencies. This will usually
-break the other package.
-
-Things marked with (*) are forced by default.
-.I Warning:
-These options are mostly intended to be used by experts only. Using them
-without fully understanding their effects may break your whole system.
-
-.TP
-.B --ignore-depends=<package>,...
-Ignore depency-checking for specified packages (actually, checking is
-performed, but only warnings about conflicts are given, nothing else).
-.TP
-.B --largemem | --smallmem
-Tells
-.B dpkg
-wheter to preserve memory or consume it as much as needed.
-.TP
-.B --new | --old
-Select new or old package format. This is a
-.B dpkg-deb(8)
-option.
-.TP
-.B --nocheck
-Don't read or check contents of control file while building a package.
-This is a
-.B dpkg-deb(8)
-option.
-.TP
-.B --no-act
-Do everything, which is supposed to be done, but don't write any
-changes. This is used to see, what would happen with specified action,
-without actually modifying anything.
-
-Be sure to give
-.B --no-act
-before action-parameter, or you might end up with undesirable results.
-(e.g.
-.B dpkg --purge foo --no-act
-will first purge package foo and then try to purge package --no-act,
-even though you propably expected it to actually do nothing)
-.TP
-.B -R | --recursive
-Recursively handle all regular files matching pattern
-.I *.deb
-found at specified directories and all of its subdirectories. This
-can be used with
-.B -i
-,
-.B -A
-,
-.B --install
-,
-.B --unpack
-and
-.B --avail
-actions.
-.TP
-.B -G
-Don't install package, if newer version of the same package is already
-installed. This is an alias to
-.B--refuse-downgrade.
-.TP
-.B -R|--root=<dir> | --admindir=<dir> | --instdir=<dir>
-Change default directories.
-.B admindir
-defaults to
-.I /var/lib/dpkg
-and contains many files that give information about status of installed
-or uninstalled packages, etc.
-.B instdir
-defaults to
-.I /
-and refers to the directory where packages are to be installed.
-.B instdir
-is also the directory passed to
-.B chroot(2)
-before running package's installation scripts, which means that the
-scripts see
-.B instdir
-as a root directory.
-Changing
-.B root
-changes
-.B instdir
-to
-.I <dir>
-and
-.B admindir
-to
-.I <dir>/var/lib/dpkg.
-.TP
-.B -O | --selected-only
-Only process the packages that are selected for installation. The actual
-marking is done with
-.B dselect
-or by
-.B dpkg,
-when it handles packages. i.e. When, for example a package is removed,
-it will be marked selected for installation, etc.
-.TP
-.B -E | --skip-same-version
-Don't install the package, if the same version of the package is already
-installed.
-
-.SH INFORMATION ABOUT PACKAGES
-.B dpkg
-maintains some usable information about available packages. The
-information is divided in three classes:
-.B states
-,
-.B selection states
-and
-.B flags.
-These values are intended to be changed mainly with
-.B dselect.
-.SS PACKAGE STATES
-.TP
-.B installed
-The package is unpacked and configured ok.
-.TP
-.B half-installed
-The installation of the package has been started, but not completed for
-some reason.
-.TP
-.B not-installed
-The package is not installed on your system.
-.TP
-.B unpacked
-The package is unpacked, but not configured.
-.TP
-.B half-configured
-The package is unpacked and configuration has been started, but not yet
-completed for some reason.
-.TP
-.B config-files
-Only the configuration files of the package exist on the system.
-.SS PACKAGE SELECTION STATES
-.TP
-.B install
-The package is selected for installation.
-.TP
-.B deinstall
-The package is selected for deinstallation (i.e. we want to remove all
-files, except configuration files).
-.TP
-.B purge
-The package is selected to be purged (i.e. we want to remove everything,
-even configuration files).
-.SS PACKAGE FLAGS
-.TP
-.B hold
-A package marked to be on
-.B hold
-is not handled by
-.B dpkg,
-unless forced to do that with option
-.B --force-hold.
-.TP
-.B reinst-required
-A package marked
-.B reinst-required
-is broken and requires reinstallation. These packages cannot be removed,
-unless forced with option
-.B --force-reinstreq.
-
-.SH FILES
-The files listed here are in their default directories, see option
-.B --admindir
-to see how to change locations of these files.
-.TP
-.I /var/lib/dpkg/available
-List of available packages.
-.TP
-.I /var/lib/dpkg/status
-Statuses of available packages. This file contains information about
-wheter a package is marked for removing or not, wheter it is installed
-or not, etc. See section
-.B INFORMATION ABOUT PACKAGES
-for more info.
-.TP
-.I control
-See
-.B deb(5)
-for more information about this file.
-.TP
-.I conffiles
-.B dpkg.
-See
-.B deb(5)
-for more information about this file.
-.TP
-.I preinst
-See
-.B deb(5)
-for more information about this file.
-.TP
-.I postinst
-See
-.B deb(5)
-for more information about this file.
-.TP
-.I prerm
-See
-.B deb(5)
-for more information about this file.
-.TP
-.I postrm
-See
-.B deb(5)
-for more information about this file.
-
-.SH ENVIRONMENT VARIABLES
-.TP
-.B DPKG_NO_TSTP
-Define this to something, if you prefer
-.B dpkg
-starting a new shell rather than suspending
-.B dpkg,
-while doing a shell escape.
-.TP
-.B SHELL
-The program
-.B dpkg
-will execute while starting a new shell.
-
-.SH SEE ALSO
-.B deb(5)
-,
-.B dpkg-deb(8)
-,
-.B dselect(8)
-and
-.B deb-control(5)
-
-.SH BUGS
-
-.B --no-act
-usually gives less information that might be helpful.
-.SH AUTHOR
-.B dpkg
-is written by Ian Jackson (ian@chiark.chu.cam.ac.uk). Manual page added
-by Juho Vuori (javuori@cc.helsinki.fi).
-
-
diff --git a/main/enquiry.c b/main/enquiry.c
index c49e9a426..9483dad35 100644
--- a/main/enquiry.c
+++ b/main/enquiry.c
@@ -2,7 +2,7 @@
* dpkg - main program for package management
* enquiry.c - status enquiry and listing options
*
- * Copyright (C) 1995 Ian Jackson <iwj10@cus.cam.ac.uk>
+ * Copyright (C) 1995,1996 Ian Jackson <ijackson@gnu.ai.mit.edu>
*
* This is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as
@@ -73,11 +73,11 @@ Desired=Unknown/Install/Remove/Purge\n\
if (!pkg->installed.valid) blankpackageperfile(&pkg->installed);
limiteddescription(pkg,44,&pdesc,&l);
printf("%c%c%c %-15.15s %-14.14s %.*s\n",
- "uirp"[pkg->want],
+ "uihrp"[pkg->want],
"nUFiHc"[pkg->status],
- " hRX"[pkg->eflag],
+ " R?#"[pkg->eflag],
pkg->name,
- versiondescribe(pkg->installed.version,pkg->installed.revision),
+ versiondescribe(&pkg->installed.version,vdew_never),
l, pdesc);
}
@@ -431,19 +431,23 @@ void enqperpackage(const char *const *argv) {
}
void assertsupportpredepends(const char *const *argv) {
+ static struct versionrevision predepversion = {~0UL,0,0};
struct pkginfo *pkg;
if (*argv) badusage("--assert-support-predepends does not take any arguments");
modstatdb_init(admindir,msdbrw_readonly);
pkg= findpackage("dpkg");
-
+ if (!predepversion.epoch == ~0UL) {
+ predepversion.epoch= 0;
+ predepversion.version= nfstrsave("1.1.0");
+ predepversion.revision= 0;
+ }
switch (pkg->status) {
case stat_installed:
break;
case stat_unpacked: case stat_halfconfigured:
- if (versionsatisfied5(pkg->configversion,pkg->configrevision,
- "1.1.0","", dvr_laterequal))
+ if (versionsatisfied3(&pkg->configversion,&predepversion,dvr_laterequal))
break;
printf("Version of dpkg with Pre-Depends support not yet configured.\n"
" Please use `dpkg --configure dpkg', and then try again.\n");
diff --git a/main/errors.c b/main/errors.c
index 797c8a847..495a16e51 100644
--- a/main/errors.c
+++ b/main/errors.c
@@ -86,7 +86,7 @@ int reportbroken_retexitstatus(void) {
}
int skip_due_to_hold(struct pkginfo *pkg) {
- if (!(pkg->eflag & eflagf_hold)) return 0;
+ if (pkg->want != want_hold) return 0;
if (fc_hold) {
fprintf(stderr, "Package %s was on hold, processing it anyway as you request\n",
pkg->name);
diff --git a/main/help.c b/main/help.c
index 48378a6c2..edccc5d88 100644
--- a/main/help.c
+++ b/main/help.c
@@ -323,8 +323,8 @@ int maintainer_script_alternative(struct pkginfo *pkg,
oldscriptpath= pkgadminfile(pkg,scriptname);
arglist= buildarglist(scriptname,
- ifok,versiondescribe(pkg->available.version,
- pkg->available.revision),
+ ifok,versiondescribe(&pkg->available.version,
+ vdew_nonambig),
(char*)0);
sprintf(buf,"old %s script",description);
if (stat(oldscriptpath,&stab)) {
@@ -363,8 +363,8 @@ int maintainer_script_alternative(struct pkginfo *pkg,
fprintf(stderr, DPKG " - trying script from the new package instead ...\n");
arglist= buildarglist(scriptname,
- iffallback,versiondescribe(pkg->installed.version,
- pkg->installed.revision),
+ iffallback,versiondescribe(&pkg->installed.version,
+ vdew_nonambig),
(char*)0);
strcpy(cidirrest,scriptname);
sprintf(buf,"new %s script",description);
diff --git a/main/main.c b/main/main.c
index 22d866c42..6e08b9736 100644
--- a/main/main.c
+++ b/main/main.c
@@ -41,12 +41,12 @@
#include "main.h"
static void printversion(void) {
- if (!fputs("Debian GNU/Linux `" DPKG "' package management program version "
+ if (!fputs("Debian Linux `" DPKG "' package management program version "
DPKG_VERSION_ARCH ".\n"
- "Copyright 1994,1995 Ian Jackson, Bruce Perens. This is free software;\n"
+ "Copyright 1994-1996 Ian Jackson, Bruce Perens. This is free software;\n"
"see the GNU General Public Licence version 2 or later for copying\n"
"conditions. There is NO warranty. See dpkg --licence for details.\n",
- stderr)) werr("stderr");
+ stdout)) werr("stdout");
}
static void usage(void) {
@@ -74,7 +74,7 @@ Options: --help --version --licence --force-help -Dh|--debug=help\n\
--largemem|--smallmem --no-act\n\
\n\
Use `" DSELECT "' for user-friendly package management.\n",
- stderr)) werr("stderr");
+ stdout)) werr("stdout");
}
const char thisname[]= DPKG;
@@ -209,7 +209,7 @@ DPKG " forcing options - control behaviour when problems found:\n\
auto-select [*] (De)select packages to install (remove) them\n\
dowgrade [*] Replace a package with a lower version\n\
configure-any Configure any package which may help this one\n\
- hold Process packages which are on hold\n\
+ hold Process incidental packages even when on hold\n\
bad-path PATH is missing important programs, problems likely\n\
overwrite Overwrite a file from one package with another\n\
overwrite-diverted Overwrite a diverted file with an undiverted version\n\
@@ -264,6 +264,7 @@ static const struct cmdinfo cmdinfos[]= {
{ "yet-to-unpack", 0, 0, 0, 0, setaction, act_unpackchk },
{ "assert-support-predepends", 0, 0, 0, 0, setaction, act_assuppredep },
{ "print-architecture", 0, 0, 0, 0, setaction, act_printarch },
+ { "print-installation-architecture", 0,0, 0,0, setaction, act_printinstarch },
{ "predep-package", 0, 0, 0, 0, setaction, act_predeppackage },
{ "pending", 'a', 0, &f_pending, 0, 0, 1 },
{ "recursive", 'R', 0, &f_recursive, 0, 0, 1 },
@@ -364,6 +365,10 @@ int main(int argc, const char *const *argv) {
case act_predeppackage:
predeppackage(argv);
break;
+ case act_printinstarch:
+ if (printf("%s\n",architecture) == EOF) werr("stdout");
+ if (fflush(stdout)) werr("stdout");
+ break;
case act_printarch:
printarchitecture(argv);
break;
diff --git a/main/main.h b/main/main.h
index 21a1f9cfe..e1919b706 100644
--- a/main/main.h
+++ b/main/main.h
@@ -51,7 +51,8 @@ struct packageinlist {
enum action { act_unset, act_install, act_unpack, act_avail, act_configure,
act_remove, act_purge, act_list, act_avreplace, act_avmerge,
act_unpackchk, act_status, act_search, act_audit, act_listfiles,
- act_assuppredep, act_printarch, act_predeppackage };
+ act_assuppredep, act_printarch, act_predeppackage,
+ act_printinstarch };
enum conffopt {
cfof_prompt = 001,
@@ -184,14 +185,13 @@ void debug(int which, const char *fmt, ...) PRINTFFORMAT(2,3);
int depisok(struct dependency *dep, struct varbuf *whynot,
struct pkginfo **fixbyrm, int allowunconfigd);
-const char *versiondescribe(const char *ver, const char *rev);
struct cyclesofarlink;
int findbreakcycle(struct pkginfo *pkg, struct cyclesofarlink *sofar);
void describedepcon(struct varbuf *addto, struct dependency *dep);
int versionsatisfied(struct pkginfoperfile *it, struct deppossi *against);
-int versionsatisfied5(const char *itver, const char *itrev,
- const char *refver, const char *refrev,
+int versionsatisfied3(const struct versionrevision *it,
+ const struct versionrevision *ref,
enum depverrel verrel);
#endif /* MAIN_H */
diff --git a/main/packages.c b/main/packages.c
index c49547124..91e78af5d 100644
--- a/main/packages.c
+++ b/main/packages.c
@@ -172,8 +172,6 @@ void process_queue(void) {
if (!pkg) continue; /* duplicate, which we removed earlier */
- if (skip_due_to_hold(pkg)) { pkg->clientdata->istobe= itb_normal; continue; }
-
assert(pkg->status <= stat_configfiles);
if (setjmp(ejbuf)) {
@@ -280,8 +278,8 @@ static int deppossi_ok_found(struct pkginfo *possdependee,
varbufaddstr(oemsgs," Version of ");
varbufaddstr(oemsgs,possdependee->name);
varbufaddstr(oemsgs," on system is ");
- varbufaddstr(oemsgs,versiondescribe(possdependee->installed.version,
- possdependee->installed.revision));
+ varbufaddstr(oemsgs,versiondescribe(&possdependee->installed.version,
+ vdew_nonambig));
varbufaddstr(oemsgs,".\n");
assert(checkversion->verrel != dvr_none);
if (fc_depends) thisf= (dependtry >= 3) ? 2 : 1;
@@ -297,7 +295,7 @@ static int deppossi_ok_found(struct pkginfo *possdependee,
possdependee->clientdata->istobe == itb_installnew) {
debug(dbg_depcondetail," unpacked/halfconfigured, defer");
return 1;
- } else if (!removing && fc_configureany) {
+ } else if (!removing && fc_configureany && !skip_due_to_hold(possdependee)) {
fprintf(stderr, DPKG
": also configuring `%s' (required by `%s')\n",
possdependee->name, requiredby->name);
diff --git a/main/processarc.c b/main/processarc.c
index 4df46c313..7da90c02d 100644
--- a/main/processarc.c
+++ b/main/processarc.c
@@ -82,7 +82,8 @@ void process_archive(const char *filename) {
struct dirent *de;
struct stat stab;
struct packageinlist *deconpil, *deconpiltemp;
-
+ enum versiondisplayepochwhen needepochs;
+
cleanup_pkg_failed= cleanup_conflictor_failed= 0;
admindirlen= strlen(admindir);
@@ -180,8 +181,6 @@ void process_archive(const char *filename) {
"package architecture (%s) does not match system (%s)",
pkg->available.architecture,architecture);
- if (skip_due_to_hold(pkg)) { pop_cleanup(ehflag_normaltidy); return; }
-
if (!pkg->installed.valid) blankpackageperfile(&pkg->installed);
assert(pkg->available.valid);
@@ -205,27 +204,28 @@ void process_archive(const char *filename) {
}
if (pkg->status == stat_installed) {
- r= versioncompare(pkg->available.version,pkg->available.revision,
- pkg->installed.version,pkg->installed.revision);
+ r= versioncompare(&pkg->available.version,&pkg->installed.version);
if (r < 0) {
+ needepochs= epochsdiffer(&pkg->available.version,&pkg->installed.version) ?
+ vdew_always : vdew_never;
if (fc_downgrade) {
fprintf(stderr, DPKG " - warning: downgrading %.250s from %.250s to %.250s.\n",
pkg->name,
- versiondescribe(pkg->installed.version,pkg->installed.revision),
- versiondescribe(pkg->available.version,pkg->available.revision));
+ versiondescribe(&pkg->installed.version,needepochs),
+ versiondescribe(&pkg->available.version,needepochs));
} else {
fprintf(stderr, "Will not downgrade"
" %.250s from version %.250s to %.250s, skipping.\n",
pkg->name,
- versiondescribe(pkg->installed.version,pkg->installed.revision),
- versiondescribe(pkg->available.version,pkg->available.revision));
+ versiondescribe(&pkg->installed.version,needepochs),
+ versiondescribe(&pkg->available.version,needepochs));
pop_cleanup(ehflag_normaltidy);
return;
}
} else if (r == 0 && f_skipsame && /* same version fully installed ? */
pkg->status == stat_installed && !(pkg->eflag &= eflagf_reinstreq)) {
fprintf(stderr, "Version %.250s of %.250s already installed, skipping.\n",
- versiondescribe(pkg->installed.version,pkg->installed.revision),
+ versiondescribe(&pkg->installed.version,vdew_never),
pkg->name);
pop_cleanup(ehflag_normaltidy);
return;
@@ -400,11 +400,11 @@ void process_archive(const char *filename) {
3,(void*)deconpil->pkg,(void*)conflictor,(void*)pkg);
maintainer_script_installed(deconpil->pkg, PRERMFILE, "pre-removal",
"deconfigure", "in-favour", pkg->name,
- versiondescribe(pkg->available.version,
- pkg->available.revision),
+ versiondescribe(&pkg->available.version,
+ vdew_nonambig),
"removing", conflictor->name,
- versiondescribe(conflictor->installed.version,
- conflictor->installed.revision),
+ versiondescribe(&conflictor->installed.version,
+ vdew_nonambig),
(char*)0);
}
conflictor->status= stat_halfconfigured;
@@ -413,8 +413,8 @@ void process_archive(const char *filename) {
2,(void*)conflictor,(void*)pkg);
maintainer_script_installed(conflictor, PRERMFILE, "pre-removal",
"remove", "in-favour", pkg->name,
- versiondescribe(pkg->available.version,
- pkg->available.revision),
+ versiondescribe(&pkg->available.version,
+ vdew_nonambig),
(char*)0);
conflictor->status= stat_halfinstalled;
modstatdb_note(conflictor);
@@ -432,15 +432,15 @@ void process_archive(const char *filename) {
push_cleanup(cu_preinstnew,~ehflag_normaltidy, 0,0,
3,(void*)pkg,(void*)cidir,(void*)cidirrest);
maintainer_script_new(PREINSTFILE, "pre-installation", cidir, cidirrest,
- "install", versiondescribe(pkg->installed.version,
- pkg->installed.revision),
+ "install", versiondescribe(&pkg->installed.version,
+ vdew_nonambig),
(char*)0);
} else {
push_cleanup(cu_preinstupgrade,~ehflag_normaltidy, 0,0,
4,(void*)pkg,(void*)cidir,(void*)cidirrest,(void*)&oldversionstatus);
maintainer_script_new(PREINSTFILE, "pre-installation", cidir, cidirrest,
- "upgrade", versiondescribe(pkg->installed.version,
- pkg->installed.revision),
+ "upgrade", versiondescribe(&pkg->installed.version,
+ vdew_nonambig),
(char*)0);
printf("Unpacking replacement %.250s ...\n",pkg->name);
}
@@ -715,10 +715,7 @@ void process_archive(const char *filename) {
newpossi->ed= possi->ed;
newpossi->next= 0; newpossi->nextrev= newpossi->backrev= 0;
newpossi->verrel= possi->verrel;
- if (possi->verrel != dvr_none) {
- newpossi->version= possi->version;
- newpossi->revision= possi->revision;
- }
+ if (possi->verrel != dvr_none) newpossi->version= possi->version;
newpossi->cyclebreak= 0;
*newpossilastp= newpossi;
newpossilastp= &newpossi->next;
@@ -746,7 +743,6 @@ void process_archive(const char *filename) {
pkg->installed.source= pkg->available.source;
pkg->installed.architecture= 0; /* This is irrelevant in the status file. */
pkg->installed.version= pkg->available.version;
- pkg->installed.revision= pkg->available.revision;
/* We have to generate our own conffiles structure. */
pkg->installed.conffiles= 0; iconffileslastp= &pkg->installed.conffiles;
@@ -844,8 +840,8 @@ void process_archive(const char *filename) {
maintainer_script_installed(otherpkg, POSTRMFILE,
"post-removal script (for disappearance)",
"disappear", pkg->name,
- versiondescribe(pkg->available.version,
- pkg->available.revision),
+ versiondescribe(&pkg->available.version,
+ vdew_nonambig),
(char*)0);
/* OK, now we delete all the stuff in the `info' directory .. */
@@ -881,8 +877,8 @@ void process_archive(const char *filename) {
otherpkg->installed.depends= 0;
otherpkg->installed.essential= 0;
- otherpkg->installed.description= otherpkg->installed.maintainer=
- otherpkg->installed.version= otherpkg->installed.revision= 0;
+ otherpkg->installed.description= otherpkg->installed.maintainer= 0;
+ blankversion(&otherpkg->installed.version);
otherpkg->installed.arbs= 0;
otherpkg->clientdata->fileslistvalid= 0;
diff --git a/main/remove.c b/main/remove.c
index 87cfbecc4..5f685f818 100644
--- a/main/remove.c
+++ b/main/remove.c
@@ -323,7 +323,7 @@ void removal_bulk(struct pkginfo *pkg) {
/* We're about to remove the configuration, so remove the note
* about which version it was ...
*/
- pkg->configversion= pkg->configrevision= 0;
+ blankversion(&pkg->configversion);
modstatdb_note(pkg);
/* Remove from our list any conffiles that aren't ours any more or
@@ -455,8 +455,8 @@ void removal_bulk(struct pkginfo *pkg) {
*/
pkg->installed.depends= 0;
pkg->installed.essential= 0;
- pkg->installed.description= pkg->installed.maintainer=
- pkg->installed.version= pkg->installed.revision= 0;
+ pkg->installed.description= pkg->installed.maintainer= 0;
+ blankversion(&pkg->installed.version);
pkg->installed.arbs= 0;
}