]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
- repo_helix: also parse srcpackage elements
authorMichael Schroeder <mls@suse.de>
Tue, 6 Mar 2012 15:48:30 +0000 (16:48 +0100)
committerMichael Schroeder <mls@suse.de>
Fri, 9 Mar 2012 12:50:29 +0000 (13:50 +0100)
ext/repo_helix.c

index 66a975ea5b4cd6f06f50bc8a5ea7d596fab12dd0..aa69f206a27df4efccb88eb87bd7110cdc36cd21 100644 (file)
@@ -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;