From: Michael Schroeder Date: Tue, 6 Mar 2012 15:48:30 +0000 (+0100) Subject: - repo_helix: also parse srcpackage elements X-Git-Tag: BASE-SuSE-Code-12_2-Branch~111 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5ffce4fc9eaa408cfae0d38d1ea8a0d969de94d9;p=thirdparty%2Flibsolv.git - repo_helix: also parse srcpackage elements --- diff --git a/ext/repo_helix.c b/ext/repo_helix.c index 66a975ea..aa69f206 100644 --- a/ext/repo_helix.c +++ b/ext/repo_helix.c @@ -94,6 +94,7 @@ static struct stateswitch stateswitches[] = { { STATE_START, "channel", STATE_CHANNEL, 0 }, { STATE_CHANNEL, "subchannel", STATE_SUBCHANNEL, 0 }, { STATE_SUBCHANNEL, "package", STATE_PACKAGE, 0 }, + { STATE_SUBCHANNEL, "srcpackage", STATE_PACKAGE, 0 }, { STATE_SUBCHANNEL, "selection", STATE_PACKAGE, 0 }, { STATE_SUBCHANNEL, "pattern", STATE_PACKAGE, 0 }, { STATE_SUBCHANNEL, "atom", STATE_PACKAGE, 0 }, @@ -618,6 +619,8 @@ endElement(void *userData, const char *name) { case STATE_PACKAGE: /* package complete */ + if (name[0] == 's' && name[1] == 'r' && name[2] == 'c' && s->arch != ARCH_SRC && s->arch != ARCH_NOSRC) + s->arch = ARCH_SRC; if (!s->arch) /* default to "noarch" */ s->arch = ARCH_NOARCH;