Here are some currently-known inadequacies:
urgent
- * Pre-Depends installation ordering
-
-done
- * a.out version
- * uncomment ELF preinst modification
- * Replaces (auto-deselect for conflicts)
- * Replaces (don't overwrite otherwise)
- * compile with ELF GCC out of the box
- * dpkg --print-architecture
- * Architecture field check
- * symlink rename change
+ * Conflicts << installation ordering
+ * Version numbers in pre-depends stuff
+ * Search for all pre-depends things at once, bomb out if any not found
bugs that need to be fixed quickly
* version numbers not starting digit early.
* remove old docs from /usr/doc/dpkg.
other stuff unlikely to get done soon
+ * md5sum component in new .deb files
+ * version number comparison option
+ * diversions list as control archive entry
* single maintainer script, and new package getting there first
* dpkg -s show something for virtual packages
- * dpkg --listfiles should do better for multi-package files (pkg, pkg: ...)
* settable defaults for update-rc.d
* local conffiles
* hooks
* `fake' or `null' packages
* --purge remove empty directories which used too contain conffiles
* conffiles handling options, including `replace removed files'
+
+done
+ * Pre-Depends installation ordering
+ * a.out version
+ * uncomment ELF preinst modification
+ * Replaces (auto-deselect for conflicts)
+ * Replaces (don't overwrite otherwise)
+ * compile with ELF GCC out of the box
+ * dpkg --print-architecture
+ * Architecture field check
+ * symlink rename change
+ * dpkg --listfiles should do better for multi-package files (pkg, pkg: ...)
+dpkg (1.1.6); priority=MEDIUM
+
+ * Check virtual dependencies when removing (ouch! - thanks SDE.)
+ * Fixed bug in internal database validity management that could
+ make dselect and dpkg dump core. (Bug#2613.)
+ * Fixed two coredumping bugs when using local diversions. (Bug#2804.)
+ * Fixed disappearance of overwritten packages. (Bug#2696.)
+ * install-info won't modify dir file before start of menu.
+ * install-info will create Miscellaneous heading if no sections yet.
+
+ * Only alphanums and +-. allowed in package names - enforced by
+ dpkg-deb --build and documented in Guidelines.
+ * dselect doesn't display packages unless they are installed, selected
+ or available.
+ * dselect doesn't show spurious section and priority headings.
+ * dselect has a few extra keybindings (from Lee Olds).
+ * --force message changed to `--force enabled' so that default is OK.
+
+ * dpkg-name now includes architecture component in .deb filename,
+ and translates - in package name to _.
+ * .deb file has architecture component in filename.
+
+ * Guidelines changed to say Pre-Depends is for experts only.
+ * Guidelines say to provide a unidiff (-u) rather than an old context diff.
+ * Guidelines say 755 root.root for shared libraries.
+
+ -- Ian Jackson <ian@chiark.chu.cam.ac.uk> Wed, 1 May 1996 00:47:22 +0100
+
dpkg (1.1.5); priority=MEDIUM (HIGH for diversions users)
* Fixed coredump when using diversions. (Bug#2603.)
* Fixed typo in dpkg-divert which could lose diversions. (Bug#2662.)
+ * --force-overwrite is the default.
* diversions.text provides better examples.
-- Ian Jackson <ian@chiark.chu.cam.ac.uk> Wed, 10 Apr 1996 13:59:30 +0100
#!/usr/bin/make -f
package=dpkg
-version=1.1.5
+version=1.1.6
archi=$(shell dpkg --print-architecture)
DIR:=$(shell pwd)
rm debian-tmp/var/lib/dpkg/{status,available}
dpkg --build debian-tmp
if file main/dpkg | grep -q ELF; then \
- mv debian-tmp.deb ../dpkg-$(version)elf.deb ; \
+ mv debian-tmp.deb ../dpkg-$(version)elf.$(archi).deb ; \
mv ../dpkg-$(version).nondebbin.tar.gz \
../dpkg-$(version)elf.nondebbin.tar.gz ; \
else \
- mv debian-tmp.deb ../dpkg-$(version).deb ; \
+ mv debian-tmp.deb ../dpkg-$(version).$(archi).deb ; \
fi
define checkdir
course, owned by the appropriate group.
* Library files should generally be mode 644 and owned by
- `root.root'. If the package requires different permissions or
- ownerships to function correctly, they should be used instead.
+ `root.root'; shared libraries should be mode 755. If the package
+ requires different permissions or ownerships to function
+ correctly, they should be used instead.
* Manual pages should be mode 644 and owned by `root.root'. The
`nroff' source must be installed. You should *not* install a
`<package>-<original_version>' (again, see the section below on
version numbering).
- * Create the context diff against the original package using `diff
- -cNr', and use `gzip -9' to compress it. Context diffs should be
+ * Create the unified context diff against the original package using
+ `diff -uNr', and use `gzip -9' to compress it. Diffs should be
named in the form <package>-<version>.diff.gz--for example,
`fileutils-3.9-3.diff.gz'.
The value of `Package' should be the name of the package. Package
names must start with an alphanumeric, must be at least two characters,
-and may contain only alphanumerics and the characters - + . @ : = % _
-(that is, hyphen, plus, stop, at, colon, equals, percent and
-underscore). They are not case sensitive.
+and may contain only alphanumerics and the characters - + . (that is,
+hyphen, plus, stop) (1). They are sort of case sensitive - please try
+to get the case right first time.
The `Maintainer' field should be in the form
`Pre-Depends'
Used by base packages to ensure that (for example) shared
- libraries are present befoore they are upgraded.
+ libraries are present before they are upgraded. This feature is
+ for expert use only.
`Source'
Gives the name of the source package when several binary packages
because older versions of those packages do not have the appropriate
`Provides' field.
+ ---------- Footnotes ----------
+
+ (1) The characters @ : = % _ (at, colon, equals, percent and
+underscore) used to be legal and are still accepted when found in a
+package file, but may not be used in new packages
+
\1f
File: guidelines.info, Node: conffiles, Next: Installation and Removal Scripts, Prev: control, Up: Control Files
@item
Library files should generally be mode 644 and owned by
-@code{root.root}. If the package requires different permissions
-or ownerships to function correctly, they should be used instead.
+@code{root.root}; shared libraries should be mode 755. If the package
+requires different permissions or ownerships to function correctly, they
+should be used instead.
@item
Manual pages should be mode 644 and owned by @code{root.root}. The
below on version numbering).
@item
-Create the context diff against the original package using @file{diff
--cNr}, and use @file{gzip -9} to compress it. Context diffs should be
-named in the form <@i{package}>-<@i{version}>.diff.gz---for example,
+Create the unified context diff against the original package using
+@file{diff -uNr}, and use @file{gzip -9} to compress it. Diffs should
+be named in the form <@i{package}>-<@i{version}>.diff.gz---for example,
@file{fileutils-3.9-3.diff.gz}.
@end itemize
Each field has a particular format and meaning for the package
installation tools.
-The value of @file{Package} should be the name of the package.
-Package names must start with an alphanumeric, must be at least two
-characters, and may contain only alphanumerics and the characters
-- + . @@ : = % _ (that is, hyphen, plus, stop, at, colon, equals,
-percent and underscore). They are not case sensitive.
+The value of @file{Package} should be the name of the package. Package
+names must start with an alphanumeric, must be at least two characters,
+and may contain only alphanumerics and the characters - + . (that is,
+hyphen, plus, stop) @footnote{The characters @@ : = % _ (at, colon,
+equals, percent and underscore) used to be legal and are still accepted
+when found in a package file, but may not be used in new packages}.
+They are sort of case sensitive - please try to get the case right first
+time.
The @code{Maintainer} field should be in the form
A boolean field used by the base packages.
@item Pre-Depends
Used by base packages to ensure that (for example) shared libraries are
-present befoore they are upgraded.
+present before they are upgraded. This feature is for expert use only.
@item Source
Gives the name of the source package when several binary packages are
generated from a single source tree.
parsedb(controlfile, pdb_recordavailable|pdb_rejectstatus,
&checkedinfo, stderr, &warns);
assert(checkedinfo->available.valid);
+ if (strspn(checkedinfo->name,
+ "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-.")
+ != strlen(checkedinfo->name))
+ ohshit("package name has characters that aren't alphanums or `-+.'");
if (checkedinfo->priority == pri_other) {
fprintf(stderr, "warning, `%s' contains user-defined Priority value `%s'\n",
controlfile, checkedinfo->otherpriority);
@@@ listkeys Keystrokes
Motion keys: Next/Previous, Top/End, Up/Down, Backwards/Forwards:
- n, Down-arrow p, Up-arrow move highlight
+ n, Down-arrow, j p, Up-arrow, k move highlight
N, Page-down, Space P, Page-up, Backspace scroll list by 1 page
^n ^p scroll list by 1 line
t, Home e, End jump to top/end of list
Quit, exit, overwrite (note capitals!): ? request help (also Help, F1)
Return Confirm and quit (check dependencies) i toggle/cycle info displays
Q Confirm and quit (override dep.s) o cycle through sort orders
- X eXit, abandoning any changes made v toggle verbose status display
+ X, Esc eXit, abandoning any changes made v toggle verbose status display
R Revert to state before this list ^l redraw display
U set all to sUggested state / search (hit Return to cancel)
D set all to Directly selected state \\ repeat last search
#define C(x) ((x)-'a'+1)
const keybindings::orgbinding methodlist_korgbindings[]= {
+ { 'j', "down" }, // vi style
{ 'n', "down" },
{ KEY_DOWN, "down" },
+ { 'k', "up" }, // vi style
{ 'p', "up" },
{ KEY_UP, "up" },
+ { C('f'), "scrollon" }, // vi style
{ 'N', "scrollon" },
{ KEY_NPAGE, "scrollon" },
{ ' ', "scrollon" },
+ { C('b'), "scrollback" }, // vi style
{ 'P', "scrollback" },
{ KEY_PPAGE, "scrollback" },
{ KEY_BACKSPACE, "scrollback" },
{ KEY_ENTER, "select-and-quit" },
{ '\r', "select-and-quit" },
+ { 27, "abort" }, // esc
{ 'x', "abort" },
{ 'X', "abort" },
#define C(x) ((x)-'a'+1)
const keybindings::orgbinding packagelist_korgbindings[]= {
+ { 'j', "down" }, // vi style
{ 'n', "down" },
{ KEY_DOWN, "down" },
+ { 'k', "up" }, // vi style
{ 'p', "up" },
{ KEY_UP, "up" },
{ 'P', "scrollback" },
{ KEY_PPAGE, "scrollback" },
{ KEY_BACKSPACE, "scrollback" },
- { 0177,/*DEL*/ "scrollback" },
+ { 0177, "scrollback" }, // ASCII DEL
{ C('h'), "scrollback" },
{ C('n'), "scrollon1" },
{ C('p'), "scrollback1" },
{ KEY_ENTER, "quitcheck" },
{ '\r', "quitcheck" },
{ 'Q', "quitnocheck" },
+ { 27, "abortnocheck" }, // esc
+ { 'x', "abortnocheck" },
{ 'X', "abortnocheck" },
{ 'R', "revert" },
{ 'U', "revertsuggest" },
!asection || !bsection ?
(!bsection) - (!asection) :
!*asection || !*bsection ?
- (!asection) - (!bsection) :
+ (!*asection) - (!*bsection) :
strcasecmp(asection,bsection);
int c_priority=
a->pkg->priority - b->pkg->priority;
nallocated += nallocated+50;
struct perpackagestate **newtable= new struct perpackagestate*[nallocated];
memcpy(newtable,table,nallocated*sizeof(struct perpackagestate*));
+ delete[] table;
table= newtable;
}
) {
struct perpackagestate *state= &datatable[nitems];
state->pkg= pkg;
- if (!informativeperfile(&pkg->available) &&
- pkg->status == pkginfo::stat_notinstalled &&
- pkg->priority == pkginfo::pri_unknown &&
- !(pkg->section && *pkg->section) &&
+ if (pkg->status == pkginfo::stat_notinstalled &&
!pkg->files &&
pkg->want != pkginfo::want_install) {
pkg->clientdata= 0; continue;
struct pkginfo *findpackage(const char *name);
void blankpackage(struct pkginfo *pp);
void blankpackageperfile(struct pkginfoperfile *pifp);
-int informative(struct pkginfo *info);
-int informativeperfile(struct pkginfoperfile *info);
+int informative(struct pkginfo *pkg, struct pkginfoperfile *info);
int countpackages(void);
void resetpackages(void);
static int nes(const char *s) { return s && *s; }
-int informativeperfile(struct pkginfoperfile *info) {
- /* Used by dselect as an aid to decide whether to display things. */
+int informative(struct pkginfo *pkg, struct pkginfoperfile *info) {
+ /* Used by dselect and dpkg query options as an aid to decide
+ * whether to display things, and by dump to decide whether to write them
+ * out.
+ */
+ if (info == &pkg->installed ?
+ ((pkg->want != want_unknown && pkg->want != want_purge) ||
+ pkg->eflag != eflagv_ok ||
+ pkg->status != stat_notinstalled ||
+ pkg->files)
+ :
+ (nes(pkg->section) ||
+ pkg->priority != pri_unknown))
+ return 1;
if (!info->valid) return 0;
if (info->depends ||
nes(info->description) ||
return 0;
}
-int informative(struct pkginfo *pkg) {
- return ((pkg->want != want_unknown && pkg->want != want_purge) ||
- pkg->eflag != eflagv_ok ||
- pkg->status != stat_notinstalled ||
- nes(pkg->section) ||
- pkg->files ||
- pkg->priority != pri_unknown);
-}
-
struct pkginfo *findpackage(const char *name) {
struct pkginfo **pointerp, *newpkg;
struct pkgiterator *it;
struct pkginfo *pigp;
+ struct pkginfoperfile *pifp;
char *oldfn, *newfn;
const char *which;
FILE *file;
it= iterpkgstart();
while ((pigp= iterpkgnext(it)) != 0) {
- if (!(informative(pigp) ||
- informativeperfile(&pigp->available) ||
- informativeperfile(&pigp->installed)))
- /* Don't dump records which have no useful content. */
- continue;
- varbufrecord(&vb, pigp, available ? &pigp->available : &pigp->installed);
+ pifp= available ? &pigp->available : &pigp->installed;
+ /* Don't dump records which have no useful content. */
+ if (!informative(pigp,pifp)) continue;
+ if (!pifp->valid) blankpackageperfile(pifp);
+ varbufrecord(&vb,pigp,pifp);
varbufaddc(&vb,'\n'); varbufaddc(&vb,0);
if (!fputs(vb.buf,file))
ohshite("failed to write %s record about `%.50s' to `%.250s'",
#include "main.h"
#include "archives.h"
+int filesavespackage(struct fileinlist *file, struct pkginfo *pkgtobesaved,
+ struct pkginfo *pkgbeinginstalled) {
+ struct pkginfo *divpkg, *thirdpkg;
+ struct filepackages *packageslump;
+ int i;
+
+ debug(dbg_eachfiledetail,"filesavespackage file `%s' package %s",
+ file->namenode->name,pkgtobesaved->name);
+ /* A package can only be saved by a file or directory which is part
+ * only of itself - it must be neither part of the new package being
+ * installed nor part of any 3rd package (this is important so that
+ * shared directories don't stop packages from disappearing).
+ */
+ /* Is the file in the package being installed ? If so then it can't save.
+ */
+ if (file->namenode->flags & fnnf_new_inarchive) {
+ debug(dbg_eachfiledetail,"filesavespackage ... in new archive -- no save");
+ return 0;
+ }
+ /* If the file is a contended one and it's overridden by either
+ * the package we're considering disappearing or the package
+ * we're installing then they're not actually the same file, so
+ * we can't disappear the package - it is saved by this file.
+ */
+ if (file->namenode->divert && file->namenode->divert->useinstead) {
+ divpkg= file->namenode->divert->pkg;
+ if (divpkg == pkgtobesaved || divpkg == pkgbeinginstalled) {
+ debug(dbg_eachfiledetail,"filesavespackage ... diverted -- save!");
+ return 1;
+ }
+ }
+ /* Look for a 3rd package which can take over the file (in case
+ * it's a directory which is shared by many packages.
+ */
+ for (packageslump= file->namenode->packages;
+ packageslump;
+ packageslump= packageslump->more) {
+ for (i=0; i < PERFILEPACKAGESLUMP && packageslump->pkgs[i]; i++) {
+ thirdpkg= packageslump->pkgs[i];
+ debug(dbg_eachfiledetail, "filesavespackage ... also in %s",
+ thirdpkg->name);
+ /* Is this not the package being installed or the one being
+ * checked for disappearance ?
+ */
+ if (thirdpkg == pkgbeinginstalled || thirdpkg == pkgtobesaved) continue;
+ /* If !fileslistvalid then we've already disappeared this one, so
+ * we shouldn't try to make it take over this shared directory.
+ */
+ debug(dbg_eachfiledetail,"filesavespackage ... is 3rd package");
+
+ if (!thirdpkg->clientdata->fileslistvalid) {
+ debug(dbg_eachfiledetail,
+ "process_archive ... already disappeared !");
+ continue;
+ }
+ /* We've found a package that can take this file. */
+ debug(dbg_eachfiledetail, "filesavespackage ... taken -- no save");
+ return 0;
+ }
+ }
+ debug(dbg_eachfiledetail, "filesavespackage ... not taken -- save !");
+ return 1;
+}
+
void cu_pathname(int argc, void **argv) {
ensure_pathname_nonexisting((char*)(argv[0]));
}
* check for both being the diverting package, obviously).
*/
divpkg= nifd->namenode->divert->pkg;
- debug(dbg_eachfile, "tarobject ... diverted, divpkg=%s\n",divpkg->name);
+ debug(dbg_eachfile, "tarobject ... diverted, divpkg=%s",
+ divpkg ? divpkg->name : "<none>");
if (otherpkg == divpkg || tc->pkg == divpkg) continue;
}
/* Nope ? Hmm, file conflict, perhaps. Check Replaces. */
int tarobject(struct TarInfo *ti);
int tarfileread(void *ud, char *buf, int len);
+int filesavespackage(struct fileinlist*, struct pkginfo*,
+ struct pkginfo *pkgbeinginstalled);
+
void check_conflict(struct dependency *dep, struct pkginfo *pkg,
const char *pfilename, struct pkginfo **conflictorp);
!(pkg->section && *pkg->section) &&
!pkg->files &&
pkg->want == want_unknown &&
- !informativeperfile(&pkg->installed)) {
+ !informative(pkg,&pkg->installed)) {
printf("Package `%s' is not installed and no info is available.\n",pkg->name);
failures++;
} else {
va_list al;
va_start(al,fmt);
if (forceflag) {
- fputs(DPKG " - warning, overriding problem because you used --force:\n ",stderr);
+ fputs(DPKG " - warning, overriding problem because --force enabled:\n ",stderr);
vfprintf(stderr,fmt,al);
fputc('\n',stderr);
} else {
static int deppossi_ok_found(struct pkginfo *possdependee,
struct pkginfo *requiredby,
struct pkginfo *removing,
+ struct pkginfo *providing,
int *matched,
struct deppossi *checkversion,
int *interestingwarnings,
if (possdependee == removing) {
varbufaddstr(oemsgs," Package ");
varbufaddstr(oemsgs,possdependee->name);
+ if (providing) {
+ varbufaddstr(oemsgs," which provides ");
+ varbufaddstr(oemsgs,providing->name);
+ }
varbufaddstr(oemsgs," is to be removed.\n");
*matched= 1;
if (fc_depends) thisf= (dependtry >= 4) ? 2 : 1;
} else {
varbufaddstr(oemsgs," Package ");
varbufaddstr(oemsgs,possdependee->name);
+ if (providing) {
+ varbufaddstr(oemsgs," which provides ");
+ varbufaddstr(oemsgs,providing->name);
+ }
varbufaddstr(oemsgs," is not configured yet.\n");
if (fc_depends) thisf= (dependtry >= 4) ? 2 : 1;
debug(dbg_depcondetail," not configured/able - returning %d",thisf);
default:
varbufaddstr(oemsgs," Package ");
varbufaddstr(oemsgs,possdependee->name);
+ if (providing) {
+ varbufaddstr(oemsgs," which provides ");
+ varbufaddstr(oemsgs,providing->name);
+ }
varbufaddstr(oemsgs," is not installed.\n");
if (fc_depends) thisf= (dependtry >= 4) ? 2 : 1;
debug(dbg_depcondetail," not installed - returning %d",thisf);
debug(dbg_depcondetail," break cycle so ok and found");
found= 3; break;
}
- thisf= deppossi_ok_found(possi->ed,pkg,removing,
+ thisf= deppossi_ok_found(possi->ed,pkg,removing,0,
&matched,possi,&interestingwarnings,&oemsgs);
if (thisf > found) found= thisf;
if (found != 3 && possi->verrel == dvr_none) {
provider= provider->nextrev) {
if (provider->up->type != dep_provides) continue;
debug(dbg_depcondetail," checking provider %s",provider->up->up->name);
- thisf= deppossi_ok_found(provider->up->up,pkg,removing,
+ thisf= deppossi_ok_found(provider->up->up,pkg,removing,possi->ed,
&matched,0,&interestingwarnings,&oemsgs);
if (thisf > found) found= thisf;
}
continue;
}
for (cfile= otherpkg->clientdata->files;
- cfile;
- cfile= cfile->next) {
- if (!(cfile->namenode->flags & fnnf_new_inarchive)) break;
- if (cfile->namenode->divert && cfile->namenode->divert->useinstead) {
- /* If the file is a contended one and it's overridden by either the package
- * we're considering disappearing or the package we're installing then
- * they're not actually the same file, so we can't disappear the package.
- */
- divpkg= cfile->namenode->divert->pkg;
- if (divpkg == pkg || divpkg == otherpkg) break;
- }
- }
- if (cfile) {
- debug(dbg_stupidlyverbose, "process_archive saved by `%s'",cfile->namenode->name);
- continue;
- }
+ cfile && !filesavespackage(cfile,otherpkg,pkg);
+ cfile= cfile->next);
+ if (cfile) continue;
/* So dependency things will give right answers ... */
otherpkg->clientdata->istobe= itb_remove;
} else {
debug(dbg_eachfile,
"process_archive looking for overwriting `%s' (overridden by %s)",
- cfile->namenode->name, divpkg->name);
+ cfile->namenode->name, divpkg ? divpkg->name : "<local>");
}
} else {
divpkg= 0;
#include "filesdb.h"
#include "main.h"
+static void checkforremoval(struct pkginfo *pkgtoremove,
+ struct pkginfo *pkgdepcheck, /* may be virtual pkg */
+ int *rokp, struct varbuf *raemsgs) {
+ struct deppossi *possi;
+ struct pkginfo *depender;
+ int before, ok;
+
+ for (possi= pkgdepcheck->installed.depended; possi; possi= possi->nextrev) {
+ if (possi->up->type != dep_depends && possi->up->type != dep_predepends) continue;
+ depender= possi->up->up;
+ debug(dbg_depcon,"checking depending package `%s'",depender->name);
+ if (depender->status != stat_installed) continue;
+ if (ignore_depends(depender)) {
+ debug(dbg_depcon,"ignoring depending package `%s'\n",depender->name);
+ continue;
+ }
+ if (dependtry > 1) { if (findbreakcycle(pkgdepcheck,0)) sincenothing= 0; }
+ before= raemsgs->used;
+ ok= dependencies_ok(depender,pkgtoremove,raemsgs);
+ if (ok == 0 && depender->clientdata->istobe == itb_remove) ok= 1;
+ if (ok == 1) raemsgs->used= before; /* Don't burble about reasons for deferral */
+ if (ok < *rokp) *rokp= ok;
+ }
+}
+
void deferred_remove(struct pkginfo *pkg) {
struct varbuf raemsgs;
- int rok, before, ok;
- struct deppossi *dep;
- struct pkginfo *depender;
+ int rok;
+ struct dependency *dep;
debug(dbg_general,"deferred_remove package %s",pkg->name);
debug(dbg_general,"checking dependencies for remove `%s'",pkg->name);
varbufinit(&raemsgs);
rok= 2;
- for (dep= pkg->installed.depended; dep; dep= dep->nextrev) {
- if (dep->up->type != dep_depends && dep->up->type != dep_predepends) continue;
- depender= dep->up->up;
- debug(dbg_depcon,"checking depending package `%s'",depender->name);
- if (depender->status != stat_installed) continue;
- if (ignore_depends(depender)) {
- debug(dbg_depcon,"ignoring depending package `%s'\n",depender->name);
- continue;
- }
- if (dependtry > 1) { if (findbreakcycle(pkg,0)) sincenothing= 0; }
- before= raemsgs.used;
- ok= dependencies_ok(depender,pkg,&raemsgs);
- if (ok == 0 && depender->clientdata->istobe == itb_remove) ok= 1;
- if (ok == 1) raemsgs.used= before; /* Don't burble about reasons for deferral */
- if (ok < rok) rok= ok;
+ checkforremoval(pkg,pkg,&rok,&raemsgs);
+ for (dep= pkg->installed.depends; dep; dep= dep->next) {
+ if (dep->type != dep_provides) continue;
+ debug(dbg_depcon,"checking virtual package `%s'",dep->list->ed->name);
+ checkforremoval(pkg,dep->list->ed,&rok,&raemsgs);
}
+
if (rok == 1) {
varbuffree(&raemsgs);
pkg->clientdata->istobe= itb_remove;
.\"
.\" This is free software; see the GNU General Public Licence version 2
.\" or later for copying conditions. There is NO warranty.
-.TH dpkg-name 1 "January 1996" "Debian Project" "Debian GNU/Linux"
+.TH dpkg-name 1 "April 1996" "Debian Project" "Debian Linux"
.SH NAME
dpkg\-name \- rename Debian packages to full package names
.SH SYNOPSIS
-.B dpkg\-name [\-h|\-\-help] [\-V|\-\-version] [\-L|\-\-license] [--] [files]
+.B dpkg\-name [\-h|\-\-help] [\-v|\-\-version] [\-l|\-\-license] [--] [files]
.SH DESCRIPTION
.PP
This manual page documents the
sh script which provides an easy way to rename
.B Debian
packages into their full package names. A full package name consists
-of <package>-<version>[-<revision>].deb as specified in the control
-file of the package.
+of <package>-<version>.<architecture>.deb as specified in the control
+file of the package (<version> is
+<mainstream-version>-<debian-revision>).
.SH EXAMPLES
.TP
.B dpkg-name toedeledokie
-The file `toedeledokie' will be renamed to emacs-19.29-4.deb or
+The file `toedeledokie' will be renamed to emacs-19.29-4.i386.deb or
something similar (depending on whatever information is in the control
part of `toedeledokie').
.TP
information and exit successfully.
.SH BUGS?
Successfully tested on
-.B Debian GNU/Linux
+.B Debian Linux
systems only. Some packages don't follow the name structure
-<package>-<version>[-<revision>].deb. Packages renamed by dpkg-name
+<package>-<version>.<architecture>.deb. Packages renamed by dpkg-name
will follow this structure. Generally this will have no impact on how
packages are installed by dselect/dpkg.
.SH SEE ALSO
set -e
prog="`basename \"${0}\"`"
-version="0.11"; # This line modified by Makefile
+version="1.1.5"; # This line modified by Makefile
purpose="rename Debian packages to full package names"
license () {
echo "# ${prog} ${version} -- ${purpose}
-# Copyright (C) 1995,1996 Erick Branderhorst <branderhorst@heel.fgg.eur.nl>.
+# Copyright (C) 1995,1996 Erick Branderhorst <branderh@debian.org>.
# This is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
usage () {
echo "Usage: ${prog} file[s]
${purpose}
- file.deb changes to <package>-<version>[-<revision>].deb
+ file.deb changes to <package>-<version>.<architecture>.deb
-h|--help|-v|--version|-l|--license Show help/version/license"
}
then
p=$p-$r;
fi
- p=`echo $p|sed 's/ //g'`
- p=`dirname "$1"`"/"$p.deb
+ a=`dpkg-deb -f -- "$1" architecture`;
+ if [ -z "$a" ];
+ then
+ a=`dpkg --print-architecture`;
+ stderr "assuming "$a" architecture for \`"$1"'";
+ fi
+ p=`echo \"$p\"|tr -ds -- '- ' _`
+ p=`dirname "$1"`"/"$p.$a.deb
if [ $p -ef "$1" ]; # same device and inode numbers
then
stderr "skipping \`"$1"'";
# Local variables:
# tab-width: 2
# End:
-
If a section is specified when removing an entry the section is
ignored and a warning is issued.
+
+If a section is requested when adding an entry but the file contains
+no section headings at all then
+.B install-info
+will create both the requested section and a Miscellaneous section at
+the end of the file.
.TP
.BI \-\-infodir= infodir
Specifies that the
close(OLD) || &ulquit("$name: close $infodir/dir after read: $!\n");
while ($work[$#work] !~ m/\S/) { $#work--; }
+do {
+ last if !@work;
+ $_= shift(@work);
+ push(@head,$_);
+} until (m/^\*\s*Menu:/i);
+
if (!$remove) {
for ($i=0; $i<=$#work; $i++) {
if ($mss < 0) {
print "$name: creating new section \`$sectiontitle'\n" unless $quiet;
for ($i= $#work; $i>=0 && $work[$i] =~ m/\S/; $i--) { }
- $i >= 0 || &ulquit("$name: nowhere to create new section - giving up\n");
- @work= (@work[0..$i], "$sectiontitle\n", "\n", @work[$i+1..$#work]);
- $mss= $i+1;
+ if ($i <= 0) { # We ran off the top, make this section and Misc.
+ print "$name: no sections yet, creating Miscellaneous section too.\n"
+ unless $quiet;
+ @work= ("\n", "$sectiontitle\n", "\n", "Miscellaneous:", @work);
+ $mss= 1;
+ } else {
+ @work= (@work[0..$i], "$sectiontitle\n", "\n", @work[$i+1..$#work]);
+ $mss= $i+1;
+ }
}
while ($mss <= $#work) {
$work[$mss] =~ m/\S/ || last;
if (!$nowrite) {
open(NEW,"> $infodir/dir.new") || &ulquit("$name: create $infodir/dir.new: $!\n");
- print(NEW @work) || &ulquit("$name: write $infodir/dir.new: $!\n");
+ print(NEW @head,@work) || &ulquit("$name: write $infodir/dir.new: $!\n");
close(NEW) || &ulquit("$name: close $infodir/dir.new: $!\n");
unlink("$infodir/dir.old");
-#define DPKG_VERSION "1.1.5" /* This line modified by Makefile */
+#define DPKG_VERSION "1.1.6" /* This line modified by Makefile */