diff options
author | Ian Jackson <ian@chiark.chu.cam.ac.uk> | 1996-06-10 03:52:01 +0100 |
---|---|---|
committer | Ian Jackson <ian@chiark.chu.cam.ac.uk> | 1996-06-10 03:52:01 +0100 |
commit | f48836f8589e17fabed7bddcc402422b394e1820 (patch) | |
tree | 97a07c455310ae49790947bc0eef39205fbfada7 /lib | |
parent | d240358e13aef925147156a6a9687195554a9376 (diff) | |
download | dpkg-f48836f8589e17fabed7bddcc402422b394e1820.tar.gz |
dpkg (1.2.4); priority=MEDIUM
* New dpkg-name from Erick (<pkg>_<version>_<arch>.deb convention).
* Disappeared packages can't own conffiles any more ! (Bug#3214.)
* install-info creates Miscellaneous sections with a newline
following the heading. (Bug#3218.)
* cleanup-info script installed in /usr/sbin; called as appropriate
by postinst. Thanks to Kim-Minh Kaplan. (Bug#3125.)
* Allow superseded Essential packages to be purged after they've
been removed (clear the Essential flag on removal, and ignore it
on packages that are in stat_configfiles).
* dselect disk methods understand `y' as well as `yes' for using
development tree.
* dselect doesn't make packages appear as `new' again if update
of available packages fails.
* dselect places method selection cursor over option last selected.
* dpkg-scanpackages doesn't die when repeated packages are found.
* dpkg-scanpackages allows many old maintainers (`//'-separated).
* `Version' field is now mandatory (some operations already
wouldn't work right anyway if it was't there).
* update-rc.d(8) now says you must remove the script. (Bug#3215.)
* dpkg --force-help says that --force-overwrite is on by default.
* dpkg-deb manpage rewritten.
* debian.README (= /usr/doc/copyright/dpkg) edited slightly.
* Some database parsing grunge removed (pdb_preferversion, &c).
* Source tree doc/sgml contains some embryonic manuals.
* Leftover files in lib directory in source tree deleted.
-- Ian Jackson <ian@chiark.chu.cam.ac.uk> Mon, 10 Jun 1996 03:52:01 +0100
Diffstat (limited to 'lib')
-rw-r--r-- | lib/database.c | 5 | ||||
-rw-r--r-- | lib/dbmodify.c | 7 | ||||
-rw-r--r-- | lib/parse.c | 84 |
3 files changed, 49 insertions, 47 deletions
diff --git a/lib/database.c b/lib/database.c index 4f410488f..02c3c3cf9 100644 --- a/lib/database.c +++ b/lib/database.c @@ -145,11 +145,10 @@ int informative(struct pkginfo *pkg, struct pkginfoperfile *info) { * out. */ if (info == &pkg->installed && - ((pkg->want != want_unknown && pkg->want != want_purge) || + (pkg->want != want_unknown || pkg->eflag != eflagv_ok || pkg->status != stat_notinstalled || - informativeversion(&pkg->configversion) || - pkg->files)) + informativeversion(&pkg->configversion))) /* We ignore Section and Priority, as these tend to hang around. */ return 1; if (!info->valid) return 0; diff --git a/lib/dbmodify.c b/lib/dbmodify.c index 0fbbe9c57..54bb36a2a 100644 --- a/lib/dbmodify.c +++ b/lib/dbmodify.c @@ -179,8 +179,7 @@ enum modstatdb_rw modstatdb_init(const char *adir, enum modstatdb_rw readwritere if (cstatus != msdbrw_needsuperuserlockonly) { parsedb(statusfile, pdb_weakclassification, 0,0,0); parsedb(availablefile, - pdb_recordavailable|pdb_rejectstatus| - (cflags & msdbrw_availablepreferversion ? pdb_preferversion : 0), + pdb_recordavailable|pdb_rejectstatus, 0,0,0); } @@ -206,9 +205,7 @@ void modstatdb_shutdown(void) { switch (cstatus) { case msdbrw_write: checkpoint(); - if (!(cflags & msdbrw_availablepreferversion)) - writedb(availablefile,1,0); - + writedb(availablefile,1,0); /* tidy up a bit, but don't worry too much about failure */ fclose(importanttmp); strcpy(updatefnrest, IMPORTANTTMP); unlink(updatefnbuf); diff --git a/lib/parse.c b/lib/parse.c index 0d367f46c..e14db139f 100644 --- a/lib/parse.c +++ b/lib/parse.c @@ -197,7 +197,7 @@ int parsedb(const char *filename, enum parsedbflags flags, &newpifp->description, "description"); parsemustfield(file,filename,lno, warnto,warncount,&newpig,1, &newpifp->maintainer, "maintainer"); - parsemustfield(file,filename,lno, warnto,warncount,&newpig,1, + parsemustfield(file,filename,lno, warnto,warncount,&newpig,0, &newpifp->version.version, "version"); } if (flags & pdb_recordavailable) @@ -222,51 +222,57 @@ int parsedb(const char *filename, enum parsedbflags flags, } } + /* There was a bug that could make a not-installed package have + * conffiles, so we check for them here and remove them (rather than + * calling it an error, which will do at some point -- fixme). + */ + if (!(flags & pdb_recordavailable) && + newpig.status == stat_notinstalled && + newpifp->conffiles) { + parseerr(file,filename,lno, warnto,warncount,&newpig,1, + "Package which in state not-installed has conffiles, forgetting them"); + newpifp->conffiles= 0; + } + pigp= findpackage(newpig.name); pifp= (flags & pdb_recordavailable) ? &pigp->available : &pigp->installed; if (!pifp->valid) blankpackageperfile(pifp); - if (!(flags & pdb_preferversion) || - versioncompare(&newpifp->version,&pifp->version) >= 0) { - /* If we're ignoring older versions compare version numbers - * and only process this entry if it's a higher version. - */ - - /* Copy the priority and section across, but don't overwrite existing - * values if the pdb_weakclassification flag is set. - */ - if (newpig.section && *newpig.section && - !((flags & pdb_weakclassification) && pigp->section && *pigp->section)) - pigp->section= newpig.section; - if (newpig.priority != pri_unknown && - !((flags & pdb_weakclassification) && pigp->priority != pri_unknown)) { - pigp->priority= newpig.priority; - if (newpig.priority == pri_other) pigp->otherpriority= newpig.otherpriority; - } + /* Copy the priority and section across, but don't overwrite existing + * values if the pdb_weakclassification flag is set. + */ + if (newpig.section && *newpig.section && + !((flags & pdb_weakclassification) && pigp->section && *pigp->section)) + pigp->section= newpig.section; + if (newpig.priority != pri_unknown && + !((flags & pdb_weakclassification) && pigp->priority != pri_unknown)) { + pigp->priority= newpig.priority; + if (newpig.priority == pri_other) pigp->otherpriority= newpig.otherpriority; + } - /* Sort out the dependency mess. */ - copy_dependency_links(pigp,&pifp->depends,newpifp->depends, - (flags & pdb_recordavailable) ? 1 : 0); - /* Leave the `depended' pointer alone, we've just gone to such - * trouble to get it right :-). The `depends' pointer in - * pifp was indeed also updated by copy_dependency_links, - * but since the value was that from newpifp anyway there's - * no need to copy it back. - */ - newpifp->depended= pifp->depended; + /* Sort out the dependency mess. */ + copy_dependency_links(pigp,&pifp->depends,newpifp->depends, + (flags & pdb_recordavailable) ? 1 : 0); + /* Leave the `depended' pointer alone, we've just gone to such + * trouble to get it right :-). The `depends' pointer in + * pifp was indeed also updated by copy_dependency_links, + * but since the value was that from newpifp anyway there's + * no need to copy it back. + */ + newpifp->depended= pifp->depended; - /* Copy across data */ - memcpy(pifp,newpifp,sizeof(struct pkginfoperfile)); - if (!(flags & pdb_recordavailable)) { - pigp->want= newpig.want; - pigp->eflag= newpig.eflag; - pigp->status= newpig.status; - pigp->configversion= newpig.configversion; - pigp->files= 0; - } else { - pigp->files= newpig.files; - } + /* Copy across data */ + memcpy(pifp,newpifp,sizeof(struct pkginfoperfile)); + if (!(flags & pdb_recordavailable)) { + pigp->want= newpig.want; + pigp->eflag= newpig.eflag; + pigp->status= newpig.status; + pigp->configversion= newpig.configversion; + pigp->files= 0; + } else { + pigp->files= newpig.files; } + if (donep) *donep= pigp; pdone++; if (c == EOF) break; |