Merge lp:~nskaggs/ubuntu-filemanager-app/fix-xauthority into lp:ubuntu-filemanager-app

Proposed by Nicholas Skaggs on 2016-03-11
Status: Superseded
Proposed branch: lp:~nskaggs/ubuntu-filemanager-app/fix-xauthority
Merge into: lp:ubuntu-filemanager-app
Diff against target: 96 lines (+35/-34)
2 files modified
CMakeLists.txt (+35/-16)
tests/autopilot/filemanager/tests/__init__.py (+0/-18)
To merge this branch: bzr merge lp:~nskaggs/ubuntu-filemanager-app/fix-xauthority
Reviewer Review Type Date Requested Status
Ubuntu File Manager Developers 2016-03-11 Pending
Review via email: mp+288837@code.launchpad.net

Commit message

Remove unneeded _copy_xauthority_file

Description of the change

Remove unneeded _copy_xauthority_file

To post a comment you must log in.

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'CMakeLists.txt'
2--- CMakeLists.txt 2015-10-20 18:28:30 +0000
3+++ CMakeLists.txt 2016-03-11 21:17:15 +0000
4@@ -73,22 +73,41 @@
5
6 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/manifest.json filemanager.apparmor ${CONTENT_HUB_EXPORTER} DESTINATION ${CMAKE_INSTALL_PREFIX})
7
8- MESSAGE("Grabbing upstream libs to ${CMAKE_CURRENT_BINARY_DIR}/upstream-libs")
9- execute_process(
10- COMMAND mkdir ${CMAKE_CURRENT_BINARY_DIR}/upstream-libs
11- COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/get-click-deps -d ${CMAKE_CURRENT_SOURCE_DIR}/filemanager-libs.json ${CLICK_ARCH} ${CMAKE_CURRENT_BINARY_DIR}/upstream-libs
12- )
13- MESSAGE("Installing upstream libs from ${CMAKE_CURRENT_BINARY_DIR}/upstream-libs/usr/lib/${ARCH_TRIPLET}/ to ${DATA_DIR}lib/${ARCH_TRIPLET}")
14- file(GLOB_RECURSE UPSTREAM_LIBS "${CMAKE_CURRENT_BINARY_DIR}/upstream-libs/usr/lib/${ARCH_TRIPLET}/*")
15- foreach(ITEM ${UPSTREAM_LIBS})
16- IF( IS_DIRECTORY "${ITEM}" )
17- LIST( APPEND DIRS_TO_DEPLOY "${ITEM}" )
18- ELSE()
19- LIST( APPEND FILES_TO_DEPLOY "${ITEM}" )
20- ENDIF()
21- endforeach()
22- MESSAGE("Following files to install:- ${FILES_TO_DEPLOY}")
23- INSTALL( FILES ${FILES_TO_DEPLOY} DESTINATION ${DATA_DIR}lib/${ARCH_TRIPLET} )
24+ set(UPSTREAM_LIBS_DIR ${CMAKE_BINARY_DIR}/upstream-libs)
25+
26+ #grab dependencies
27+ set(GET_CLICK_DEPS_TOOL ${CMAKE_SOURCE_DIR}/get-click-deps)
28+ set(DEPS_MANIFEST ${CMAKE_CURRENT_SOURCE_DIR}/filemanager-libs.json)
29+ MESSAGE("Grabbing upstream libs to ${UPSTREAM_LIBS_DIR}")
30+
31+ get_filename_component(BLD_CONFIGURATION_NAME ${CMAKE_BINARY_DIR} NAME)
32+ set(UPSTREAM_CACHE $ENV{HOME}/dev/upstream-libs-filemanager/${BLD_CONFIGURATION_NAME})
33+ MESSAGE("Upstream libs cache path: ${UPSTREAM_CACHE}")
34+
35+ if(EXISTS "${UPSTREAM_CACHE}")
36+ MESSAGE("Upstream libs cache exists.")
37+ file(COPY ${UPSTREAM_CACHE}/upstream-libs/ DESTINATION ${UPSTREAM_LIBS_DIR} PATTERN * )
38+ else()
39+ MESSAGE("Cache miss, downloading from network.")
40+ file(MAKE_DIRECTORY ${UPSTREAM_LIBS_DIR})
41+ file(MAKE_DIRECTORY ${UPSTREAM_CACHE})
42+ execute_process(
43+ COMMAND ${GET_CLICK_DEPS_TOOL} -d ${DEPS_MANIFEST} ${CLICK_ARCH} ${UPSTREAM_LIBS_DIR}
44+ )
45+ # Cache for next usage
46+ file(COPY ${UPSTREAM_LIBS_DIR} DESTINATION ${UPSTREAM_CACHE} )
47+ endif()
48+ MESSAGE("Installing upstream libs from ${CMAKE_CURRENT_BINARY_DIR}/upstream-libs/usr/lib/${ARCH_TRIPLET}/ to ${DATA_DIR}lib/${ARCH_TRIPLET}")
49+ file(GLOB_RECURSE UPSTREAM_LIBS "${CMAKE_CURRENT_BINARY_DIR}/upstream-libs/usr/lib/${ARCH_TRIPLET}/*")
50+ foreach(ITEM ${UPSTREAM_LIBS})
51+ IF( IS_DIRECTORY "${ITEM}" )
52+ LIST( APPEND DIRS_TO_DEPLOY "${ITEM}" )
53+ ELSE()
54+ LIST( APPEND FILES_TO_DEPLOY "${ITEM}" )
55+ ENDIF()
56+ endforeach()
57+ MESSAGE("Following files to install:- ${FILES_TO_DEPLOY}")
58+ INSTALL( FILES ${FILES_TO_DEPLOY} DESTINATION ${DATA_DIR}lib/${ARCH_TRIPLET} )
59 else(CLICK_MODE)
60 execute_process(
61 COMMAND qmake -query QT_INSTALL_QML
62
63=== modified file 'tests/autopilot/filemanager/tests/__init__.py'
64--- tests/autopilot/filemanager/tests/__init__.py 2016-03-07 15:15:45 +0000
65+++ tests/autopilot/filemanager/tests/__init__.py 2016-03-11 21:17:15 +0000
66@@ -157,23 +157,6 @@
67 directory = registry.get_path(package_name)
68 return version, directory
69
70- def _copy_xauthority_file(self, directory):
71- """ Copy .Xauthority file to directory, if it exists in /home
72- """
73- # If running under xvfb, as jenkins does,
74- # xsession will fail to start without xauthority file
75- # Thus if the Xauthority file is in the home directory
76- # make sure we copy it to our temp home directory
77-
78- xauth = os.path.expanduser(os.path.join(os.environ.get('HOME'),
79- '.Xauthority'))
80- if os.path.isfile(xauth):
81- logger.debug("Copying .Xauthority to %s" % directory)
82- shutil.copyfile(
83- os.path.expanduser(os.path.join(os.environ.get('HOME'),
84- '.Xauthority')),
85- os.path.join(directory, '.Xauthority'))
86-
87 def patch_home(self):
88 """ mock /home for testing purposes to preserve user data
89 """
90@@ -188,7 +171,6 @@
91 temp_dir = temp_dir_fixture.path
92
93 # before we set fixture, copy xauthority if needed
94- self._copy_xauthority_file(temp_dir)
95 self.useFixture(fixtures.EnvironmentVariable('HOME',
96 newvalue=temp_dir))
97

Subscribers

People subscribed via source and target branches