# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
# native
+
'''
Created on 05 fevr. 2013
@author: ronan@fridu.net
'''
+
import os
import shutil
-
import errno
RECIPES_SOURCE_DIR = os.path.dirname( os.path.realpath( __file__ ) )
res = os.path.expandvars( res )
return res
- def get_runtime_blacklist( self, project ):
- """
- return the list of the blacklisted runtime package.
- """
- blacklist_list = self.__get_list( project, "runtime_blacklist", [] )
- res = []
- for blacklist in blacklist_list:
- res.extend( self.__get_list( blacklist, "list", [] ) )
-
- return res
-
- def get_whitelist( self, project ):
+ def get_list(self, project, list_name):
"""
- return the list of the whitelist package.
+ Returns the corresponding list.
"""
- whitelist_list = self.__get_list( project, "whitelist", [] )
+ res_list = self.__get_list( project, list_name, [] )
res = []
- for whitelist in whitelist_list:
- res.extend( self.__get_list( whitelist, "list", [] ) )
- return res
-
- def get_blacklist( self, project ):
- """
- return the list of the blacklisted package.
- """
- blacklist_list = self.__get_list( project, "blacklist", [] )
- res = []
- for blacklist in blacklist_list:
- res.extend( self.__get_list( blacklist, "list", [] ) )
-
- return res
-
- def get_native_blacklist( self, project ):
- """
- return the list of the blacklisted native package.
- """
- blacklist_list = self.__get_list( project, "native_blacklist", [] )
- res = []
- for blacklist in blacklist_list:
- res.extend( self.__get_list( blacklist, "list", [] ) )
+ for element in res_list:
+ res.extend(self.__get_list(element, "list", []))
return res
def get_substitute( self , project = None ):
if manifest_git is not None:
remote = manifest_git
- whitelist = SPEC2YOCTO_CONFIG.get_whitelist( self.__my_project )
+ whitelist = SPEC2YOCTO_CONFIG.get_list(self.__my_project, "whitelist")
if len( whitelist ) != 0:
list_packages = set(whitelist)
else:
list_packages = set(packages_dico.keys())
- blacklist = set(SPEC2YOCTO_CONFIG.get_blacklist( self.__my_project ))
+ blacklist = set(SPEC2YOCTO_CONFIG.get_list(self.__my_project, "blacklist"))
list_packages=list_packages.difference(blacklist)
'''
load oe_package_blacklist
'''
- list_package = SPEC2YOCTO_CONFIG.get_runtime_blacklist( self.__my_project )
+ list_package = SPEC2YOCTO_CONFIG.get_list(self.__my_project, "runtime_blacklist")
MetaSpec.mOePackageBlacklist.extend( list_package )
def __set_native_package_blacklist( self ):
'''
load oe_package_blacklist
'''
- list_package = SPEC2YOCTO_CONFIG.get_native_blacklist( self.__my_project )
+ list_package = SPEC2YOCTO_CONFIG.get_list(self.__my_project, "native_blacklist")
MetaSpec.mNativePackageBlacklist.extend( list_package )