summaryrefslogtreecommitdiffstats
path: root/main.cxx
diff options
context:
space:
mode:
authorFrank Ch. Eigler <fche@elastic.org>2008-11-29 16:43:41 -0500
committerFrank Ch. Eigler <fche@elastic.org>2008-11-29 16:43:41 -0500
commitf4d5049b5d74cf907c5c5bba3130306adff0205d (patch)
tree85e84ffc759b53ade1132d56b1bc4281242335f2 /main.cxx
parent478c850f8fd74af2ecadbb68bab95f0949e21ade (diff)
downloadsystemtap-steved-f4d5049b5d74cf907c5c5bba3130306adff0205d.tar.gz
systemtap-steved-f4d5049b5d74cf907c5c5bba3130306adff0205d.tar.xz
systemtap-steved-f4d5049b5d74cf907c5c5bba3130306adff0205d.zip
buildrun/caching warning cleanup
Diffstat (limited to 'main.cxx')
-rw-r--r--main.cxx21
1 files changed, 14 insertions, 7 deletions
diff --git a/main.cxx b/main.cxx
index 91c20ddb..9d322fe4 100644
--- a/main.cxx
+++ b/main.cxx
@@ -393,9 +393,10 @@ main (int argc, char * const argv [])
if (create_dir(s.data_path.c_str()) == 1)
{
const char* e = strerror (errno);
- cerr << "Warning: failed to create systemtap data directory (\""
- << s.data_path << "\"): " << e << endl;
- cerr << "Disabling cache support." << endl;
+ if (! s.suppress_warnings)
+ cerr << "Warning: failed to create systemtap data directory (\""
+ << s.data_path << "\"): " << e
+ << ", disabling cache support." << endl;
s.use_cache = false;
}
@@ -405,9 +406,10 @@ main (int argc, char * const argv [])
if (create_dir(s.cache_path.c_str()) == 1)
{
const char* e = strerror (errno);
- cerr << "Warning: failed to create cache directory (\""
- << s.cache_path << "\"): " << e << endl;
- cerr << "Disabling cache support." << endl;
+ if (! s.suppress_warnings)
+ cerr << "Warning: failed to create cache directory (\""
+ << s.cache_path << "\"): " << e
+ << ", disabling cache support." << endl;
s.use_cache = false;
}
}
@@ -1062,8 +1064,13 @@ main (int argc, char * const argv [])
{
// Update cache. Cache cleaning is kicked off at the end of this function.
if (s.use_cache)
- add_to_cache(s);
+ add_to_cache(s);
+ // We may need to save the module in $CWD if the cache was
+ // inaccessible for some reason.
+ if (! s.use_cache && s.last_pass == 4)
+ save_module = true;
+
// Copy module to the current directory.
if (save_module && !pending_interrupts)
{