[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdesupport/emerge/bin
From: Patrick Spendrin <ps_ml () gmx ! de>
Date: 2010-11-11 14:59:22
Message-ID: 20101111145922.A2AB1AC8A0 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1195581 by sengels:
move away this function that can be used outside of the class
M +37 -33 portage.py
--- trunk/kdesupport/emerge/bin/portage.py #1195580:1195581
@@ -62,39 +62,7 @@
return [ self.category, self.name, self.version, \
PortageInstance.getDefaultTarget( self.category, self.name, self.version ) ]
def __readChildren( self ):
- identFileName = getFilename( self.category, self.name, self.version )
- if not os.path.isfile( identFileName ):
- utils.die( "package name %s/%s-%s unknown" % ( self.category, self.name, \
self.version ) )
-
- # if we are an emerge internal package and already in the dictionary, ignore \
childrens
- # To avoid possible endless recursion this may be also make sense for all \
packages
- if self.category == internalCategory and identFileName in modDict.keys():
- return
- utils.debug( "solving package %s/%s-%s %s" % ( self.category, self.name, \
self.version, identFileName ), 2 )
- if not identFileName in modDict.keys():
- mod = __import__( identFileName )
- modDict[ identFileName ] = mod
- else:
- mod = modDict[ identFileName ]
-
- if os.getenv('EMERGE_ENABLE_IMPLICID_BUILDTIME_DEPENDENCIES') and hasattr( \
mod, 'Package' ):
- _package = mod.Package()
- subinfo = _package.subinfo
- elif hasattr( mod, 'subinfo' ):
- subinfo = mod.subinfo()
- else:
- subinfo = None
-
- runtimeDependencies = subinfo.runtimeDependencies
- buildDependencies = subinfo.buildDependencies
-
- # hardDependencies
- commonDependencies = subinfo.hardDependencies
- commonDependencies.update( subinfo.dependencies )
- for key in commonDependencies:
- runtimeDependencies[ key ] = commonDependencies[ key ]
- buildDependencies[ key ] = commonDependencies[ key ]
-
+ runtimeDependencies, buildDependencies = readChildren( self.category, \
self.name, self.version )
self.runtimeChildren = self.__readDependenciesForChildren( \
runtimeDependencies.keys() )
self.buildChildren = self.__readDependenciesForChildren( \
buildDependencies.keys() )
@@ -519,6 +487,42 @@
print ' ',
print i
+def readChildren( category, package, version ):
+ identFileName = getFilename( category, package, version )
+ if not os.path.isfile( identFileName ):
+ utils.die( "package name %s/%s-%s unknown" % ( category, package, version ) \
) +
+ # if we are an emerge internal package and already in the dictionary, ignore \
childrens + # To avoid possible endless recursion this may be also make sense for \
all packages + if category == internalCategory and identFileName in \
modDict.keys(): + return
+ utils.debug( "solving package %s/%s-%s %s" % ( category, package, version, \
identFileName ), 2 ) + if not identFileName in modDict.keys():
+ mod = __import__( identFileName )
+ modDict[ identFileName ] = mod
+ else:
+ mod = modDict[ identFileName ]
+
+ if os.getenv('EMERGE_ENABLE_IMPLICID_BUILDTIME_DEPENDENCIES') and hasattr( mod, \
'Package' ): + _package = mod.Package()
+ subinfo = _package.subinfo
+ elif hasattr( mod, 'subinfo' ):
+ subinfo = mod.subinfo()
+ else:
+ subinfo = None
+
+ runtimeDependencies = subinfo.runtimeDependencies
+ buildDependencies = subinfo.buildDependencies
+
+ # hardDependencies
+ commonDependencies = subinfo.hardDependencies
+ commonDependencies.update( subinfo.dependencies )
+ for key in commonDependencies:
+ runtimeDependencies[ key ] = commonDependencies[ key ]
+ buildDependencies[ key ] = commonDependencies[ key ]
+
+ return ( runtimeDependencies, buildDependencies )
+
def isHostBuildEnabled( category, package, version ):
""" returns whether this package's host build is enabled. This will only work if \
isCrossCompilingEnabled() == True """
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic