From: Ben Collins Date: Sat, 23 Oct 1999 13:40:46 +0000 (+0000) Subject: * Leave file info intact in available when installing packages. MD5sum, X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cc48364971ff1854a16761e9f1bde4c6f782a9fa;p=dpkg * 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) --- diff --git a/ChangeLog b/ChangeLog index edbcdbb8..0065fb2b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Sat Oct 23 09:22:16 EDT 1999 Ben Collins + + * 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 * Fixed incorrect patch for --print-architecture (oops, oh well diff --git a/debian/changelog b/debian/changelog index 28fa8e37..b4c6948d 100644 --- a/debian/changelog +++ b/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 UNRELEASED +dpkg (1.4.1.18) unstable; urgency=low + + * Backout dep check patch + + -- Ben Collins 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 diff --git a/include/dpkg-db.h b/include/dpkg-db.h index eca6ed57..a1b89d92 100644 --- a/include/dpkg-db.h +++ b/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); diff --git a/lib/parse.c b/lib/parse.c index 258dc42d..1cdff088 100644 --- a/lib/parse.c +++ b/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; } diff --git a/main/processarc.c b/main/processarc.c index 3403f365..54e81358 100644 --- a/main/processarc.c +++ b/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();