]> err.no Git - dpkg/commitdiff
versioned provides
authorBen Collins <bcollins@debian.org>
Thu, 15 Jun 2000 14:19:28 +0000 (14:19 +0000)
committerBen Collins <bcollins@debian.org>
Thu, 15 Jun 2000 14:19:28 +0000 (14:19 +0000)
ChangeLog
debian/changelog
dselect/pkgsublist.cc
main/depcon.c

index c330e78cade4e82f7dde2ee61d04ca2c182ed625..699764f455856f342f4f2e7ef789f85158b9853f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Thu Jun 15 10:09:03 EDT 2000 Ben Collins <bcollins@debian.org>
+
+  * main/depcon.c: remove if() that prevented versioned deps from checking
+    provides to satisfy them
+  * dselect/pkgsublist.cc: Same
+
 Tue Jun 13 22:11:22 CEST 2000 peter karlsson <peter@softwolves.pp.se>
 
   * po/sv.po: Updated Swedish translation
index 07bc2605c3d6e96808572b3c1254da1e499e15a5..337bde6916db96c621a2c27a64294997bb1a5a39 100644 (file)
@@ -12,6 +12,7 @@ dpkg (1.7.0) unstable; urgency=low
   * dpkg-genchanges: allow a space between # and a to-be-closed bugnumber
   * dpkg-deb: reorder files when building a package
   * dpkg-statoverride: new tool to override ownership and modes for files
+  * Modify dpkg and dselect to allow versioned provides
 
  -- Wichert Akkerman <wakkerma@debian.org>  UNRELEASED
 
