Mailinglist Archive: zypp-commit (301 mails)

< Previous Next >
[zypp-commit] r7724 - /trunk/sat-solver/testsuite/deptestomatic.c
  • From: coolo@xxxxxxxxxxxxxxxx
  • Date: Wed, 31 Oct 2007 11:02:46 -0000
  • Message-id: <20071031110246.E84AD17401@xxxxxxxxxxxxxxxx>
Author: coolo
Date: Wed Oct 31 12:02:46 2007
New Revision: 7724

URL: http://svn.opensuse.org/viewcvs/zypp?rev=7724&view=rev
Log:
allow arch change and downgrade on fully specificied
solvables - the problem is that I can't tell the solver
to either force that solvable or only downgrade that one

Modified:
trunk/sat-solver/testsuite/deptestomatic.c

Modified: trunk/sat-solver/testsuite/deptestomatic.c
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/testsuite/deptestomatic.c?rev=7724&r1=7723&r2=7724&view=diff
==============================================================================
--- trunk/sat-solver/testsuite/deptestomatic.c (original)
+++ trunk/sat-solver/testsuite/deptestomatic.c Wed Oct 31 12:02:46 2007
@@ -171,6 +171,7 @@
int allowdowngrade; /* 0/1, if version downgrades are allowed */
int allowuninstall; /* 0/1, if solver should remove installed
package for solution */
int allowvirtualconflicts; /* 0/1, if conflicts specify package names or
package provides */
+ int allowarchchange; /* 0/1, if packages can change architecture */

struct stateswitch *swtab[NUMSTATES];
enum state sbtab[NUMSTATES];
@@ -948,12 +949,14 @@
free((char *)pd->hardwareinfo);

const char *dir = attrval( atts, "path" );
+printf("hardware %s\n", dir);
if (dir)
{
char path[PATH_MAX];
strncpy(path, pd->directory, sizeof(path));
strncat(path, dir, sizeof(path));
pd->hardwareinfo = strdup(path);
+ printf("Setting hardwareinfo to %s\n", path);
}
else
pd->hardwareinfo = 0;
@@ -975,6 +978,7 @@

const char *channel = attrval( atts, "channel" );
const char *arch = attrval( atts, "arch" );
+ const char *version = attrval( atts, "version" );
char package[MAXNAMELEN];
getPackageName( atts, package );

@@ -1003,6 +1007,12 @@
}
++i;
}
+ if ( arch && version ) // the downgrade should happen only for that
package though...
+ {
+ pd->allowdowngrade = 1;
+ pd->allowarchchange = 1;
+ }
+
Id id = select_solvable( pool, repo, package, arch );
if (id == ID_NULL)
{
@@ -1106,6 +1116,7 @@

case STATE_DISTUPGRADE:
pd->updatesystem = 1;
+ pd->allowarchchange = 1;
//pd->fixsystem = 1;
pd->allowuninstall = 1;
pd->allowdowngrade = 1;
@@ -1184,6 +1195,7 @@
solv->updatesystem = pd->updatesystem;
solv->allowdowngrade = pd->allowdowngrade;
solv->allowuninstall = pd->allowuninstall;
+ solv->allowarchchange = pd->allowarchchange;
solv->rc_output = redcarpet ? 2 : 1;
solv->noupdateprovide = 1;
pd->pool->verbose = verbose;

--
To unsubscribe, e-mail: zypp-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages