From: Ben Collins Date: Fri, 16 Jun 2000 13:19:46 +0000 (+0000) Subject: really fix ver provides X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=920036c1948bc5046d097a770033144cd3298828;p=dpkg really fix ver provides --- diff --git a/ChangeLog b/ChangeLog index 07ac8b0e..eee7d240 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Fri Jun 16 08:59:47 EDT 2000 Ben Collins + + * main/depcon.c: really fixup versioned provides this time. basically we + ignore the dvr_* of the provide, and use the version to decide if we + want to use it to satisfy the dep + * main/enquiry.c: ignore dvr_* type when checking for provides + Thu Jun 15 13:41:28 CEST 2000 Wichert Akkerman * lib/parse.c: add Enhances to fieldinfos[] diff --git a/main/enquiry.c b/main/enquiry.c index 4b3e2b31..51b5e1ec 100644 --- a/main/enquiry.c +++ b/main/enquiry.c @@ -603,7 +603,6 @@ void predeppackage(const char *const *argv) { if (trypkg->files && versionsatisfied(&trypkg->available,possi)) { if (trypkg->clientdata->istobe == itb_normal) { pkg= trypkg; break; } } - if (possi->verrel != dvr_none) continue; for (provider=possi->ed->available.depended; !pkg && provider; provider=provider->next) { diff --git a/main/packages.c b/main/packages.c index 0cb6aaaa..9ec840b2 100644 --- a/main/packages.c +++ b/main/packages.c @@ -252,7 +252,8 @@ static int deppossi_ok_found(struct pkginfo *possdependee, int *matched, struct deppossi *checkversion, int *interestingwarnings, - struct varbuf *oemsgs) { + struct varbuf *oemsgs, + struct deppossi *provider) { int thisf; if (ignore_depends(possdependee)) { @@ -278,18 +279,42 @@ static int deppossi_ok_found(struct pkginfo *possdependee, case stat_unpacked: case stat_halfconfigured: assert(possdependee->installed.valid); - if (checkversion && !versionsatisfied(&possdependee->installed,checkversion)) { - varbufaddstr(oemsgs,_(" Version of ")); - varbufaddstr(oemsgs,possdependee->name); - varbufaddstr(oemsgs,_(" on system is ")); - varbufaddstr(oemsgs,versiondescribe(&possdependee->installed.version, - vdew_nonambig)); - varbufaddstr(oemsgs,".\n"); - assert(checkversion->verrel != dvr_none); - if (fc_depends) thisf= (dependtry >= 3) ? 2 : 1; - debug(dbg_depcondetail," bad version, returning %d",thisf); - (*interestingwarnings)++; - return thisf; + if (checkversion) { + if (!provider) { + debug(dbg_depcondetail," checking non-provided pkg %s",possdependee->name); + if (versionsatisfied(&possdependee->installed,checkversion)) { + varbufaddstr(oemsgs,_(" Version of ")); + varbufaddstr(oemsgs,possdependee->name); + varbufaddstr(oemsgs,_(" on system is ")); + varbufaddstr(oemsgs,versiondescribe(&possdependee->installed.version, + vdew_nonambig)); + varbufaddstr(oemsgs,".\n"); + assert(checkversion->verrel != dvr_none); + if (fc_depends) thisf= (dependtry >= 3) ? 2 : 1; + debug(dbg_depcondetail," bad version, returning %d",thisf); + (*interestingwarnings)++; + return thisf; + } + } else { + debug(dbg_depcondetail," checking package %s provided by pkg %s", + checkversion->ed->name,possdependee->name); + if (versionsatisfied3(&checkversion->version,&provider->version, + checkversion->verrel)) { + varbufaddstr(oemsgs,_(" Version of ")); + varbufaddstr(oemsgs,checkversion->ed->name); + varbufaddstr(oemsgs,_(" on system, provided by ")); + varbufaddstr(oemsgs,possdependee->name); + varbufaddstr(oemsgs,_(", is ")); + varbufaddstr(oemsgs,versiondescribe(&provider->version, + vdew_nonambig)); + varbufaddstr(oemsgs,".\n"); + assert(checkversion->verrel != dvr_none); + if (fc_depends) thisf= (dependtry >= 3) ? 2 : 1; + debug(dbg_depcondetail," bad version, returning %d",thisf); + (*interestingwarnings)++; + return thisf; + } + } } if (possdependee->status == stat_installed) { debug(dbg_depcondetail," is installed, ok and found"); @@ -357,17 +382,21 @@ int dependencies_ok(struct pkginfo *pkg, struct pkginfo *removing, found= 3; break; } thisf= deppossi_ok_found(possi->ed,pkg,removing,0, - &matched,possi,&interestingwarnings,&oemsgs); + &matched,possi,&interestingwarnings,&oemsgs,NULL); if (thisf > found) found= thisf; - if (found != 3 && possi->verrel == dvr_none) { + if (found != 3) { if (possi->ed->installed.valid) { for (provider= possi->ed->installed.depended; found != 3 && provider; provider= provider->nextrev) { if (provider->up->type != dep_provides) continue; debug(dbg_depcondetail," checking provider %s",provider->up->up->name); - thisf= deppossi_ok_found(provider->up->up,pkg,removing,possi->ed, - &matched,0,&interestingwarnings,&oemsgs); + if (possi->verrel == dvr_none) + thisf= deppossi_ok_found(provider->up->up,pkg,removing,possi->ed, + &matched,NULL,&interestingwarnings,&oemsgs,NULL); + else + thisf= deppossi_ok_found(provider->up->up,pkg,removing,possi->ed, + &matched,possi,&interestingwarnings,&oemsgs,provider); if (thisf > found) found= thisf; } } diff --git a/po/dpkg.pot b/po/dpkg.pot index 7cc84f3f..6869f39d 100644 --- a/po/dpkg.pot +++ b/po/dpkg.pot @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2000-06-12 14:26+0000\n" +"POT-Creation-Date: 2000-06-15 14:33-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -669,297 +669,297 @@ msgstr "" msgid "failed to realloc for variable buffer" msgstr "" -#: main/archives.c:101 +#: main/archives.c:102 msgid "process_archive ... already disappeared !" msgstr "" -#: main/archives.c:127 +#: main/archives.c:128 msgid "error reading from dpkg-deb pipe" msgstr "" -#: main/archives.c:164 +#: main/archives.c:165 #, c-format msgid "error setting timestamps of `%.255s'" msgstr "" -#: main/archives.c:169 main/archives.c:424 +#: main/archives.c:170 main/archives.c:425 #, c-format msgid "error setting ownership of `%.255s'" msgstr "" -#: main/archives.c:171 main/archives.c:433 +#: main/archives.c:172 main/archives.c:434 #, c-format msgid "error setting permissions of `%.255s'" msgstr "" -#: main/archives.c:240 +#: main/archives.c:241 #, c-format msgid "" "tarobject ti->Name=`%s' Mode=%lo owner=%u.%u Type=%d(%c) ti->LinkName=`%s' " "namenode=`%s' flags=%o instead=`%s'" msgstr "" -#: main/archives.c:253 +#: main/archives.c:254 #, c-format msgid "" "trying to overwrite `%.250s', which is the diverted version of " "`%.250s'%.10s%.100s%.10s" msgstr "" -#: main/archives.c:257 +#: main/archives.c:258 msgid " (package: " msgstr "" -#: main/archives.c:279 +#: main/archives.c:280 #, c-format msgid "unable to stat `%.255s' (which I was about to install)" msgstr "" -#: main/archives.c:287 +#: main/archives.c:288 #, c-format msgid "" "unable to clean up mess surrounding `%.255s' before installing another " "version" msgstr "" -#: main/archives.c:293 +#: main/archives.c:294 #, c-format msgid "unable to stat restored `%.255s' before installing another version" msgstr "" -#: main/archives.c:325 +#: main/archives.c:326 #, c-format msgid "archive contained object `%.255s' of unknown type 0x%x" msgstr "" -#: main/archives.c:356 +#: main/archives.c:357 #, c-format msgid "Replacing files in old package %s ...\n" msgstr "" -#: main/archives.c:360 +#: main/archives.c:361 #, c-format msgid "" "trying to overwrite directory `%.250s' in package %.250s with nondirectory" msgstr "" -#: main/archives.c:370 +#: main/archives.c:371 #, c-format msgid "trying to overwrite `%.250s', which is also in package %.250s" msgstr "" -#: main/archives.c:398 +#: main/archives.c:399 #, c-format msgid "unable to fdopen for `%.255s'" msgstr "" -#: main/archives.c:407 +#: main/archives.c:408 #, c-format msgid "error reading dpkg-deb during `%.255s'" msgstr "" -#: main/archives.c:414 +#: main/archives.c:415 #, c-format msgid "error writing to `%.255s'" msgstr "" -#: main/archives.c:417 +#: main/archives.c:418 #, c-format msgid "tarobject ... stat override, uid=%d, gid=%d, mode=%04o" msgstr "" -#: main/archives.c:430 +#: main/archives.c:431 #, c-format msgid "error flushing `%.255s'" msgstr "" -#: main/archives.c:436 +#: main/archives.c:437 #, c-format msgid "error closing/writing `%.255s'" msgstr "" -#: main/archives.c:441 +#: main/archives.c:442 #, c-format msgid "error creating pipe `%.255s'" msgstr "" -#: main/archives.c:447 +#: main/archives.c:448 #, c-format msgid "error creating device `%.255s'" msgstr "" -#: main/archives.c:456 +#: main/archives.c:457 #, c-format msgid "error creating hard link `%.255s'" msgstr "" -#: main/archives.c:463 +#: main/archives.c:464 #, c-format msgid "error creating symbolic link `%.255s'" msgstr "" -#: main/archives.c:472 +#: main/archives.c:473 #, c-format msgid "error setting ownership of symlink `%.255s'" msgstr "" -#: main/archives.c:478 +#: main/archives.c:479 #, c-format msgid "error creating directory `%.255s'" msgstr "" -#: main/archives.c:513 +#: main/archives.c:514 #, c-format msgid "unable to move aside `%.255s' to install new version" msgstr "" -#: main/archives.c:526 +#: main/archives.c:527 #, c-format msgid "unable to make backup symlink for `%.255s'" msgstr "" -#: main/archives.c:532 +#: main/archives.c:533 #, c-format msgid "unable to chown backup symlink for `%.255s'" msgstr "" -#: main/archives.c:536 +#: main/archives.c:537 #, c-format msgid "unable to make backup link of `%.255s' before installing new version" msgstr "" -#: main/archives.c:542 +#: main/archives.c:543 #, c-format msgid "unable to install new version of `%.255s'" msgstr "" -#: main/archives.c:556 +#: main/archives.c:557 #, c-format msgid "" "dpkg: warning - ignoring dependency problem with removal of %s:\n" "%s" msgstr "" -#: main/archives.c:563 +#: main/archives.c:564 #, c-format msgid "" "dpkg: warning - considering deconfiguration of essential\n" " package %s, to enable removal of %s.\n" msgstr "" -#: main/archives.c:567 +#: main/archives.c:568 #, c-format msgid "" "dpkg: no, %s is essential, will not deconfigure\n" " it in order to enable removal of %s.\n" msgstr "" -#: main/archives.c:580 +#: main/archives.c:581 #, c-format msgid "" "dpkg: no, cannot remove %s (--auto-deconfigure will help):\n" "%s" msgstr "" -#: main/archives.c:614 +#: main/archives.c:615 #, c-format msgid "dpkg: considering removing %s in favour of %s ...\n" msgstr "" -#: main/archives.c:618 +#: main/archives.c:619 #, c-format msgid "%s is not properly installed - ignoring any dependencies on it.\n" msgstr "" -#: main/archives.c:645 +#: main/archives.c:646 #, c-format msgid "dpkg: may have trouble removing %s, as it provides %s ...\n" msgstr "" -#: main/archives.c:660 +#: main/archives.c:661 #, c-format msgid "" "dpkg: package %s requires reinstallation, but will remove anyway as you " "request.\n" msgstr "" -#: main/archives.c:663 +#: main/archives.c:664 #, c-format msgid "dpkg: package %s requires reinstallation, will not remove.\n" msgstr "" -#: main/archives.c:676 +#: main/archives.c:677 #, c-format msgid "dpkg: yes, will remove %s in favour of %s.\n" msgstr "" -#: main/archives.c:684 +#: main/archives.c:685 #, c-format msgid "" "dpkg: regarding %s containing %s:\n" "%s" msgstr "" -#: main/archives.c:687 +#: main/archives.c:688 #, c-format msgid "conflicting packages - not installing %.250s" msgstr "" -#: main/archives.c:688 +#: main/archives.c:689 msgid "dpkg: warning - ignoring conflict, may proceed anyway !\n" msgstr "" -#: main/archives.c:731 +#: main/archives.c:732 #, c-format msgid "--%s --recursive needs at least one path argument" msgstr "" -#: main/archives.c:760 +#: main/archives.c:761 msgid "failed to exec find for --recursive" msgstr "" -#: main/archives.c:764 +#: main/archives.c:765 msgid "failed to fdopen find's pipe" msgstr "" -#: main/archives.c:771 +#: main/archives.c:772 msgid "error reading find's pipe" msgstr "" -#: main/archives.c:772 +#: main/archives.c:773 msgid "error closing find's pipe" msgstr "" -#: main/archives.c:776 +#: main/archives.c:777 msgid "searched, but found no packages (files matching *.deb)" msgstr "" -#: main/archives.c:792 +#: main/archives.c:793 #, c-format msgid "--%s needs at least one package archive file argument" msgstr "" -#: main/archives.c:858 +#: main/archives.c:859 #, c-format msgid "Selecting previously deselected package %s.\n" msgstr "" -#: main/archives.c:863 +#: main/archives.c:864 #, c-format msgid "Skipping deselected package %s.\n" msgstr "" -#: main/archives.c:877 +#: main/archives.c:878 #, c-format msgid "Version %.250s of %.250s already installed, skipping.\n" msgstr "" -#: main/archives.c:889 +#: main/archives.c:890 #, c-format msgid "%s - warning: downgrading %.250s from %.250s to %.250s.\n" msgstr "" -#: main/archives.c:895 +#: main/archives.c:896 #, c-format msgid "Will not downgrade %.250s from version %.250s to %.250s, skipping.\n" msgstr "" @@ -1355,17 +1355,17 @@ msgstr "" msgid " %.250s is %s.\n" msgstr "" -#: main/depcon.c:297 +#: main/depcon.c:294 #, c-format msgid " %.250s provides %.250s but is to be removed.\n" msgstr "" -#: main/depcon.c:301 +#: main/depcon.c:298 #, c-format msgid " %.250s provides %.250s but is to be deconfigured.\n" msgstr "" -#: main/depcon.c:306 +#: main/depcon.c:303 #, c-format msgid " %.250s provides %.250s but is %s.\n" msgstr "" @@ -1373,28 +1373,28 @@ msgstr "" #. If the package wasn't installed at all, and we haven't said #. * yet why this isn't satisfied, we should say so now. #. -#: main/depcon.c:320 +#: main/depcon.c:317 #, c-format msgid " %.250s is not installed.\n" msgstr "" -#: main/depcon.c:351 +#: main/depcon.c:347 #, c-format msgid " %.250s (version %.250s) is to be installed.\n" msgstr "" -#: main/depcon.c:365 +#: main/depcon.c:361 #, c-format msgid " %.250s (version %.250s) is %s.\n" msgstr "" #. conflicts and provides the same -#: main/depcon.c:390 +#: main/depcon.c:383 #, c-format msgid " %.250s provides %.250s and is to be installed.\n" msgstr "" -#: main/depcon.c:421 +#: main/depcon.c:414 #, c-format msgid " %.250s provides %.250s and is %s.\n" msgstr "" @@ -1686,146 +1686,146 @@ msgid "" " " msgstr "" -#: main/filesdb.c:128 +#: main/filesdb.c:129 #, c-format msgid "unable to open files list file for package `%.250s'" msgstr "" -#: main/filesdb.c:133 +#: main/filesdb.c:134 #, c-format msgid "" "dpkg: serious warning: files list file for package `%.250s' missing, " "assuming package has no files currently installed.\n" msgstr "" -#: main/filesdb.c:172 +#: main/filesdb.c:173 #, c-format msgid "files list file for package `%.250s' contains empty filename" msgstr "" -#: main/filesdb.c:183 +#: main/filesdb.c:184 #, c-format msgid "error closing files list file for package `%.250s'" msgstr "" -#: main/filesdb.c:185 +#: main/filesdb.c:186 #, c-format msgid "files list file for package `%.250s' is truncated" msgstr "" -#: main/filesdb.c:216 +#: main/filesdb.c:217 msgid "(Reading database ... " msgstr "" -#: main/filesdb.c:216 +#: main/filesdb.c:217 msgid "(Scanning database ... " msgstr "" -#: main/filesdb.c:224 +#: main/filesdb.c:225 #, c-format msgid "%d files and directories currently installed.)\n" msgstr "" -#: main/filesdb.c:255 +#: main/filesdb.c:256 #, c-format msgid "unable to create updated files list file for package %s" msgstr "" -#: main/filesdb.c:265 +#: main/filesdb.c:266 #, c-format msgid "failed to write to updated files list file for package %s" msgstr "" -#: main/filesdb.c:267 +#: main/filesdb.c:268 #, c-format msgid "failed to flush updated files list file for package %s" msgstr "" -#: main/filesdb.c:269 +#: main/filesdb.c:270 #, c-format msgid "failed to sync updated files list file for package %s" msgstr "" -#: main/filesdb.c:272 +#: main/filesdb.c:273 #, c-format msgid "failed to close updated files list file for package %s" msgstr "" -#: main/filesdb.c:274 +#: main/filesdb.c:275 #, c-format msgid "failed to install updated files list file for package %s" msgstr "" -#: main/filesdb.c:339 +#: main/filesdb.c:340 msgid "failed to open statoverride file" msgstr "" -#: main/filesdb.c:343 -msgid "failed to fstat previous statoverride file" +#: main/filesdb.c:344 +msgid "failed to fstat statoverride file" msgstr "" -#: main/filesdb.c:345 -msgid "failed to fstat statoverride file" +#: main/filesdb.c:347 +msgid "failed to fstat previous statoverride file" msgstr "" -#: main/filesdb.c:381 +#: main/filesdb.c:384 msgid "statoverride file contains empty line" msgstr "" -#: main/filesdb.c:468 +#: main/filesdb.c:471 msgid "failed to open diversions file" msgstr "" -#: main/filesdb.c:472 +#: main/filesdb.c:475 msgid "failed to fstat previous diversions file" msgstr "" -#: main/filesdb.c:474 +#: main/filesdb.c:477 msgid "failed to fstat diversions file" msgstr "" -#: main/filesdb.c:494 +#: main/filesdb.c:497 msgid "fgets gave an empty string from diversions [i]" msgstr "" -#: main/filesdb.c:495 +#: main/filesdb.c:498 msgid "diversions file has too-long line or EOF [i]" msgstr "" -#: main/filesdb.c:501 +#: main/filesdb.c:504 msgid "read error in diversions [ii]" msgstr "" -#: main/filesdb.c:502 +#: main/filesdb.c:505 msgid "unexpected EOF in diversions [ii]" msgstr "" -#: main/filesdb.c:505 +#: main/filesdb.c:508 msgid "fgets gave an empty string from diversions [ii]" msgstr "" -#: main/filesdb.c:506 main/filesdb.c:517 +#: main/filesdb.c:509 main/filesdb.c:520 msgid "diversions file has too-long line or EOF [ii]" msgstr "" -#: main/filesdb.c:512 +#: main/filesdb.c:515 msgid "read error in diversions [iii]" msgstr "" -#: main/filesdb.c:513 +#: main/filesdb.c:516 msgid "unexpected EOF in diversions [iii]" msgstr "" -#: main/filesdb.c:516 +#: main/filesdb.c:519 msgid "fgets gave an empty string from diversions [iii]" msgstr "" -#: main/filesdb.c:524 +#: main/filesdb.c:527 #, c-format msgid "conflicting diversions involving `%.250s' or `%.250s'" msgstr "" -#: main/filesdb.c:533 +#: main/filesdb.c:536 msgid "read error in diversions [i]" msgstr ""