Merge lp:~zorba-coders/zorba/download-modules into lp:zorba

Proposed by Chris Hillery
Status: Merged
Approved by: Chris Hillery
Approved revision: 10665
Merged at revision: 10676
Proposed branch: lp:~zorba-coders/zorba/download-modules
Merge into: lp:zorba
Diff against target: 111 lines (+52/-33)
2 files modified
modules/DownloadModules.cmake (+51/-32)
modules/ExternalModules.conf (+1/-1)
To merge this branch: bzr merge lp:~zorba-coders/zorba/download-modules
Reviewer Review Type Date Requested Status
Sorin Marian Nasoi Approve
Chris Hillery Approve
Review via email: mp+93335@code.launchpad.net

Commit message

Error checking for DownloadModules.cmake; try three times on failures.

To post a comment you must log in.
Revision history for this message
Chris Hillery (ceejatec) :
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue job download-modules-2012-02-16T10-26-00.482Z is finished. The final status was:

All tests succeeded!

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Voting does not meet specified criteria. Required: Approve > 1, Disapprove < 1. Got: 1 Approve.

Revision history for this message
Sorin Marian Nasoi (sorin.marian.nasoi) wrote :

I think the changes are not O.K. , please see below for a brief description of the tests I did.
I have not approved the changes yet because I would need another opinion on the 2 issues I have raised below and about the fix proposed for the bug I found.

I have checked the following options:
Check 1)
cmake -Dallmodules=ON -Doutdir="MY_LOCATION" -P DownloadModules.cmake
I then compiled and run all tests successfully for all external modules (I ran "ctest -R _module").

Check 2)
cmake -Dmodname=email -Dnotags=ON -Doutdir="MY_LOCATION" -P DownloadModules.cmake
CMake Error at DownloadModules.cmake:128 (message):
  Failed to download 'data-cleaning' after 3 attempts, giving up.

Check 3)
cmake -Dmodname=email -Doutdir="MY_LOCATION" -P DownloadModules.cmake
CMake Error at DownloadModules.cmake:128 (message):
  Failed to download 'data-cleaning' after 3 attempts, giving up.

For this issue I will try to propose a fix.

Issue 1)
Paul reported that he had an issue with the email module that I could not reproduce.
Anyway, Juan (who managed to reproduce the error) said that he found an work around by changing the ExternalModule.config to have email module as the last module to branch out.

IMO, I would propose to include Juan's proposed fix in this merge as well.

Issue 2)
What is the status of the following external modules:
- lp:zorba/exi-module
- lp:zorba/queue-module
- lp:zorba/stack-module
Should they be included in the ExternalModule.config already?

AFAIK at least the last 2 external modules(queue, stack) are finished.

review: Needs Fixing
10663. By Sorin Marian Nasoi <email address hidden>

Fixed for the case where only some modules are downloaded using 'modname' option.

10664. By Sorin Marian Nasoi <email address hidden>

Added the fix proposed by Juan for the issue reported by Paul: see thread on @coders "Downloading modules fails".

Revision history for this message
Sorin Marian Nasoi (sorin.marian.nasoi) wrote :

The only question I have now is this:

What is the status of the following external modules:
- lp:zorba/exi-module
- lp:zorba/queue-module
- lp:zorba/stack-module
Should they be included in the ExternalModule.config already?

AFAIK at least the last 2 external modules(queue, stack) are finished.

review: Needs Information
Revision history for this message
Matthias Brantner (matthias-brantner) wrote :

> The only question I have now is this:
>
> What is the status of the following external modules:
> - lp:zorba/exi-module
> - lp:zorba/queue-module
> - lp:zorba/stack-module
> Should they be included in the ExternalModule.config already?
>
> AFAIK at least the last 2 external modules(queue, stack) are finished.
Neither of them is finished, yet. Including them seems orthogonal to this merge proposal.

Revision history for this message
Sorin Marian Nasoi (sorin.marian.nasoi) wrote :

> > The only question I have now is this:
> >
> > What is the status of the following external modules:
> > - lp:zorba/exi-module
> > - lp:zorba/queue-module
> > - lp:zorba/stack-module
> > Should they be included in the ExternalModule.config already?
> >
> > AFAIK at least the last 2 external modules(queue, stack) are finished.
> Neither of them is finished, yet. Including them seems orthogonal to this
> merge proposal.
I agree.

I am marking the changes as approved but I would need someone else to test the fixes I made before marking the merge as "Approved".

review: Approve
Revision history for this message
Chris Hillery (ceejatec) wrote :

Thanks for the fixes. I'm committing one minor change that just fixes the indentation.

10665. By Chris Hillery

Indentation fix.

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue job download-modules-2012-02-24T02-18-00.276Z is finished. The final status was:

