Created
March 7, 2011 10:42
-
-
Save ringods/858368 to your computer and use it in GitHub Desktop.
Build log with install not functioning correctly
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root@ringo-desktop:/home/rdesmet/Projects/amplidata/amif/qpackage/amplidata_monitoring# scons --debug=explain --debug=stree qpackage | |
scons: warning: The --debug=stree option is deprecated; please use --tree=all,status instead. | |
File "/opt/qbase3/bin/scons", line 165, in <module> | |
scons: Reading SConscript files ... | |
Checking for Pylabs sandbox... /opt/qbase3/lib/python2.6/site-packages/Crypto/Hash/SHA.py:6: DeprecationWarning: the sha module is deprecated; use the hashlib module instead | |
from sha import * | |
(cached) yes | |
Checking if qpackages.org:pylint:0.23.0 is installed... (cached) yes | |
scons: done reading SConscript files. | |
scons: Building targets ... | |
scons: rebuilding `apps.amplidata.com:cloud_monitoring_model:1.0.0:8' because AlwaysBuild() is specified | |
QPackaging apps.amplidata.com:cloud_monitoring_model:1.0.0:8 | |
E = exists | |
R = exists in repository only | |
b = implicit builder | |
B = explicit builder | |
S = side effect | |
P = precious | |
A = always build | |
C = current | |
N = no clean | |
H = no cache | |
[E b ]+-qpackage | |
[E B A ] +-apps.amplidata.com:cloud_monitoring_model:1.0.0:8 | |
[E C ] +-apps.amplidata.com:cloud_monitoring_model:1.0.0:7 | |
[ B ] +-/opt/qbase3/var/qpackages4/metadata/apps.amplidata.com/cloud_monitoring_model/1.0.0/tasklets/backup.py | |
[E C ] | +-cloud_monitoring_model/tasklets/backup.py | |
[E B ] +-/opt/qbase3/var/qpackages4/metadata/apps.amplidata.com/cloud_monitoring_model/1.0.0/tasklets/configure.py | |
[E C ] | +-cloud_monitoring_model/tasklets/configure.py | |
[E B ] +-/opt/qbase3/var/qpackages4/metadata/apps.amplidata.com/cloud_monitoring_model/1.0.0/tasklets/install.py | |
[E C ] | +-cloud_monitoring_model/tasklets/install.py | |
[E B ] +-/opt/qbase3/var/qpackages4/metadata/apps.amplidata.com/cloud_monitoring_model/1.0.0/tasklets/package.py | |
[E C ] | +-cloud_monitoring_model/tasklets/package.py | |
[E B ] +-/opt/qbase3/var/qpackages4/metadata/apps.amplidata.com/cloud_monitoring_model/1.0.0/tasklets/startstop.py | |
[E C ] +-cloud_monitoring_model/tasklets/startstop.py | |
scons: done building targets. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# QPackage4Builder: QPackage building via SCons | |
from SCons.Script import * | |
from pymonkey.InitBase import q | |
def _qpackage(target, source, env): | |
name = env['name'] | |
domain = env['domain'] | |
version = env['version'] | |
platforms = env['platforms'] | |
dependencies = env['dependencies'] | |
matchingPackages = q.qp.find(name, domain, version) | |
if len(matchingPackages) > 0: | |
qpackage = matchingPackages[0] | |
else: | |
qpackage = q.qp.createNewQPackage(name = name, domain = domain, version = version, description = "Dummy", supportedPlatforms = platforms) | |
# Copy the tasklets from the code repository to the metadata location | |
tasklets_source = q.system.fs.joinPaths(name, 'tasklets', '*.py') | |
tasklets_target = q.system.fs.joinPaths(qpackage.getPathMetadata(), 'tasklets') | |
installed_tasklets = env.Install(tasklets_target, source = Glob(tasklets_source)) | |
env.Depends(target, installed_tasklets) | |
return None | |
def _emitter_qpackage(target, source, env): | |
"""Emit source and target value nodes containing qpackage information. | |
The QPackage builder is called with the qpackage information but without a proper source or target. | |
This emitter will create a new source and target SCons Value node containing the correct content. | |
- the source node will contain the qpackage info with the current build number. | |
- the target node will contain the qpackage info with the new build number. | |
""" | |
if not 'name' in env.Dictionary().keys(): | |
raise SCons.Errors.UserError('QPackage name not given! Define the \'name\' argument.') | |
if not 'domain' in env.Dictionary().keys(): | |
raise SCons.Errors.UserError('QPackage domain not given! Define the \'domain\' argument.') | |
if not 'version' in env.Dictionary().keys(): | |
raise SCons.Errors.UserError('QPackage version not given! Define the \'version\' argument.') | |
if not 'platforms' in env.Dictionary().keys(): | |
raise SCons.Errors.UserError('QPackage platforms not given! Define the \'platforms\' argument.') | |
platforms = env['platforms'] | |
if not isinstance(platforms, list): | |
raise SCons.Errors.UserError('QPackage platforms argument should be a list of q.enumerators.PlatformType objects!') | |
if not 'dependencies' in env.Dictionary().keys(): | |
raise SCons.Errors.UserError('QPackage dependencies not given! Define the \'dependencies\' argument.') | |
dependencies = env['dependencies'] | |
if not isinstance(dependencies, list): | |
raise SCons.Errors.UserError('QPackage dependencies argument should be a list of tuples (name, domain, minversion, maxversion)!') | |
name = env['name'] | |
domain = env['domain'] | |
version = env['version'] | |
build_number = -1 | |
matchingPackages = q.qp.find(name, domain, version) | |
if len(matchingPackages) > 0: | |
qpackage = matchingPackages[0] | |
build_number = qpackage.buildNr | |
new_source = env.Value('%s:%s:%s:%d' % (domain, name, version, build_number)) | |
new_target = env.Value('%s:%s:%s:%d' % (domain, name, version, build_number+1)) | |
return ([new_target], [new_source]) | |
def _message_qpackage(target, source, env): | |
qpackage = target[0] | |
return "QPackaging %s" % qpackage.value | |
def generate(env, **kwargs): | |
env['BUILDERS']['QPackage'] = env.Builder( | |
action = env.Action(_qpackage, _message_qpackage), | |
emitter = _emitter_qpackage) | |
def exists(env): | |
return True |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment