Merge lp:~mrqtros/ubuntu-docviewer-app/ubuntu-docviewer-app-lib-cache into lp:ubuntu-docviewer-app

Proposed by Roman Shchekin
Status: Merged
Approved by: Stefano Verzegnassi
Approved revision: 261
Merged at revision: 266
Proposed branch: lp:~mrqtros/ubuntu-docviewer-app/ubuntu-docviewer-app-lib-cache
Merge into: lp:ubuntu-docviewer-app
Diff against target: 33 lines (+18/-5)
1 file modified
cmake/modules/Click.cmake (+18/-5)
To merge this branch: bzr merge lp:~mrqtros/ubuntu-docviewer-app/ubuntu-docviewer-app-lib-cache
Reviewer Review Type Date Requested Status
Stefano Verzegnassi Approve
Jenkins Bot continuous-integration Approve
Review via email: mp+282652@code.launchpad.net

Commit message

Upstream libs caching.

Description of the change

Upstream libs caching.

To post a comment you must log in.
Revision history for this message
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Roman Shchekin (mrqtros) wrote :

Something is wrong with tests...

Revision history for this message
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Stefano Verzegnassi (verzegnassi-stefano) wrote :

It works great, I must approve it! \o/

I have just some doubt about the multi-arch support, since the latest release of 'Ubuntu SDK' has the new "CMake Wizard" which, by default, could assign the same name[1] to the build folder, even if two different kits (e.g. "desktop" and "UbuntuSDK_for_armhf_GCC_ubuntu_sdk_15_04_vivid") are used[2].
Anyway, that's IMHO just a small payback we only need to keep in mind.

[1] <source_folder> + "-build" suffix
[2] Older version always used to append the kit name as suffix

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'cmake/modules/Click.cmake'
2--- cmake/modules/Click.cmake 2015-11-22 17:28:09 +0000
3+++ cmake/modules/Click.cmake 2016-01-14 19:36:18 +0000
4@@ -17,11 +17,24 @@
5 set(CUSTOM_SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/click/disable-file-locking.sh)
6 set(UPSTREAM_LIBS_DIR ${CMAKE_BINARY_DIR}/upstream-libs)
7
8- MESSAGE("Grabbing upstream libs to ${UPSTREAM_LIBS_DIR}")
9- execute_process(
10- COMMAND mkdir ${UPSTREAM_LIBS_DIR}
11- COMMAND ${GET_CLICK_DEPS_TOOL} -d ${DEPS_MANIFEST} -c ${CUSTOM_SCRIPT} ${CLICK_ARCH} ${UPSTREAM_LIBS_DIR}
12- )
13+ MESSAGE("Grabbing upstream libs to ${UPSTREAM_LIBS_DIR}")
14+
15+ get_filename_component(BLD_CONFIGURATION_NAME ${CMAKE_BINARY_DIR} NAME)
16+ set(UPSTREAM_CACHE $ENV{HOME}/dev/upstream-libs-docviewer/${BLD_CONFIGURATION_NAME})
17+ MESSAGE("Upstream libs cache path: ${UPSTREAM_CACHE}")
18+
19+ if(EXISTS "${UPSTREAM_CACHE}")
20+ MESSAGE("Upstream libs cache exists.")
21+ file(COPY ${UPSTREAM_CACHE}/upstream-libs/ DESTINATION ${UPSTREAM_LIBS_DIR} PATTERN * )
22+ else()
23+ MESSAGE("Cache miss, downloading from network.")
24+ execute_process(
25+ COMMAND mkdir ${UPSTREAM_LIBS_DIR}
26+ COMMAND ${GET_CLICK_DEPS_TOOL} -d ${DEPS_MANIFEST} -c ${CUSTOM_SCRIPT} ${CLICK_ARCH} ${UPSTREAM_LIBS_DIR}
27+ )
28+ # Cache for next usage.
29+ file(COPY ${UPSTREAM_LIBS_DIR} DESTINATION ${UPSTREAM_CACHE} )
30+ endif()
31
32 MESSAGE("Installing upstream libs from ${UPSTREAM_LIBS_DIR}/usr/lib/${ARCH_TRIPLET}/ to ${DATA_DIR}lib/${ARCH_TRIPLET}")
33 file(GLOB_RECURSE UPSTREAM_LIBS "${UPSTREAM_LIBS_DIR}/usr/lib/${ARCH_TRIPLET}/*")

Subscribers

People subscribed via source and target branches