You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@gump.apache.org by aj...@apache.org on 2003/10/21 21:40:56 UTC
cvs commit: jakarta-gump/python/gump integrate.py logic.py check.py
ajack 2003/10/21 12:40:56
Modified: python/gump integrate.py logic.py check.py
Log:
Tidied up some debug prints...
Revision Changes Path
1.9 +1 -1 jakarta-gump/python/gump/integrate.py
Index: integrate.py
===================================================================
RCS file: /home/cvs/jakarta-gump/python/gump/integrate.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- integrate.py 19 Oct 2003 17:46:36 -0000 1.8
+++ integrate.py 21 Oct 2003 19:40:56 -0000 1.9
@@ -125,7 +125,7 @@
#
# Check Environment (eventually not do this each time)
#
- checkEnvironment(workspace,context)
+ checkEnvironment(workspace,context,0)
#
# Check projects (and such) in workspace...
1.36 +1 -1 jakarta-gump/python/gump/logic.py
Index: logic.py
===================================================================
RCS file: /home/cvs/jakarta-gump/python/gump/logic.py,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -r1.35 -r1.36
--- logic.py 21 Oct 2003 19:03:08 -0000 1.35
+++ logic.py 21 Oct 2003 19:40:56 -0000 1.36
@@ -472,7 +472,7 @@
# print " - " + str(v)
return []
visited.append(depend)
- print "Perform : " + str(depend) + " in " + parent.name
+ # print "Perform : " + str(depend) + " in " + parent.name
#
# Check we can get the project...
1.28 +52 -41 jakarta-gump/python/gump/check.py
Index: check.py
===================================================================
RCS file: /home/cvs/jakarta-gump/python/gump/check.py,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- check.py 20 Oct 2003 18:20:34 -0000 1.27
+++ check.py 21 Oct 2003 19:40:56 -0000 1.28
@@ -210,7 +210,7 @@
return ok
-def check(workspace, expr='*', context=GumpContext()):
+def check(workspace, expr='*', context=GumpContext(),display=1):
"""dump all dependencies to build a project to the output"""
projects=getProjectsForProjectExpression(expr)
@@ -228,12 +228,16 @@
for depend in project.depend:
# if the dependency is not present in the projects, it's missing
if depend.project not in Project.list:
- if not printed_header:
- printHeader(project)
- printed_header=1
projectmissing+=1
message=" Missing dependency: " + depend.project + " on project " + project.name
- print message
+
+ if display:
+ if not printed_header:
+ printHeader(project)
+ printed_header=1
+ print message
+
+ # Store message into context...
context.addWarning(message)
if depend.project not in missing:
missing.append(depend.project)
@@ -241,34 +245,37 @@
for depend in project.option:
# if the dependency is not present in the projects, it's missing
if depend.project not in Project.list:
- if not printed_header:
- printHeader(project)
- printed_header=1
projectmissing+=1
message=" Missing optional dependency: " + depend.project + " on project " + project.name
- print message
+
+ if display:
+ if not printed_header:
+ printHeader(project)
+ printed_header=1
+ print message
context.addWarning(message)
if depend.project not in optionalMissing:
optionalMissing.append(depend.project)
- if projectmissing>0:
+ if display and projectmissing>0:
print " total errors: " , projectmissing
- if len(optionalMissing)>0:
- print
- print " ***** MISSING OPTIONAL *ONLY* PROJECTS THAT ARE REFERENCED ***** "
- print
- for missed in optionalMissing:
- if missed not in missing:
- optionalOnlyMissing.append(missed)
- print " " + missed
+ if display:
+ if len(optionalMissing)>0:
+ print
+ print " ***** MISSING OPTIONAL *ONLY* PROJECTS THAT ARE REFERENCED ***** "
+ print
+ for missed in optionalMissing:
+ if missed not in missing:
+ optionalOnlyMissing.append(missed)
+ print " " + missed
- if len(missing)>0:
- print
- print " ***** MISSING PROJECTS THAT ARE REFERENCED ***** "
- print
- for missed in missing:
- print " " + missed
+ if len(missing)>0:
+ print
+ print " ***** MISSING PROJECTS THAT ARE REFERENCED ***** "
+ print
+ for missed in missing:
+ print " " + missed
# Comment out for now ...
# 'cos loading a new workspace overwrites
@@ -284,25 +291,29 @@
# print
# traceback.print_exc()
# print
+
+ if display:
+ print
+ print " ***** WORKSPACE RESULT ***** "
+ print
- print
- print " ***** WORKSPACE RESULT ***** "
- print
if len(missing)>0:
- context.addError("Some projects that were referenced are missing in the workspace.")
- print
- print " - ERROR - Some projects that were referenced are missing in the workspace. "
- print " See the above messages for more detailed info."
- else:
+ context.addError("Some projects that were referenced are missing in the workspace.")
+ if display:
+ print
+ print " - ERROR - Some projects that were referenced are missing in the workspace. "
+ print " See the above messages for more detailed info."
+ elif display:
print " - OK - All projects that are referenced are present in the workspace."
if len(optionalOnlyMissing)>0:
context.addWarning("Some projects that were referenced as optional are missing in the workspace.");
- print
- print " - WARNING - Some projects that were referenced as optional only are "
- print " missing in the workspace. "
- print " See the above messages for more detailed info."
- else:
+ if display:
+ print
+ print " - WARNING - Some projects that were referenced as optional only are "
+ print " missing in the workspace. "
+ print " See the above messages for more detailed info."
+ elif display:
print " - OK - All OPTIONAL projects that are referenced are present in the workspace."
print " ***** RESULT ***** "
@@ -373,7 +384,7 @@
checkEnvironment(workspace,context,0)
# check
- result = check(workspace, ps)
+ result = check(workspace, ps, context, 1)
# bye!
sys.exit(result)