From 5ffce4fc9eaa408cfae0d38d1ea8a0d969de94d9 Mon Sep 17 00:00:00 2001 From: Michael Schroeder Date: Tue, 6 Mar 2012 16:48:30 +0100 Subject: [PATCH] - repo_helix: also parse srcpackage elements --- ext/repo_helix.c | 3 +++ 1 file changed, 3 insertions(+) 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; -- 2.47.2