From: Michael Schroeder Date: Wed, 17 Apr 2013 13:39:50 +0000 (+0200) Subject: split arch from the right for debian/haiku (thanks Ingo!) X-Git-Tag: BASE-SuSE-Code-12_3-Branch~25 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1849f54ad9145de0ca41ff003e42a38afd989d5a;p=thirdparty%2Flibsolv.git split arch from the right for debian/haiku (thanks Ingo!) --- diff --git a/src/selection.c b/src/selection.c index 8fc1998c..2b9d4344 100644 --- a/src/selection.c +++ b/src/selection.c @@ -686,7 +686,7 @@ selection_canon(Pool *pool, Queue *selection, const char *name, int flags) return 0; } /* is there a vaild arch? */ - if ((r2 = strchr(r, '_')) != 0 && r[1] && (archid = str2archid(pool, r + 1)) != 0) + if ((r2 = strrchr(r, '_')) != 0 && r[1] && (archid = str2archid(pool, r + 1)) != 0) { *r2 = 0; /* split off */ selection_filter_rel(pool, selection, REL_ARCH, archid); @@ -709,7 +709,7 @@ selection_canon(Pool *pool, Queue *selection, const char *name, int flags) return 0; } /* is there a vaild arch? */ - if ((r2 = strchr(r, '-')) != 0 && r[1] && (archid = str2archid(pool, r + 1)) != 0) + if ((r2 = strrchr(r, '-')) != 0 && r[1] && (archid = str2archid(pool, r + 1)) != 0) { *r2 = 0; /* split off */ selection_filter_rel(pool, selection, REL_ARCH, archid);