summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Schroeder <mls@suse.de>2012-06-22 18:51:52 +0200
committerMichael Schroeder <mls@suse.de>2012-06-22 18:51:52 +0200
commit2dfbf4ce2700f3495da852547d373aed35390bcb (patch)
treea7b05571f2a772f7181d505d08b69fb75dea12d6
parent591667714ec2e316d87378b6bb407ee351d26d75 (diff)
downloadlibsolv-2dfbf4ce2700f3495da852547d373aed35390bcb.tar.gz
libsolv-2dfbf4ce2700f3495da852547d373aed35390bcb.tar.bz2
libsolv-2dfbf4ce2700f3495da852547d373aed35390bcb.zip
- set disttype before setting the architecture so that the noarch id is correct
-rw-r--r--ext/testcase.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/ext/testcase.c b/ext/testcase.c
index 378f3d0..9d161fe 100644
--- a/ext/testcase.c
+++ b/ext/testcase.c
@@ -1848,10 +1848,7 @@ testcase_read(Pool *pool, FILE *fp, char *testcase, Queue *job, char **resultp,
{
int i;
prepared = 0;
- if (strcmp(pieces[1], "unset") != 0)
- pool_setarch(pool, pieces[1]);
- else
- pool_setarch(pool, 0);
+ /* must set the disttype before the arch */
for (i = 0; disttype2str[i].str != 0; i++)
if (!strcmp(disttype2str[i].str, pieces[2]))
break;
@@ -1865,6 +1862,10 @@ testcase_read(Pool *pool, FILE *fp, char *testcase, Queue *job, char **resultp,
pool_debug(pool, SOLV_ERROR, "testcase_read: system: cannot change disttype to '%s'\n", pieces[2]);
#endif
}
+ if (strcmp(pieces[1], "unset") != 0)
+ pool_setarch(pool, pieces[1]);
+ else
+ pool_setarch(pool, 0);
if (npieces > 3)
{
Repo *repo = testcase_str2repo(pool, pieces[3]);