All tests succeeded!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'modules/DownloadModules.cmake'
2--- modules/DownloadModules.cmake 2011-10-11 22:34:31 +0000
3+++ modules/DownloadModules.cmake 2012-02-24 02:16:18 +0000
4@@ -75,39 +75,58 @@
5 endif (allmodules)
6
7 # Download
8- if (_getmod)
9+ if ("${_getmod}" EQUAL 1)
10 message ("Downloading module '${_modname}'...")
11- if (${_modvc} STREQUAL "svn")
12- if (NOT svn)
13- message (FATAL_ERROR
14- "Subversion client not found - required for ${_modname} module!")
15- endif (NOT svn)
16- # QQQ Ridiculous and slow hack, but Sourceforge has been
17- # incredibly unreliable lately so this is the best choice I've
18- # got to make the remote queue semi-stable
19- foreach (s 1 2)
20+ # We try three times, to account for network weirdnesses
21+ foreach (i 1 2 3)
22+ # First delete the output directory, in case there's a partial
23+ # download from a previous attempt
24+ file (REMOVE_RECURSE "${outdir}/${_modname}")
25+
26+ set (_status)
27+
28+ if (${_modvc} STREQUAL "svn")
29+ if (NOT svn)
30+ message (FATAL_ERROR
31+ "Subversion client not found - required for ${_modname} module!")
32+ endif (NOT svn)
33 execute_process (COMMAND "${svn}" checkout "${_modurl}" "${_modname}"
34- WORKING_DIRECTORY "${outdir}" TIMEOUT 60)
35- endforeach (s 1 2)
36-
37- elseif (${_modvc} STREQUAL "bzr")
38- if (NOT bzr)
39- message (FATAL_ERROR
40- "Bazaar client not found - required for ${_modname} module!")
41- endif (NOT bzr)
42-
43- set (_modtagargs)
44- if (_modtag AND NOT notags)
45- set (_modtagargs "-r" "${_modtag}")
46- endif (_modtag AND NOT notags)
47- execute_process (COMMAND "${bzr}" branch "${_modurl}" "${_modname}"
48- ${_modtagargs} WORKING_DIRECTORY "${outdir}" TIMEOUT 60)
49-
50- else (${_modvc} STREQUAL "svn")
51- message (FATAL_ERROR "Unknown vc-type '${_modvc}' for module "
52- "'${_modname}' in modules/ExternalModules.conf!")
53-
54- endif (${_modvc} STREQUAL "svn")
55- endif (_getmod)
56+ WORKING_DIRECTORY "${outdir}" TIMEOUT 60 RESULT_VARIABLE _status)
57+
58+ elseif (${_modvc} STREQUAL "bzr")
59+ if (NOT bzr)
60+ message (FATAL_ERROR
61+ "Bazaar client not found - required for ${_modname} module!")
62+ endif (NOT bzr)
63+
64+ set (_modtagargs)
65+ if (_modtag AND NOT notags)
66+ set (_modtagargs "-r" "${_modtag}")
67+ endif (_modtag AND NOT notags)
68+ execute_process (COMMAND "${bzr}" branch "${_modurl}" "${_modname}"
69+ ${_modtagargs} WORKING_DIRECTORY "${outdir}" TIMEOUT 60
70+ RESULT_VARIABLE _status)
71+
72+ else (${_modvc} STREQUAL "svn")
73+ message (FATAL_ERROR "Unknown vc-type '${_modvc}' for module "
74+ "'${_modname}' in modules/ExternalModules.conf!")
75+
76+ endif (${_modvc} STREQUAL "svn")
77+
78+ if ("${_status}" EQUAL 0)
79+ # Success
80+ break ()
81+ else ("${_status}" EQUAL 0)
82+ message (WARNING "Attempt ${i}: Failed to download '${_modname}' (${_status})")
83+ endif ("${_status}" EQUAL 0)
84+
85+ endforeach (i)
86+
87+ # Ensure we successfully downloaded something good
88+ if (NOT EXISTS "${outdir}/${_modname}/CMakeLists.txt")
89+ message (FATAL_ERROR "Failed to download '${_modname}' after 3 attempts, giving up.")
90+ endif (NOT EXISTS "${outdir}/${_modname}/CMakeLists.txt")
91+
92+ endif ("${_getmod}" EQUAL 1)
93 endif (modline)
94 endforeach (modline)
95
96=== modified file 'modules/ExternalModules.conf'
97--- modules/ExternalModules.conf 2012-02-23 21:57:52 +0000
98+++ modules/ExternalModules.conf 2012-02-24 02:16:18 +0000
99@@ -29,7 +29,6 @@
100 data-cleaning bzr lp:zorba/data-cleaning-module 1.0
101 data-converters bzr lp:zorba/data-converters-module
102 data-formatting bzr lp:zorba/data-formatting-module zorba-2.1
103-email bzr lp:zorba/email-module zorba-2.1
104 excel bzr lp:zorba/excel-module zorba-2.1
105 geo bzr lp:zorba/geo-module zorba-2.1
106 http-client bzr lp:zorba/http-client-module
107@@ -40,3 +39,4 @@
108 security bzr lp:zorba/security-module zorba-2.1
109 system bzr lp:zorba/system-module zorba-2.1
110 xqxq bzr lp:zorba/xqxq-module zorba-2.1
111+email bzr lp:zorba/email-module zorba-2.1

Subscribers

People subscribed via source and target branches