From 948a6d1d9e8b8028bb716a8d369b4da2ba9c203e Mon Sep 17 00:00:00 2001 From: Wichert Akkerman Date: Mon, 11 Oct 1999 14:12:08 +0000 Subject: [PATCH] * 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 --- ChangeLog | 9 +++++--- Makefile.am | 2 +- main/processarc.c | 25 +++++++++++++++++---- scripts/Makefile.am | 5 +---- utils/.cvsignore | 1 + utils/Makefile.am | 31 ++++++++++++++++++++++++++ {scripts => utils}/start-stop-daemon.8 | 0 {scripts => utils}/start-stop-daemon.c | 0 8 files changed, 61 insertions(+), 12 deletions(-) create mode 100644 utils/.cvsignore create mode 100644 utils/Makefile.am rename {scripts => utils}/start-stop-daemon.8 (100%) rename {scripts => utils}/start-stop-daemon.c (100%) diff --git a/ChangeLog b/ChangeLog index f7341f22..e70d30f1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,11 @@ Mon Oct 11 15:47:18 CEST 1999 Wichert Akkerman - * Merge patch from Ben Collins : - 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 : + + 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 diff --git a/Makefile.am b/Makefile.am index d717590b..335f07a7 100644 --- a/Makefile.am +++ b/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 diff --git a/main/processarc.c b/main/processarc.c index 2122a620..923313d5 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(); diff --git a/scripts/Makefile.am b/scripts/Makefile.am index 2cf1b61b..890ab63f 100644 --- a/scripts/Makefile.am +++ b/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 diff --git a/utils/.cvsignore b/utils/.cvsignore new file mode 100644 index 00000000..70845e08 --- /dev/null +++ b/utils/.cvsignore @@ -0,0 +1 @@ +Makefile.in diff --git a/utils/Makefile.am b/utils/Makefile.am new file mode 100644 index 00000000..3b890ea4 --- /dev/null +++ b/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. diff --git a/scripts/start-stop-daemon.8 b/utils/start-stop-daemon.8 similarity index 100% rename from scripts/start-stop-daemon.8 rename to utils/start-stop-daemon.8 diff --git a/scripts/start-stop-daemon.c b/utils/start-stop-daemon.c similarity index 100% rename from scripts/start-stop-daemon.c rename to utils/start-stop-daemon.c -- 2.39.5