]> err.no Git - dpkg/commitdiff
* check if we violate conflicts/depends/pre-depends of other packages when
authorWichert Akkerman <wakkerma@debian.org>
Mon, 11 Oct 1999 14:12:08 +0000 (14:12 +0000)
committerWichert Akkerman <wakkerma@debian.org>
Mon, 11 Oct 1999 14:12:08 +0000 (14:12 +0000)
  processing an archive.
* Preparation to move start-stop-daemon from scripts to utils

ChangeLog
Makefile.am
main/processarc.c
scripts/Makefile.am
utils/.cvsignore [new file with mode: 0644]
utils/Makefile.am [new file with mode: 0644]
utils/start-stop-daemon.8 [moved from scripts/start-stop-daemon.8 with 100% similarity]
utils/start-stop-daemon.c [moved from scripts/start-stop-daemon.c with 100% similarity]

index f7341f22fe8c49240b5c5e0ea0f05975bd06ccbd..e70d30f14a8cc24bd9e3ed12b90c7c89e9cd6b59 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,8 +1,11 @@
 Mon Oct 11 15:47:18 CEST 1999 Wichert Akkerman <wakkerma@debian.org>
 
-  * Merge patch from Ben Collins <bcollins@debian.org>:
-    modify remove_buld to remove conffiles when purging a package before we
-    remove its directories.
+  * Preparation to move start-stop-daemon from scripts to utils
+  * Merge patches from Ben Collins <bcollins@debian.org>:
+    + modify remove_buld to remove conffiles when purging a package before we
+      remove its directories.
+    + check if we violate conflicts/depends/pre-depends of other packages when
+      processing an archive.
 
 Mon Oct 11 02:13:15 CEST 1999 Wichert Akkerman <wakkerma@debian.org>
 
index d717590bc35173e2e6a05e0a208ee1b068dad315..335f07a788f01c64abeec0da7fa1d9646ec15cab 100644 (file)
@@ -9,7 +9,7 @@ CPPSUBDIRS              =
 endif
 
 SUBDIRS                        = po intl include lib main dpkg-deb split \
-                         md5sum scripts $(CPPSUBDIRS) doc
+                         md5sum scripts utils $(CPPSUBDIRS) doc
 
 ## Directory definitions
 
index 2122a6201f88e070532faa52edb9a7a6c375797f..923313d55519141710b84e86073607248d3f555f 100644 (file)
@@ -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();
index 2cf1b61b06c4e6e4f0384e54ec8fd7bbe32cd79b..890ab63f54372208391c6c9a9fb041df30b56eaa 100644 (file)
@@ -22,9 +22,6 @@ bin_SCRIPTS           = dpkg-name dpkg-source dpkg-genchanges dpkg-gencontrol \
                          dpkg-distaddfile 822-date dpkg-scanpackages \
                          dpkg-scansources dpkg-architecture
 
-sbin_PROGRAMS          = start-stop-daemon
-start_stop_daemon_SOURCES      = start-stop-daemon.c
-
 sbin_SCRIPTS           = update-rc.d update-alternatives \
                          install-info dpkg-divert cleanup-info
 
@@ -34,7 +31,7 @@ lisp_LISP             = debian-changelog-mode.el
 ELCFILES               = debian-changelog-mode.elc
 
 man_MANS               = dpkg-name.1 dpkg-source.1 822-date.1 update-rc.d.8 \
-                         start-stop-daemon.8 update-alternatives.8 \
+                         update-alternatives.8 \
                          install-info.8 dpkg-scanpackages.8 \
                          dpkg-scansources.8 dpkg-architecture.1
 
diff --git a/utils/.cvsignore b/utils/.cvsignore
new file mode 100644 (file)
index 0000000..70845e0
--- /dev/null
@@ -0,0 +1 @@
+Makefile.in
diff --git a/utils/Makefile.am b/utils/Makefile.am
new file mode 100644 (file)
index 0000000..3b890ea
--- /dev/null
@@ -0,0 +1,31 @@
+## Process this file with automake to produce a Makefile.in
+
+AUTOMAKE_OPTIONS               = 1.1 foreign
+
+## Directory definitions
+
+pkglibdir              = $(libdir)/@PACKAGE@
+localedir              = $(datadir)/locale
+
+## Various options
+
+CFLAGS                 = @CFLAGS@ @CWARNS@ -g $(XCFLAGS) -DLOCALEDIR=\"$(localedir)\"
+OPTCFLAGS              = @CFLAGS@ @OPTCFLAGS@ @CWARNS@ -g $(XCFLAGS) -DLOCALEDIR=\"$(localedir)\"
+LDFLAGS                        = @LDFLAGS@ $(XLDFLAGS)
+LIBS                   = @INTLLIBS@ @LIBS@ $(XLIBS)
+
+CXXFLAGS               = @CXXFLAGS@ @CWARNS@ -g $(XCXXFLAGS) -DLOCALEDIR=\"$(localedir)\"
+OPTCXXFLAGS            = @CXXFLAGS @OPTCFLAGS@ @CWARNS@ -g $(XCXXFLAGS) -DLOCALEDIR=\"$(localedir)\"
+
+DEFS                   = -I$(top_srcdir)/include -I$(top_srcdir) -I$(srcdir) \
+                         -I$(top_builddir) -I$(top_builddir)/include -I. \
+                         -I$(top_srcdir)/intl -I$(top_builddir)/intl @DEFS@ \
+                         -DMKSPLITSCRIPT=\"$(pkglibdir)/mksplit\"
+## Automake variables
+
+sbin_PROGRAMS                  = start-stop-daemon
+start_stop_daemon_SOURCES      = start-stop-daemon.c
+
+man_MANS                       = start-stop-daemon.8
+
+## End of file.