index 71d18ffbb0b03db4a98bdac9e61349097778f0f9..77ca806e28c9a470dbfa34032c1de62393f02e55 100644 (file)
@@ -137,9 +137,8 @@ int packagelist::add(dependency *depends, showpriority displayimportance) {
   add(depends->up,info.string(),displayimportance);
   for (possi=depends->list; possi; possi=possi->next) {
     add(possi->ed,info.string(),displayimportance);
-    if (possi->verrel == dvr_none && depends->type != dep_provides) {
-      // providers aren't relevant if a version was specified, or
-      // if we're looking at a provider relationship already
+    if (depends->type != dep_provides) {
+      // providers aren't relevant if we're looking at a provider relationship already
       deppossi *provider;
       for (provider= possi->ed->available.valid ? possi->ed->available.depended : 0;
            provider;
index b64f5218c8cfda1f322eb1e9a389ca49049e0496..3ff097f81f8548413c2af3735f57e3d3d1e53a5d 100644 (file)
@@ -268,58 +268,54 @@ int depisok(struct dependency *dep, struct varbuf *whynot,
       }
       varbufaddstr(whynot, linebuf);
 
-      /* If there was no version specified we try looking for Providers. */
-      if (possi->verrel == dvr_none) {
-        
-        /* See if the package we're about to install Provides it. */
-        for (provider= possi->ed->available.depended;
-             provider;
-             provider= provider->nextrev) {
-          if (provider->up->type != dep_provides) continue;
-          if (provider->up->up->clientdata->istobe == itb_installnew) return 1;
-        }
+      /* See if the package we're about to install Provides it. */
+      for (provider= possi->ed->available.depended;
+           provider;
+           provider= provider->nextrev) {
+        if (provider->up->type != dep_provides) continue;
+        if (provider->up->up->clientdata->istobe == itb_installnew) return 1;
+      }
 
-        /* Now look at the packages already on the system. */
-        for (provider= possi->ed->installed.depended;
-             provider;
-             provider= provider->nextrev) {
-          if (provider->up->type != dep_provides) continue;
-          
-          switch (provider->up->up->clientdata->istobe) {
-          case itb_installnew:
-            /* Don't pay any attention to the Provides field of the
-             * currently-installed version of the package we're trying
-             * to install.  We dealt with that by using the available
-             * information above.
-             */
-            continue; 
-          case itb_remove:
-            sprintf(linebuf, _("  %.250s provides %.250s but is to be removed.\n"),
-                    provider->up->up->name, possi->ed->name);
-            break;
-          case itb_deconfigure:
-            sprintf(linebuf, _("  %.250s provides %.250s but is to be deconfigured.\n"),
-                    provider->up->up->name, possi->ed->name);
-            break;
-          case itb_normal: case itb_preinstall:
-            if (provider->up->up->status == stat_installed) return 1;
-            sprintf(linebuf, _("  %.250s provides %.250s but is %s.\n"),
-                    provider->up->up->name, possi->ed->name,
-                    gettext(statusstrings[provider->up->up->status]));
-            break;
-          default:
-            internerr("unknown istobe provider");
-          }
-          varbufaddstr(whynot, linebuf);
-        }
+      /* Now look at the packages already on the system. */
+      for (provider= possi->ed->installed.depended;
+           provider;
+           provider= provider->nextrev) {
+        if (provider->up->type != dep_provides) continue;
         
-        if (!*linebuf) {
-          /* If the package wasn't installed at all, and we haven't said
-           * yet why this isn't satisfied, we should say so now.
+        switch (provider->up->up->clientdata->istobe) {
+        case itb_installnew:
+          /* Don't pay any attention to the Provides field of the
+           * currently-installed version of the package we're trying
+           * to install.  We dealt with that by using the available
+           * information above.
            */
-          sprintf(linebuf, _("  %.250s is not installed.\n"), possi->ed->name);
-          varbufaddstr(whynot, linebuf);
+          continue; 
+        case itb_remove:
+          sprintf(linebuf, _("  %.250s provides %.250s but is to be removed.\n"),
+                  provider->up->up->name, possi->ed->name);
+          break;
+        case itb_deconfigure:
+          sprintf(linebuf, _("  %.250s provides %.250s but is to be deconfigured.\n"),
+                  provider->up->up->name, possi->ed->name);
+          break;
+        case itb_normal: case itb_preinstall:
+          if (provider->up->up->status == stat_installed) return 1;
+          sprintf(linebuf, _("  %.250s provides %.250s but is %s.\n"),
+                  provider->up->up->name, possi->ed->name,
+                  gettext(statusstrings[provider->up->up->status]));
+          break;
+        default:
+          internerr("unknown istobe provider");
         }
+        varbufaddstr(whynot, linebuf);
+      }
+      
+      if (!*linebuf) {
+        /* If the package wasn't installed at all, and we haven't said
+         * yet why this isn't satisfied, we should say so now.
+         */
+        sprintf(linebuf, _("  %.250s is not installed.\n"), possi->ed->name);
+        varbufaddstr(whynot, linebuf);
       }
     }
 
@@ -377,60 +373,56 @@ int depisok(struct dependency *dep, struct varbuf *whynot,
       }
     }
 
-    /* If there was no version specified we try looking for Providers. */
-    if (possi->verrel == dvr_none) {
-        
-      /* See if the package we're about to install Provides it. */
-      for (provider= possi->ed->available.depended;
-           provider;
-           provider= provider->nextrev) {
-        if (provider->up->type != dep_provides) continue;
-        if (provider->up->up->clientdata->istobe != itb_installnew) continue;
-        if (provider->up->up == dep->up) continue; /* conflicts and provides the same */
-        sprintf(linebuf, _("  %.250s provides %.250s and is to be installed.\n"),
-                provider->up->up->name, possi->ed->name);
-        varbufaddstr(whynot, linebuf);
-        /* We can't remove the one we're about to install: */
-        if (canfixbyremove) *canfixbyremove= 0;
-        return 0;
-      }
+    /* See if the package we're about to install Provides it. */
+    for (provider= possi->ed->available.depended;
+         provider;
+         provider= provider->nextrev) {
+      if (provider->up->type != dep_provides) continue;
+      if (provider->up->up->clientdata->istobe != itb_installnew) continue;
+      if (provider->up->up == dep->up) continue; /* conflicts and provides the same */
+      sprintf(linebuf, _("  %.250s provides %.250s and is to be installed.\n"),
+              provider->up->up->name, possi->ed->name);
+      varbufaddstr(whynot, linebuf);
+      /* We can't remove the one we're about to install: */
+      if (canfixbyremove) *canfixbyremove= 0;
+      return 0;
+    }
 
-      /* Now look at the packages already on the system. */
-      for (provider= possi->ed->installed.depended;
-           provider;
-           provider= provider->nextrev) {
-        if (provider->up->type != dep_provides) continue;
-          
-        if (provider->up->up == dep->up) continue; /* conflicts and provides the same */
+    /* Now look at the packages already on the system. */
+    for (provider= possi->ed->installed.depended;
+         provider;
+         provider= provider->nextrev) {
+      if (provider->up->type != dep_provides) continue;
         
-        switch (provider->up->up->clientdata->istobe) {
-        case itb_installnew:
-          /* Don't pay any attention to the Provides field of the
-           * currently-installed version of the package we're trying
-           * to install.  We dealt with that package by using the
-           * available information above.
-           */
-          continue; 
-        case itb_remove:
+      if (provider->up->up == dep->up) continue; /* conflicts and provides the same */
+      
+      switch (provider->up->up->clientdata->istobe) {
+      case itb_installnew:
+        /* Don't pay any attention to the Provides field of the
+         * currently-installed version of the package we're trying
+         * to install.  We dealt with that package by using the
+         * available information above.
+         */
+        continue; 
+      case itb_remove:
+        continue;
+      case itb_normal: case itb_deconfigure: case itb_preinstall:
+        switch (provider->up->up->status) {
+        case stat_notinstalled: case stat_configfiles:
           continue;
-        case itb_normal: case itb_deconfigure: case itb_preinstall:
-          switch (provider->up->up->status) {
-          case stat_notinstalled: case stat_configfiles:
-            continue;
-          default:
-            sprintf(linebuf, _("  %.250s provides %.250s and is %s.\n"),
-                    provider->up->up->name, possi->ed->name,
-                    gettext(statusstrings[provider->up->up->status]));
-            varbufaddstr(whynot, linebuf);
-            if (!canfixbyremove) return 0;
-            nconflicts++;
-            *canfixbyremove= provider->up->up;
-            break;
-          }
-          break;
         default:
-          internerr("unknown istobe conflict provider");
+          sprintf(linebuf, _("  %.250s provides %.250s and is %s.\n"),
+                  provider->up->up->name, possi->ed->name,
+                  gettext(statusstrings[provider->up->up->status]));
+          varbufaddstr(whynot, linebuf);
+          if (!canfixbyremove) return 0;
+          nconflicts++;
+          *canfixbyremove= provider->up->up;
+          break;
         }
+        break;
+      default:
+        internerr("unknown istobe conflict provider");
       }
     }