ubuntu-touch-coreapps-reviewers team mailing list archive
-
ubuntu-touch-coreapps-reviewers team
-
Mailing list archive
-
Message #08813
[Merge] lp:~nskaggs/ubuntu-filemanager-app/fix-xauthority into lp:ubuntu-filemanager-app
Nicholas Skaggs has proposed merging lp:~nskaggs/ubuntu-filemanager-app/fix-xauthority into lp:ubuntu-filemanager-app.
Commit message:
Remove unneeded _copy_xauthority_file
Requested reviews:
Ubuntu File Manager Developers (ubuntu-filemanager-dev)
Related bugs:
Bug #1220607 in Ubuntu File Manager App: "Autopilot tests fail due to XAuthority bug"
https://bugs.launchpad.net/ubuntu-filemanager-app/+bug/1220607
For more details, see:
https://code.launchpad.net/~nskaggs/ubuntu-filemanager-app/fix-xauthority/+merge/288837
Remove unneeded _copy_xauthority_file
--
Your team Ubuntu File Manager Developers is requested to review the proposed merge of lp:~nskaggs/ubuntu-filemanager-app/fix-xauthority into lp:ubuntu-filemanager-app.
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt 2015-10-20 18:28:30 +0000
+++ CMakeLists.txt 2016-03-11 21:17:15 +0000
@@ -73,22 +73,41 @@
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/manifest.json filemanager.apparmor ${CONTENT_HUB_EXPORTER} DESTINATION ${CMAKE_INSTALL_PREFIX})
- MESSAGE("Grabbing upstream libs to ${CMAKE_CURRENT_BINARY_DIR}/upstream-libs")
- execute_process(
- COMMAND mkdir ${CMAKE_CURRENT_BINARY_DIR}/upstream-libs
- COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/get-click-deps -d ${CMAKE_CURRENT_SOURCE_DIR}/filemanager-libs.json ${CLICK_ARCH} ${CMAKE_CURRENT_BINARY_DIR}/upstream-libs
- )
- MESSAGE("Installing upstream libs from ${CMAKE_CURRENT_BINARY_DIR}/upstream-libs/usr/lib/${ARCH_TRIPLET}/ to ${DATA_DIR}lib/${ARCH_TRIPLET}")
- file(GLOB_RECURSE UPSTREAM_LIBS "${CMAKE_CURRENT_BINARY_DIR}/upstream-libs/usr/lib/${ARCH_TRIPLET}/*")
- foreach(ITEM ${UPSTREAM_LIBS})
- IF( IS_DIRECTORY "${ITEM}" )
- LIST( APPEND DIRS_TO_DEPLOY "${ITEM}" )
- ELSE()
- LIST( APPEND FILES_TO_DEPLOY "${ITEM}" )
- ENDIF()
- endforeach()
- MESSAGE("Following files to install:- ${FILES_TO_DEPLOY}")
- INSTALL( FILES ${FILES_TO_DEPLOY} DESTINATION ${DATA_DIR}lib/${ARCH_TRIPLET} )
+ set(UPSTREAM_LIBS_DIR ${CMAKE_BINARY_DIR}/upstream-libs)
+
+ #grab dependencies
+ set(GET_CLICK_DEPS_TOOL ${CMAKE_SOURCE_DIR}/get-click-deps)
+ set(DEPS_MANIFEST ${CMAKE_CURRENT_SOURCE_DIR}/filemanager-libs.json)
+ MESSAGE("Grabbing upstream libs to ${UPSTREAM_LIBS_DIR}")
+
+ get_filename_component(BLD_CONFIGURATION_NAME ${CMAKE_BINARY_DIR} NAME)
+ set(UPSTREAM_CACHE $ENV{HOME}/dev/upstream-libs-filemanager/${BLD_CONFIGURATION_NAME})
+ MESSAGE("Upstream libs cache path: ${UPSTREAM_CACHE}")
+
+ if(EXISTS "${UPSTREAM_CACHE}")
+ MESSAGE("Upstream libs cache exists.")
+ file(COPY ${UPSTREAM_CACHE}/upstream-libs/ DESTINATION ${UPSTREAM_LIBS_DIR} PATTERN * )
+ else()
+ MESSAGE("Cache miss, downloading from network.")
+ file(MAKE_DIRECTORY ${UPSTREAM_LIBS_DIR})
+ file(MAKE_DIRECTORY ${UPSTREAM_CACHE})
+ execute_process(
+ COMMAND ${GET_CLICK_DEPS_TOOL} -d ${DEPS_MANIFEST} ${CLICK_ARCH} ${UPSTREAM_LIBS_DIR}
+ )
+ # Cache for next usage
+ file(COPY ${UPSTREAM_LIBS_DIR} DESTINATION ${UPSTREAM_CACHE} )
+ endif()
+ MESSAGE("Installing upstream libs from ${CMAKE_CURRENT_BINARY_DIR}/upstream-libs/usr/lib/${ARCH_TRIPLET}/ to ${DATA_DIR}lib/${ARCH_TRIPLET}")
+ file(GLOB_RECURSE UPSTREAM_LIBS "${CMAKE_CURRENT_BINARY_DIR}/upstream-libs/usr/lib/${ARCH_TRIPLET}/*")
+ foreach(ITEM ${UPSTREAM_LIBS})
+ IF( IS_DIRECTORY "${ITEM}" )
+ LIST( APPEND DIRS_TO_DEPLOY "${ITEM}" )
+ ELSE()
+ LIST( APPEND FILES_TO_DEPLOY "${ITEM}" )
+ ENDIF()
+ endforeach()
+ MESSAGE("Following files to install:- ${FILES_TO_DEPLOY}")
+ INSTALL( FILES ${FILES_TO_DEPLOY} DESTINATION ${DATA_DIR}lib/${ARCH_TRIPLET} )
else(CLICK_MODE)
execute_process(
COMMAND qmake -query QT_INSTALL_QML
=== modified file 'tests/autopilot/filemanager/tests/__init__.py'
--- tests/autopilot/filemanager/tests/__init__.py 2016-03-07 15:15:45 +0000
+++ tests/autopilot/filemanager/tests/__init__.py 2016-03-11 21:17:15 +0000
@@ -157,23 +157,6 @@
directory = registry.get_path(package_name)
return version, directory
- def _copy_xauthority_file(self, directory):
- """ Copy .Xauthority file to directory, if it exists in /home
- """
- # If running under xvfb, as jenkins does,
- # xsession will fail to start without xauthority file
- # Thus if the Xauthority file is in the home directory
- # make sure we copy it to our temp home directory
-
- xauth = os.path.expanduser(os.path.join(os.environ.get('HOME'),
- '.Xauthority'))
- if os.path.isfile(xauth):
- logger.debug("Copying .Xauthority to %s" % directory)
- shutil.copyfile(
- os.path.expanduser(os.path.join(os.environ.get('HOME'),
- '.Xauthority')),
- os.path.join(directory, '.Xauthority'))
-
def patch_home(self):
""" mock /home for testing purposes to preserve user data
"""
@@ -188,7 +171,6 @@
temp_dir = temp_dir_fixture.path
# before we set fixture, copy xauthority if needed
- self._copy_xauthority_file(temp_dir)
self.useFixture(fixtures.EnvironmentVariable('HOME',
newvalue=temp_dir))
References