Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
CMake
CMake
Commits
88720153
Commit
88720153
authored
Mar 13, 2012
by
Brad King
Committed by
Kitware Robot
Mar 13, 2012
Browse files
Options
Browse Files
Download
Plain Diff
Merge topic 'fix-cpack-hdiutil-retry-loops'
05a76d53
CPack: Fix retry logic when calls to hdiutil fail
parents
b9642401
05a76d53
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
5 deletions
+9
-5
Source/CPack/cmCPackOSXX11Generator.cxx
Source/CPack/cmCPackOSXX11Generator.cxx
+5
-3
Source/CPack/cmCPackPackageMakerGenerator.cxx
Source/CPack/cmCPackPackageMakerGenerator.cxx
+4
-2
No files found.
Source/CPack/cmCPackOSXX11Generator.cxx
View file @
88720153
...
...
@@ -170,23 +170,25 @@ int cmCPackOSXX11Generator::PackageFiles()
<<
"
\"
create -ov -format UDZO -srcfolder
\"
"
<<
diskImageDirectory
.
c_str
()
<<
"
\"
\"
"
<<
packageFileNames
[
0
]
<<
"
\"
"
;
int
retVal
=
1
;
cmCPackLogger
(
cmCPackLog
::
LOG_VERBOSE
,
"Compress disk image using command: "
<<
dmgCmd
.
str
().
c_str
()
<<
std
::
endl
);
// since we get random dashboard failures with this one
// try running it more than once
int
numTries
=
4
;
int
retVal
=
1
;
int
numTries
=
10
;
bool
res
=
false
;
while
(
numTries
>
0
)
{
res
=
cmSystemTools
::
RunSingleCommand
(
dmgCmd
.
str
().
c_str
(),
&
output
,
&
retVal
,
0
,
this
->
GeneratorVerbose
,
0
);
if
(
res
&&
retVal
)
if
(
res
&&
!
retVal
)
{
numTries
=
-
1
;
break
;
}
cmSystemTools
::
Delay
(
500
);
numTries
--
;
}
if
(
!
res
||
retVal
)
...
...
Source/CPack/cmCPackPackageMakerGenerator.cxx
View file @
88720153
...
...
@@ -319,17 +319,19 @@ int cmCPackPackageMakerGenerator::PackageFiles()
<<
"
\"
\"
"
<<
packageFileNames
[
0
]
<<
"
\"
"
;
std
::
string
output
;
int
retVal
=
1
;
int
numTries
=
4
;
int
numTries
=
10
;
bool
res
=
false
;
while
(
numTries
>
0
)
{
res
=
cmSystemTools
::
RunSingleCommand
(
dmgCmd
.
str
().
c_str
(),
&
output
,
&
retVal
,
0
,
this
->
GeneratorVerbose
,
0
);
if
(
res
&&
retVal
)
if
(
res
&&
!
retVal
)
{
numTries
=
-
1
;
break
;
}
cmSystemTools
::
Delay
(
500
);
numTries
--
;
}
if
(
!
res
||
retVal
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment