Bläddra i källkod

* Leave file info intact in available when installing packages. MD5sum,
Filename, and MSDOS-Filename used to get lost when installing a package.
* Backout dep check patch (merged from v1_4_1_18)

Ben Collins 27 år sedan
förälder
incheckning
cc48364971
5 ändrade filer med 30 tillägg och 29 borttagningar
  1. 6 0
      ChangeLog
  2. 10 1
      debian/changelog
  3. 2 1
      include/dpkg-db.h
  4. 1 1
      lib/parse.c
  5. 11 26
      main/processarc.c

+ 6 - 0
ChangeLog

@@ -1,3 +1,9 @@
+Sat Oct 23 09:22:16 EDT 1999 Ben Collins <bcollins.debian.org>
+
+  * Leave file info intact in available when installing packages. MD5sum,
+    Filename, and MSDOS-Filename used to get lost when installing a package.
+  * Backout dep check patch (merged from v1_4_1_18)
+
 Thu Oct 21 12:57:31 EDT 1999 Ben Collins <bcollins.debian.org>
 
   * Fixed incorrect patch for --print-architecture (oops, oh well

+ 10 - 1
debian/changelog

@@ -1,4 +1,4 @@
-dpkg (1.4.1.18) unstable; urgency=low
+dpkg (1.4.1.19) unstable; urgency=low
 
   * Fixed incorrect patch for --print-architecture (oops, oh well
     it was already broken when there was no gcc anyway :)
@@ -20,9 +20,18 @@ dpkg (1.4.1.18) unstable; urgency=low
   * minor script corrections
   * dpkg-dev control: Change gcc to c-compiler in the recommends field, and
     move cpio, patch and make to the depends line
+  * Leave file info intact in available when installing packages. MD5sum,
+    Filename, and MSDOS-Filename used to get lost when installing a
+    package.
 
  -- Wichert Akkerman <wakkerma@debian.org>  UNRELEASED
 
+dpkg (1.4.1.18) unstable; urgency=low
+
+  * Backout dep check patch
+
+ -- Ben Collins <bcollins@debian.org>  Sat, 23 Oct 1999 00:39:24 -0400
+
 dpkg (1.4.1.17) unstable; urgency=low
 
   * Add support for long filenames, along with --assert-longfilenames

+ 2 - 1
include/dpkg-db.h

@@ -183,7 +183,8 @@ void hashreport(FILE*);
 enum parsedbflags {
   pdb_recordavailable   =001, /* Store in `available' in-core structures, not `status' */
   pdb_rejectstatus      =002, /* Throw up an error if `Status' encountered             */
-  pdb_weakclassification=004  /* Ignore priority/section info if we already have any   */
+  pdb_weakclassification=004, /* Ignore priority/section info if we already have any   */
+  pdb_ignorefiles       =010  /* Ignore files info if we already have them             */
 };
 
 const char *illegal_packagename(const char *p, const char **ep);

+ 1 - 1
lib/parse.c

@@ -271,7 +271,7 @@ int parsedb(const char *filename, enum parsedbflags flags,
       pigp->status= newpig.status;
       pigp->configversion= newpig.configversion;
       pigp->files= 0;
-    } else {
+    } else if (!(flags & pdb_ignorefiles)) {
       pigp->files= newpig.files;
     }
 

+ 11 - 26
main/processarc.c

@@ -167,12 +167,14 @@ void process_archive(const char *filename) {
   waitsubproc(c1,BACKEND " --control",0);
   strcpy(cidirrest,CONTROLFILE);
 
-  parsedb(cidir, pdb_recordavailable|pdb_rejectstatus|pdb_weakclassification,
+  parsedb(cidir, pdb_recordavailable|pdb_rejectstatus|pdb_ignorefiles|pdb_weakclassification,
           &pkg,0,0);
-  pkg->files= nfmalloc(sizeof(struct filedetails));
-  pkg->files->next= 0;
-  pkg->files->name= pkg->files->msdosname= pkg->files->md5sum= 0;
-  pkg->files->size= nfmalloc(30);
+  if (!pkg->files) {
+    pkg->files= nfmalloc(sizeof(struct filedetails));
+    pkg->files->next= 0;
+    pkg->files->name= pkg->files->msdosname= pkg->files->md5sum= 0;
+    pkg->files->size= nfmalloc(30);
+  }
   sprintf(pkg->files->size,"%lu",(unsigned long)stab.st_size);
 
   if (cipaction->arg == act_avail) {
@@ -205,8 +207,6 @@ 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) {
@@ -240,25 +240,10 @@ void process_archive(const char *filename) {
       }
     }
   }
-  /* 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);
+  /* 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);
   }
   
   ensure_allinstfiles_available();