'Parses a textual representation of a package specification
:type text: string
:param text: textual representation of a package in koji'

def parse(self, text):

    parts = (text.count(self.SEP) + 1)
    if (parts == 1):
        if text.isdigit():
            self.build = text
        else:
            self.package = text
    elif (parts == 2):
        (part1, part2) = text.split(self.SEP)
        if part1.isdigit():
            self.build = part1
            self.subpackages = part2.split(',')
        else:
            self.tag = part1
            self.package = part2
    elif (parts >= 3):
        (part1, part2, part3) = text.split(self.SEP)[0:3]
        self.tag = part1
        self.package = part2
        self.subpackages = part3.split(',')
