'Add an entry to the Component table, and make this component the current for this
directory. If no component name is given, the directory name is used. If no feature
is given, the current feature is used. If no flags are given, the directory\'s default
flags are used. If no keyfile is given, the KeyPath is left null in the Component
table.'

def start_component(self, component=None, feature=None, flags=None, keyfile=None, uuid=None):

    if (flags is None):
        flags = self.componentflags
    if (uuid is None):
        uuid = gen_uuid()
    else:
        uuid = uuid.upper()
    if (component is None):
        component = self.logical
    self.component = component
    if Win64:
        flags |= 256
    if keyfile:
        keyid = self.cab.gen_id(self.absolute, keyfile)
        self.keyfiles[keyfile] = keyid
    else:
        keyid = None
    add_data(self.db, 'Component', [(component, uuid, self.logical, flags, None, keyid)])
    if (feature is None):
        feature = current_feature
    add_data(self.db, 'FeatureComponents', [(feature.id, component)])
    return
