summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorWichert Akkerman <wakkerma@debian.org>1999-10-11 14:12:08 +0000
committerWichert Akkerman <wakkerma@debian.org>1999-10-11 14:12:08 +0000
commit948a6d1d9e8b8028bb716a8d369b4da2ba9c203e (patch)
treebb5142b4b5960350818e80d27d8721c5238c389f /main
parent45cea05b531353384b912f2f02f3fd292f21dec1 (diff)
downloaddpkg-948a6d1d9e8b8028bb716a8d369b4da2ba9c203e.tar.gz
* check if we violate conflicts/depends/pre-depends of other packages when
processing an archive. * Preparation to move start-stop-daemon from scripts to utils
Diffstat (limited to 'main')
-rw-r--r--main/processarc.c25
1 files changed, 21 insertions, 4 deletions
diff --git a/main/processarc.c b/main/processarc.c
index 2122a6201..923313d55 100644
--- a/main/processarc.c
+++ b/main/processarc.c
@@ -206,6 +206,8 @@ void process_archive(const char *filename) {
return;
}
+ /* Check if anything is installed that we conflict with, or not installed
+ * that we need */
pkg->clientdata->istobe= itb_installnew;
conflictor= 0;
for (dsearch= pkg->available.depends; dsearch; dsearch= dsearch->next) {
@@ -239,10 +241,25 @@ void process_archive(const char *filename) {
}
}
}
- /* Look for things that conflict with us. */
- for (psearch= pkg->installed.depended; psearch; psearch= psearch->nextrev) {
- if (psearch->up->type != dep_conflicts) continue;
- check_conflict(psearch->up, pkg, pfilename, &conflictor);
+ /* Look for things that we will break if we are installed */
+ for (psearch= pkg->installed.depended; psearch; psearch= psearch->nextrev) {
+ if (psearch->up->type == dep_depends && !depisok(psearch->up,&depprobwhy,0,1)) {
+ varbufaddc(&depprobwhy,0);
+ fprintf(stderr, _("dpkg: regarding %s containing %s, dependency problem:\n%s"),
+ pfilename, pkg->name, depprobwhy.buf);
+ if (!force_depends(psearch->up->list))
+ ohshit(_("dependency problem - not installing %.250s"),pkg->name);
+ fprintf(stderr, _("dpkg: warning - ignoring dependency problem !\n"));
+ } else if (psearch->up->type == dep_predepends &&
+ !depisok(psearch->up,&depprobwhy,0,1)) {
+ varbufaddc(&depprobwhy,0);
+ fprintf(stderr, _("dpkg: regarding %s containing %s, pre-dependency problem:\n%s"),
+ pfilename, pkg->name, depprobwhy.buf);
+ if (!force_depends(psearch->up->list))
+ ohshit(_("pre-dependency problem - not installing %.250s"),pkg->name);
+ fprintf(stderr, _("dpkg: warning - ignoring pre-dependency problem !\n"));
+ } else if (psearch->up->type == dep_conflicts)
+ check_conflict(psearch->up, pkg, pfilename, &conflictor);
}
ensure_allinstfiles_available();