Fix update_engine scons building.
To build update_engine without an emerge, you need to run setup_dev_packages
to get the needed packages into the chroot, and then "scons" to do the
actual build.
However, setup_dev_packages has a broken dependancy. That dependancy is needed
to generate the test coverage reports, but not otherwise. Also, the SConstruct
file listed a "BASE_VER" for libchrome dependancies that was outdated and
overridden in the ebuild file.
This change removes the broken package depedancy, and updates the BASE_VER
so that it's relatively easy to build the update engine directly without doing
an emerge. That breaks the script to measure how much unittest coverage we
have, but that script is already broken.
Also, Gilad was right about static int's in one of Jay's previous CLs (and I
was wrong). How he was declaring some constants is causing problems for
commanline compiles, but doesn't for ebuild builds. So, this CL fixes that.
BUG=None
TEST=scons compelted.
Change-Id: I134f83528d8ad6fe3e504d98efb3d1030bfa3865
Reviewed-on: https://gerrit.chromium.org/gerrit/25252
Reviewed-by: Jay Srinivasan <jaysri@chromium.org>
Tested-by: Jay Srinivasan <jaysri@chromium.org>
Tested-by: Don Garrett <dgarrett@chromium.org>
Commit-Ready: Don Garrett <dgarrett@chromium.org>
diff --git a/SConstruct b/SConstruct
index a79a8a8..432bdb9 100644
--- a/SConstruct
+++ b/SConstruct
@@ -193,7 +193,7 @@
-I/usr/include/libxml2""".split());
env['CCFLAGS'] += (' ' + ' '.join(env['CFLAGS']))
-BASE_VER = os.environ.get('BASE_VER', '85268')
+BASE_VER = os.environ.get('BASE_VER', '125070')
env['LIBS'] = Split("""bz2
crypto
curl
diff --git a/libcurl_http_fetcher.cc b/libcurl_http_fetcher.cc
index a0bf9a7..206daca 100644
--- a/libcurl_http_fetcher.cc
+++ b/libcurl_http_fetcher.cc
@@ -31,6 +31,10 @@
const char kCACertificatesPath[] = "/usr/share/chromeos-ca-certificates";
} // namespace {}
+const int LibcurlHttpFetcher::kMaxRedirects = 10;
+const int LibcurlHttpFetcher::kMaxRetryCountOobeComplete = 20;
+const int LibcurlHttpFetcher::kMaxRetryCountOobeNotComplete = 3;
+
LibcurlHttpFetcher::~LibcurlHttpFetcher() {
LOG_IF(ERROR, transfer_in_progress_)
<< "Destroying the fetcher while a transfer is in progress.";
diff --git a/libcurl_http_fetcher.h b/libcurl_http_fetcher.h
index f2239b1..cd7c858 100644
--- a/libcurl_http_fetcher.h
+++ b/libcurl_http_fetcher.h
@@ -23,9 +23,9 @@
class LibcurlHttpFetcher : public HttpFetcher {
public:
- static const int kMaxRedirects = 10;
- static const int kMaxRetryCountOobeComplete = 20;
- static const int kMaxRetryCountOobeNotComplete = 3;
+ static const int kMaxRedirects;
+ static const int kMaxRetryCountOobeComplete;
+ static const int kMaxRetryCountOobeNotComplete;
explicit LibcurlHttpFetcher(ProxyResolver* proxy_resolver,
SystemState* system_state)
diff --git a/setup_dev_packages b/setup_dev_packages
index 4ea2069..ee5eb4f 100755
--- a/setup_dev_packages
+++ b/setup_dev_packages
@@ -17,5 +17,7 @@
dev-cpp/gmock \
dev-cpp/gtest \
dev-util/bsdiff \
- dev-util/lcov \
sys-apps/rootdev
+
+# Doesn't work in the current sandbox
+# dev-util/lcov \