def __init__( self, **args ): Qt5CorePackageBase.__init__(self) # get instance of dbus and openssl package self.openssl = portage.getPackageInstance('win32libs', 'openssl') if self.subinfo.options.isActive("win32libs/dbus"): self.dbus = portage.getPackageInstance('win32libs', 'dbus') if self.subinfo.options.isActive("binary/mysql-pkg"): self.mysql_server = portage.getPackageInstance('binary', 'mysql-pkg') if self.subinfo.options.isActive("win32libs/icu"): self.icu = portage.getPackageInstance('win32libs','icu')
def __init__(self, **args): Qt5CorePackageBase.__init__(self) if not self.subinfo.options.buildStatic: # get instance of dbus and openssl package self.openssl = portage.getPackageInstance('win32libs', 'openssl') if self.subinfo.options.isActive("win32libs/dbus"): self.dbus = portage.getPackageInstance('win32libs', 'dbus') if self.subinfo.options.isActive("binary/mysql-pkg"): self.mysql_server = portage.getPackageInstance( 'binary', 'mysql-pkg') if self.subinfo.options.isActive("win32libs/icu"): self.icu = portage.getPackageInstance('win32libs', 'icu')
def createPackage(self): for dep in self.subinfo.dependencies: category, package = dep.split("/") if not portage.getPackageInstance(category, package).createPackage(): return False return True
def handlePackage( category, packageName, buildAction, continueFlag, skipUpToDateVcs ): EmergeDebug.debug_line() EmergeDebug.info("Handling package: %s, action: %s" % (packageName, buildAction)) success = True package = portage.getPackageInstance( category, packageName ) if package is None: raise portage.PortageException( "Package not found", category, packageName ) if buildAction in [ "all", "full-package", "update", "update-all" ]: success = success and doExec( package, "fetch", continueFlag ) if success and skipUpToDateVcs and package.subinfo.hasSvnTarget( ): revision = package.sourceVersion( ) for p in InstallDB.installdb.getInstalledPackages( category, packageName ): if p.getRevision( ) == revision: EmergeDebug.info("Skipping further actions, package is up-to-date") return True success = success and doExec( package, "unpack", continueFlag ) success = success and doExec( package, "compile" ) success = success and doExec( package, "cleanimage" ) success = success and doExec( package, "install" ) if buildAction in [ "all", "update", "update-all" ]: success = success and doExec( package, "qmerge" ) if buildAction == "full-package": success = success and doExec( package, "package" ) success = success or continueFlag elif buildAction in [ "fetch", "unpack", "configure", "compile", "make", "checkdigest", "dumpdeps", "test", "package", "unmerge", "cleanimage", "cleanbuild", "createpatch", "geturls", "print-revision", "print-files" ]: success = doExec( package, buildAction, continueFlag ) elif buildAction == "install": success = doExec( package, "cleanimage" ) success = success and doExec( package, "install", continueFlag ) elif buildAction == "qmerge": #success = doExec( package, "cleanimage" ) #success = success and doExec( package, "install") success = success and doExec( package, "qmerge" ) elif buildAction == "generate-jenkins-job": success = jenkins.generateJob(package) elif buildAction == "print-source-version": print( "%s-%s" % ( packageName, package.sourceVersion( ) ) ) success = True elif buildAction == "print-package-version": print( "%s-%s-%s" % ( packageName, compiler.getCompilerName( ), package.sourceVersion( ) ) ) success = True elif buildAction == "print-targets": portage.printTargets( category, packageName ) success = True else: success = EmergeDebug.error("could not understand this buildAction: %s" % buildAction) return success
def __init__( self, **args ): self.subinfo = subinfo() PackageBase.__init__(self) if not self.subinfo.options.useShortPathes \ and self.compiler() == "mingw4" and len(self.rootdir) > 10: # mingw4 cannot compile qt if the command line arguments # exceed 8192 chars utils.warning('for mingw4, rootdir %s is too long for full path names.' ' Using short path names.' % self.rootdir, 1) self.subinfo.options.useShortPathes = True GitSource.__init__(self) QMakeBuildSystem.__init__(self) KDEWinPackager.__init__(self) # get instance of dbus and openssl package self.openssl = portage.getPackageInstance('win32libs-bin', 'openssl') if self.buildType() == "Debug": self.dbus = portage.getPackageInstance('win32libs-sources', 'dbus-src') else: self.dbus = portage.getPackageInstance('win32libs-bin', 'dbus') if not emergePlatform.isCrossCompilingEnabled(): self.mysql_server = portage.getPackageInstance('testing', 'mysql-pkg') else: self.wcecompat = portage.getPackageInstance('win32libs-sources', 'wcecompat-src')
def __getPackages( self ): """return package instances for all dependencies""" packages = [] directDependencies = portage.getDependencies( self.category, self.package ) depList = [] for ( category, package, _, _ ) in directDependencies: # unlike in CollectionPackagerBase, we want all dependencies here portage.solveDependencies( category, package, depList = depList ) depList.reverse() for x in depList: # Ignore dev-utils that are wrongly set as hard dependencies if x.category == "dev-util" or x.package in ['wget', 'patch', 'sed'] or portage.PortageInstance.isVirtualPackage( x.category, x.package ): continue _package = portage.getPackageInstance( x.category, x.package ) packages.append( _package ) return packages
def __getPackages(self): """return package instances for all dependencies""" packages = [] directDependencies = portage.getDependencies(self.category, self.package) depList = [] for (category, package, _, _) in directDependencies: # unlike in CollectionPackagerBase, we want all dependencies here portage.solveDependencies(category, package, depList=depList) depList.reverse() for x in depList: # Ignore dev-utils that are wrongly set as hard dependencies if x.category == "dev-util" or x.package in [ 'wget', 'patch', 'sed' ] or portage.PortageInstance.isVirtualPackage( x.category, x.package): continue _package = portage.getPackageInstance(x.category, x.package) packages.append(_package) return packages
def handlePackage(category, packageName, buildAction, continueFlag, skipUpToDateVcs): with EmergeTimer.Timer("HandlePackage %s/%s" % (category, packageName), 3) as timer: EmergeDebug.debug_line() EmergeDebug.info("Handling package: %s, action: %s" % (packageName, buildAction)) success = True package = portage.getPackageInstance(category, packageName) if package is None: raise portage.PortageException("Package not found", category, packageName) if buildAction in ["all", "full-package", "update", "update-all"]: success = success and doExec(package, "fetch", continueFlag) skip = False if success and skipUpToDateVcs and package.subinfo.hasSvnTarget(): revision = package.sourceVersion() for p in InstallDB.installdb.getInstalledPackages( category, packageName): if p.getRevision() == revision: EmergeDebug.info( "Skipping further actions, package is up-to-date") skip = True if not skip: success = success and doExec(package, "unpack", continueFlag) success = success and doExec(package, "compile") success = success and doExec(package, "cleanimage") success = success and doExec(package, "install") if buildAction in ["all", "update", "update-all"]: success = success and doExec(package, "qmerge") if buildAction == "full-package": success = success and doExec(package, "package") success = success or continueFlag elif buildAction in [ "fetch", "unpack", "configure", "compile", "make", "checkdigest", "dumpdeps", "test", "package", "unmerge", "cleanimage", "cleanbuild", "createpatch", "geturls", "print-revision", "print-files" ]: success = doExec(package, buildAction, continueFlag) elif buildAction == "install": success = doExec(package, "cleanimage") success = success and doExec(package, "install", continueFlag) elif buildAction == "qmerge": #success = doExec( package, "cleanimage" ) #success = success and doExec( package, "install") success = success and doExec(package, "qmerge") elif buildAction == "print-source-version": print("%s-%s" % (packageName, package.sourceVersion())) success = True elif buildAction == "print-package-version": print("%s-%s-%s" % (packageName, compiler.getCompilerName(), package.sourceVersion())) success = True elif buildAction == "print-targets": portage.printTargets(category, packageName) success = True else: success = EmergeDebug.error( "could not understand this buildAction: %s" % buildAction) timer.stop() utils.notify( "Emerge %s %s" % (buildAction, "succeeded" if success else "failed"), "%s of %s/%s %s after %s" % (buildAction, category, packageName, "succeeded" if success else "failed", timer), buildAction) return success
def createPackage( self ): for dep in self.subinfo.dependencies: category,package = dep.split( "/" ) if not portage.getPackageInstance(category,package).createPackage(): return False return True