]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
Always return IGNORE for pseudo packages in RPM_ONLY mode
authorMichael Schroeder <mls@suse.de>
Tue, 18 Feb 2014 14:34:40 +0000 (15:34 +0100)
committerMichael Schroeder <mls@suse.de>
Fri, 21 Feb 2014 16:51:51 +0000 (17:51 +0100)
The example codes already expect this behavior.

src/transaction.c

index f3a54ca32c3434b5170526183298182caf1b111d..4f71daabe16d888c4df1784ad0d1ef36e3e98e30 100644 (file)
@@ -250,13 +250,15 @@ transaction_type(Transaction *trans, Id p, int mode)
 
   if ((mode & SOLVER_TRANSACTION_RPM_ONLY) != 0)
     {
-      /* application wants to know what to feed to rpm */
+      /* application wants to know what to feed to the package manager */
+      if (is_pseudo_package(pool, s))
+       return SOLVER_TRANSACTION_IGNORE;
       if (type == SOLVER_TRANSACTION_ERASE || type == SOLVER_TRANSACTION_INSTALL || type == SOLVER_TRANSACTION_MULTIINSTALL)
        return type;
       if (s->repo == pool->installed)
        {
          /* check if we're a real package that is obsoleted by pseudos */
-         if (!is_pseudo_package(pool, s) && obsoleted_by_pseudos_only(trans, s - pool->solvables))
+         if (obsoleted_by_pseudos_only(trans, s - pool->solvables))
            return SOLVER_TRANSACTION_ERASE;
          return SOLVER_TRANSACTION_IGNORE;     /* ignore as we're being obsoleted */
        }