]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
support SOLVER_FLAG_DUP_ALLOW* flags in solver_set_flags and bindings
authorMichael Schroeder <mls@suse.de>
Wed, 26 Mar 2014 13:58:28 +0000 (14:58 +0100)
committerMichael Schroeder <mls@suse.de>
Wed, 26 Mar 2014 13:58:28 +0000 (14:58 +0100)
bindings/solv.i
doc/libsolv-bindings.3
doc/libsolv-bindings.txt
src/solver.c
src/solver.h

index b7fd80d13c820528c7ca15a7ccc75883265366f4..bf46c08aee02e6ec5e9e23d766e9c09d3eed185a 100644 (file)
@@ -2723,6 +2723,10 @@ rb_eval_string(
   static const int SOLVER_FLAG_NO_INFARCHCHECK = SOLVER_FLAG_NO_INFARCHCHECK;
   static const int SOLVER_FLAG_BEST_OBEY_POLICY = SOLVER_FLAG_BEST_OBEY_POLICY;
   static const int SOLVER_FLAG_NO_AUTOTARGET = SOLVER_FLAG_NO_AUTOTARGET;
+  static const int SOLVER_FLAG_DUP_ALLOW_DOWNGRADE = SOLVER_FLAG_DUP_ALLOW_DOWNGRADE;
+  static const int SOLVER_FLAG_DUP_ALLOW_ARCHCHANGE = SOLVER_FLAG_DUP_ALLOW_ARCHCHANGE;
+  static const int SOLVER_FLAG_DUP_ALLOW_VENDORCHANGE = SOLVER_FLAG_DUP_ALLOW_VENDORCHANGE;
+  static const int SOLVER_FLAG_DUP_ALLOW_NAMECHANGE = SOLVER_FLAG_DUP_ALLOW_NAMECHANGE;
 
   static const int SOLVER_REASON_UNRELATED = SOLVER_REASON_UNRELATED;
   static const int SOLVER_REASON_UNIT_RULE = SOLVER_REASON_UNIT_RULE;
index 402511d469fc877cd1e50b1c203b5a05a604b622..dd7519f529afac21c9eaa7b1c4260df1b94beceb 100644 (file)
@@ -2,12 +2,12 @@
 .\"     Title: Libsolv-Bindings
 .\"    Author: [see the "Author" section]
 .\" Generator: DocBook XSL Stylesheets v1.78.0 <http://docbook.sf.net/>
-.\"      Date: 03/04/2014
+.\"      Date: 03/26/2014
 .\"    Manual: LIBSOLV
 .\"    Source: libsolv
 .\"  Language: English
 .\"
-.TH "LIBSOLV\-BINDINGS" "3" "03/04/2014" "libsolv" "LIBSOLV"
+.TH "LIBSOLV\-BINDINGS" "3" "03/26/2014" "libsolv" "LIBSOLV"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -3069,7 +3069,7 @@ Do not change the state of the matched packages, i\&.e\&. when they are installe
 .PP
 \fBSOLVER_DISTUPGRADE\fR
 .RS 4
-Update the matching installed packages to the best version included in one of the repositories\&. After this operation, all come from one of the available repositories except orphaned packages\&. Orphaned packages are packages that have no relation to the packages in the repositories, i\&.e\&. no package in the repositories have the same name or obsolete the orphaned package\&. This action brings the installed packages in sync with the ones in the repository\&. It also turns of arch/vendor/version locking for the affected packages to simulate a fresh installation\&. This means that distupgrade can actually downgrade packages if only lower versions of a package are available in the repositories\&.
+Update the matching installed packages to the best version included in one of the repositories\&. After this operation, all come from one of the available repositories except orphaned packages\&. Orphaned packages are packages that have no relation to the packages in the repositories, i\&.e\&. no package in the repositories have the same name or obsolete the orphaned package\&. This action brings the installed packages in sync with the ones in the repository\&. By default it also turns of arch/vendor/version locking for the affected packages to simulate a fresh installation\&. This means that distupgrade can actually downgrade packages if only lower versions of a package are available in the repositories\&. You can tweak this behavior with the SOLVER_FLAG_DUP_ solver flags\&.
 .RE
 .PP
 \fBSOLVER_DROP_ORPHANED\fR
@@ -3325,6 +3325,26 @@ Allow the solver to change the name of an installed package, i\&.e\&. install a
 Allow the solver to erase installed packages to fulfill the jobs\&. This flag also includes the above flags\&. You may want to set this flag if you only have SOLVER_ERASE jobs, as in that case it\(cqs better for the user to check the transaction overview instead of approving every single package that needs to be erased\&.
 .RE
 .PP
+\fBSOLVER_FLAG_DUP_ALLOW_DOWNGRADE\fR
+.RS 4
+Like SOLVER_FLAG_ALLOW_DOWNGRADE, but used in distupgrade mode\&.
+.RE
+.PP
+\fBSOLVER_FLAG_DUP_ALLOW_ARCHCHANGE\fR
+.RS 4
+Like SOLVER_FLAG_ALLOW_ARCHCHANGE, but used in distupgrade mode\&.
+.RE
+.PP
+\fBSOLVER_FLAG_DUP_ALLOW_VENDORCHANGE\fR
+.RS 4
+Like SOLVER_FLAG_ALLOW_VENDORCHANGE, but used in distupgrade mode\&.
+.RE
+.PP
+\fBSOLVER_FLAG_DUP_ALLOW_NAMECHANGE\fR
+.RS 4
+Like SOLVER_FLAG_ALLOW_NAMECHANGE, but used in distupgrade mode\&.
+.RE
+.PP
 \fBSOLVER_FLAG_NO_UPDATEPROVIDE\fR
 .RS 4
 If multiple packages obsolete an installed package, the solver checks the provides of every such package and ignores all packages that do not provide the installed package name\&. Thus, you can have an official update candidate that provides the old name, and other packages that also obsolete the package but are not considered for updating\&. If you cannot use this feature, you can turn it off by setting this flag\&.
index eed9698f26eede39c66324f63053388ea0a10893..06e2bc99ee3228be9d0d456cede0708bb320ce3d 100644 (file)
@@ -1764,10 +1764,11 @@ repositories except orphaned packages. Orphaned packages are packages that
 have no relation to the packages in the repositories, i.e. no package in the
 repositories have the same name or obsolete the orphaned package.
 This action brings the installed packages in sync with the ones in the
-repository. It also turns of arch/vendor/version locking for the affected
-packages to simulate a fresh installation. This means that distupgrade can
+repository. By default it also turns of arch/vendor/version locking for the
+affected packages to simulate a fresh installation. This means that distupgrade can
 actually downgrade packages if only lower versions of a package are available
-in the repositories.
+in the repositories. You can tweak this behavior with the SOLVER_FLAG_DUP_
+solver flags.
 
 *SOLVER_DROP_ORPHANED*::
 Erase all the matching installed packages if they are orphaned. This only makes
@@ -1995,6 +1996,18 @@ flag if you only have SOLVER_ERASE jobs, as in that case it's
 better for the user to check the transaction overview instead of
 approving every single package that needs to be erased.
 
+*SOLVER_FLAG_DUP_ALLOW_DOWNGRADE*::
+Like SOLVER_FLAG_ALLOW_DOWNGRADE, but used in distupgrade mode.
+
+*SOLVER_FLAG_DUP_ALLOW_ARCHCHANGE*::
+Like SOLVER_FLAG_ALLOW_ARCHCHANGE, but used in distupgrade mode.
+
+*SOLVER_FLAG_DUP_ALLOW_VENDORCHANGE*::
+Like SOLVER_FLAG_ALLOW_VENDORCHANGE, but used in distupgrade mode.
+
+*SOLVER_FLAG_DUP_ALLOW_NAMECHANGE*::
+Like SOLVER_FLAG_ALLOW_NAMECHANGE, but used in distupgrade mode.
+
 *SOLVER_FLAG_NO_UPDATEPROVIDE*::
 If multiple packages obsolete an installed package, the solver checks
 the provides of every such package and ignores all packages that
index 8c8e164cdd13278dcf4b0e8023e6ee0af64cdc87..5405e9f917722928d56f662e6d35ea39906d4d14 100644 (file)
@@ -1630,6 +1630,14 @@ solver_get_flag(Solver *solv, int flag)
     return solv->bestobeypolicy;
   case SOLVER_FLAG_NO_AUTOTARGET:
     return solv->noautotarget;
+  case SOLVER_FLAG_DUP_ALLOW_DOWNGRADE:
+    return solv->dup_allowdowngrade;
+  case SOLVER_FLAG_DUP_ALLOW_NAMECHANGE:
+    return solv->dup_allownamechange;
+  case SOLVER_FLAG_DUP_ALLOW_ARCHCHANGE:
+    return solv->dup_allowarchchange;
+  case SOLVER_FLAG_DUP_ALLOW_VENDORCHANGE:
+    return solv->dup_allowvendorchange;
   default:
     break;
   }
@@ -1681,6 +1689,18 @@ solver_set_flag(Solver *solv, int flag, int value)
   case SOLVER_FLAG_NO_AUTOTARGET:
     solv->noautotarget = value;
     break;
+  case SOLVER_FLAG_DUP_ALLOW_DOWNGRADE:
+    solv->dup_allowdowngrade = value;
+    break;
+  case SOLVER_FLAG_DUP_ALLOW_NAMECHANGE:
+    solv->dup_allownamechange = value;
+    break;
+  case SOLVER_FLAG_DUP_ALLOW_ARCHCHANGE:
+    solv->dup_allowarchchange = value;
+    break;
+  case SOLVER_FLAG_DUP_ALLOW_VENDORCHANGE:
+    solv->dup_allowvendorchange = value;
+    break;
   default:
     break;
   }
index 76466245562ca24afe119948074720382979d790..b14e367e648e16405a0a1b49acc415758a814048 100644 (file)
@@ -275,6 +275,10 @@ typedef struct _Solver Solver;
 #define SOLVER_FLAG_KEEP_EXPLICIT_OBSOLETES    11
 #define SOLVER_FLAG_BEST_OBEY_POLICY           12
 #define SOLVER_FLAG_NO_AUTOTARGET              13
+#define SOLVER_FLAG_DUP_ALLOW_DOWNGRADE                14
+#define SOLVER_FLAG_DUP_ALLOW_ARCHCHANGE       15
+#define SOLVER_FLAG_DUP_ALLOW_VENDORCHANGE     16
+#define SOLVER_FLAG_DUP_ALLOW_NAMECHANGE       17
 
 extern Solver *solver_create(Pool *pool);
 extern void solver_free(Solver *solv);