def get_info(self):
        from enebootools.mergetool.flpatchdir import FolderApplyPatch
        if self.info: return self.info
        patch_list = self.get_patch_list()
        self.info = {"provides": [], "requires": []}

        for patchdir in patch_list:
            srcpath = os.path.join(self.fullpath, "patches", patchdir)
            fpatch = FolderApplyPatch(self.iface, srcpath)
            info = fpatch.get_patch_info()
            self.info["provides"] += info["provides"]
            self.info["requires"] += info["requires"]
        return self.info
Beispiel #2
0
    def get_info(self):
        from enebootools.mergetool.flpatchdir import FolderApplyPatch
        if self.info: return self.info
        patch_list = self.get_patch_list()
        self.info = {"provides" : [], "requires" : []}

        for patchdir in patch_list:
            srcpath = os.path.join(self.fullpath,"patches",patchdir)
            fpatch = FolderApplyPatch(self.iface, srcpath)
            info = fpatch.get_patch_info()
            self.info["provides"] += info["provides"]
            self.info["requires"] += info["requires"]
        return self.info
Beispiel #3
0
 def checkpatch_deps(fload_patch):
     file_index = oi.index_by_file()
     from enebootools.mergetool.flpatchdir import FolderApplyPatch
     fpatch = FolderApplyPatch(iface, fload_patch)
     info = fpatch.get_patch_info()
     for filename in info["requires"]:
         if filename not in file_index:
             print "??? Dependencia no encontrada para:", filename
             continue
         modules = file_index[filename]["provided-by-module"]
         features = file_index[filename]["provided-by-feature"]
         for m in modules:
             if m not in fdep_modules:
                 fdep_modules.append(m)
                 print u"Se agregó automáticamente la dependencia con el módulo '%s'" % m
         for f in features:
             if f not in fdep_features:
                 fdep_features.append(f)
                 print u"Se agregó automáticamente la dependencia con la funcionalidad '%s'" % f
Beispiel #4
0
 def checkpatch_deps(fload_patch):
     file_index = oi.index_by_file()
     from enebootools.mergetool.flpatchdir import FolderApplyPatch
     fpatch = FolderApplyPatch(iface, fload_patch)
     info = fpatch.get_patch_info()
     for filename in info["requires"]:
         if filename not in file_index:
             print "??? Dependencia no encontrada para:", filename
             continue
         modules = file_index[filename]["provided-by-module"]
         features = file_index[filename]["provided-by-feature"]
         for m in modules:
             if m not in fdep_modules:
                 fdep_modules.append(m)
                 print u"Se agregó automáticamente la dependencia con el módulo '%s'" % m
         for f in features:
             if f not in fdep_features:
                 fdep_features.append(f)
                 print u"Se agregó automáticamente la dependencia con la funcionalidad '%s'" % f
Beispiel #5
0
def test_deps(iface, feat):
    db = init_database()
    oi = ObjectIndex(iface)
    oi.analyze_objects()
    patchname = oi.get_patch_name(feat, default = True)
    feature = FeatureObject.find(feat)
    patch_folder = os.path.join(feature.fullpath, "patches", patchname)
    
    file_index = oi.index_by_file()
    from enebootools.mergetool.flpatchdir import FolderApplyPatch
    fpatch = FolderApplyPatch(iface, patch_folder)
    info = fpatch.get_patch_info()
    fdep_features = feature._get_full_required_features()[:]
    fdep_modules = feature._get_full_required_modules()[:]
    fdep_features.append( feature.formal_name() )
    orig_fdep_features = fdep_features[:]
    orig_fdep_modules = fdep_modules[:]
    
    for filename in info["requires"]:
        if filename not in file_index:
            print "??? Dependencia no encontrada para:", filename
            continue
        modules = file_index[filename]["provided-by-module"]
        features = file_index[filename]["provided-by-feature"]
        for m in modules:
            if m not in fdep_modules:
                fdep_modules.append(m)
        for f in features:
            if f not in fdep_features:
                fdep_features.append(f)

    for filename in info["provides"]:
        if filename not in file_index:
            continue
        modules = file_index[filename]["provided-by-module"]
        features = file_index[filename]["provided-by-feature"]
        for m in modules:
            if m not in fdep_modules:
                fdep_modules.append(m)
        for f in features:
            if f not in fdep_features:
                fdep_features.append(f)
    
    new_modules = list(set(fdep_modules) - set(orig_fdep_modules))
    new_modules.sort()
    new_features = list(set(fdep_features) - set(orig_fdep_features))
    new_features.sort()
    
    if new_modules:
        print u"La funcionalidad requiere además de los siguientes módulos:"
        for m in new_modules:
            print " - %s" % m
        print
        
    if new_features:
        print u"La funcionalidad requiere además de las siguientes funcionalidades:"
        try: new_features.remove(feature.formal_name())
        except ValueError: pass
        for m in new_features:
            print " - %s" % m
        print
Beispiel #6
0
def test_deps(iface, feat):
    db = init_database()
    oi = ObjectIndex(iface)
    oi.analyze_objects()
    patchname = oi.get_patch_name(feat, default=True)
    feature = FeatureObject.find(feat)
    patch_folder = os.path.join(feature.fullpath, "patches", patchname)

    file_index = oi.index_by_file()
    from enebootools.mergetool.flpatchdir import FolderApplyPatch
    fpatch = FolderApplyPatch(iface, patch_folder)
    info = fpatch.get_patch_info()
    fdep_features = feature._get_full_required_features()[:]
    fdep_modules = feature._get_full_required_modules()[:]
    fdep_features.append(feature.formal_name())
    orig_fdep_features = fdep_features[:]
    orig_fdep_modules = fdep_modules[:]

    for filename in info["requires"]:
        if filename not in file_index:
            print "??? Dependencia no encontrada para:", filename
            continue
        modules = file_index[filename]["provided-by-module"]
        features = file_index[filename]["provided-by-feature"]
        for m in modules:
            if m not in fdep_modules:
                fdep_modules.append(m)
        for f in features:
            if f not in fdep_features:
                fdep_features.append(f)

    for filename in info["provides"]:
        if filename not in file_index:
            continue
        modules = file_index[filename]["provided-by-module"]
        features = file_index[filename]["provided-by-feature"]
        for m in modules:
            if m not in fdep_modules:
                fdep_modules.append(m)
        for f in features:
            if f not in fdep_features:
                fdep_features.append(f)

    new_modules = list(set(fdep_modules) - set(orig_fdep_modules))
    new_modules.sort()
    new_features = list(set(fdep_features) - set(orig_fdep_features))
    new_features.sort()

    if new_modules:
        print u"La funcionalidad requiere además de los siguientes módulos:"
        for m in new_modules:
            print " - %s" % m
        print

    if new_features:
        print u"La funcionalidad requiere además de las siguientes funcionalidades:"
        try:
            new_features.remove(feature.formal_name())
        except ValueError:
            pass
        for m in new_features:
            print " - %s" % m
        print