'Instantiates a new KojiPkgSpec object
:type text: string
:param text: a textual representation of a package on Koji that
will be parsed
:type tag: string
:param tag: a koji tag, example: Fedora-14-RELEASE
(see U{http://fedoraproject.org/wiki/Koji#Tags_and_Targets})
:type build: number
:param build: a koji build, example: 1001
(see U{http://fedoraproject.org/wiki/Koji#Koji_Architecture})
:type package: string
:param package: a koji package, example: python
(see U{http://fedoraproject.org/wiki/Koji#Koji_Architecture})
:type subpackages: list of strings
:param subpackages: a list of package names, usually a subset of
the RPM packages generated by a given build'

def __init__(self, text='', tag=None, build=None, package=None, subpackages=[]):

    self.tag = None
    self.build = None
    self.package = None
    self.subpackages = []
    self.default_tag = None
    if text:
        self.parse(text)
    else:
        self.tag = tag
        self.build = build
        self.package = package
        self.subpackages = subpackages
    if ((not self.build) and (not self.tag)):
        default_tag = get_default_koji_tag()
        if (default_tag is not None):
            self.tag = default_tag
