Procházet zdrojové kódy

main/package.c: Hack up things so a package which
provides/conflicts/replaces it's own virtual can be installed (can't
be removed yet, but hey...)

Ben Collins před 26 roky
rodič
revize
64ed4285db
1 změnil soubory, kde provedl 7 přidání a 0 odebrání
  1. 7 0
      main/packages.c

+ 7 - 0
main/packages.c

@@ -424,6 +424,13 @@ int dependencies_ok(struct pkginfo *pkg, struct pkginfo *removing,
 	      thisf= deppossi_ok_found(provider->up->up,pkg,removing,possi->ed,
 				       &matched,possi,&interestingwarnings,&oemsgs,provider);
 	    }
+	    if (thisf == 1 && provider->up->up == pkg && !removing) {
+	      /* IOW, if the pkg satisfies it's own dep (via a provide),
+	       * then we let it pass, even if it isn't configured yet
+	       * (duh, we're installing it!) -- Ben
+	       */
+	       thisf = 3;
+	    }
             if (thisf > found) found= thisf;
           }
         }