瀏覽代碼

* 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

Wichert Akkerman 27 年之前
父節點
當前提交
948a6d1d9e
共有 8 個文件被更改,包括 61 次插入12 次删除
  1. 6 3
      ChangeLog
  2. 1 1
      Makefile.am
  3. 21 4
      main/processarc.c
  4. 1 4
      scripts/Makefile.am
  5. 1 0
      utils/.cvsignore
  6. 31 0
      utils/Makefile.am
  7. 0 0
      utils/start-stop-daemon.8
  8. 0 0
      utils/start-stop-daemon.c

+ 6 - 3
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>
 

+ 1 - 1
Makefile.am

@@ -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
 

+ 21 - 4
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();

+ 1 - 4
scripts/Makefile.am

@@ -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
 

+ 1 - 0
utils/.cvsignore

@@ -0,0 +1 @@
+Makefile.in

+ 31 - 0
utils/Makefile.am

@@ -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.

scripts/start-stop-daemon.8 → utils/start-stop-daemon.8


scripts/start-stop-daemon.c → utils/start-stop-daemon.c