本文整理汇总了Python中osv.modules.filemap.FileMap.link方法的典型用法代码示例。如果您正苦于以下问题:Python FileMap.link方法的具体用法?Python FileMap.link怎么用?Python FileMap.link使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类osv.modules.filemap.FileMap
的用法示例。
在下文中一共展示了FileMap.link方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Copyright
# 需要导入模块: from osv.modules.filemap import FileMap [as 别名]
# 或者: from osv.modules.filemap.FileMap import link [as 别名]
#
# Copyright (C) 2014 Cloudius Systems, Ltd.
#
# This work is open source software, licensed under the terms of the
# BSD license as described in the LICENSE file in the top-level directory.
#
from osv.modules.filemap import FileMap
from osv.modules import api
import os, os.path
provides = ['java']
api.require('fonts')
api.require('ca-certificates')
api.require('libz')
api.require('josvsym')
api.require('httpserver-jolokia-plugin')
api.require('httpserver-jvm-plugin')
usr_files = FileMap()
usr_files.add('${OSV_BASE}/apps/openjdk8-fedora/install').to('/').allow_symlink()
usr_files.add('${OSV_BASE}/apps/openjdk8-fedora/install/usr/lib/jvm/java') \
.to('/usr/lib/jvm/java') \
.allow_symlink()
usr_files.link('/usr/lib/jvm/jre').to('/usr/lib/jvm/java/jre')
usr_files.link('/usr/lib/jvm/java/jre/lib/security/cacerts').to('/etc/pki/java/cacerts')
示例2: Copyright
# 需要导入模块: from osv.modules.filemap import FileMap [as 别名]
# 或者: from osv.modules.filemap.FileMap import link [as 别名]
#
# Copyright (C) 2016 Waldemar Kozaczuk
#
# This work is open source software, licensed under the terms of the
# BSD license as described in the LICENSE file in the top-level directory.
#
from osv.modules.filemap import FileMap
from osv.modules import api
api.require('java-non-isolated')
provides = ['java','java8']
usr_files = FileMap()
usr_files.add('${OSV_BASE}/apps/openjdk8-zulu-compact2/install').to('/').allow_symlink()
usr_files.add('${OSV_BASE}/apps/openjdk8-zulu-compact2/install/usr/lib/jvm/java') \
.to('/usr/lib/jvm/java') \
.allow_symlink()
usr_files.link('/usr/lib/jvm/jre').to('/usr/lib/jvm/java/jre')
示例3: FileMap
# 需要导入模块: from osv.modules.filemap import FileMap [as 别名]
# 或者: from osv.modules.filemap.FileMap import link [as 别名]
from osv.modules.filemap import FileMap
from osv.modules import api
import os, os.path
usr_files = FileMap()
api.require('fonts')
jdkdir = os.path.basename(os.path.expandvars('${jdkbase}'))
usr_files.add('${jdkbase}').to('/usr/lib/jvm/java') \
.include('lib/**') \
.include('jre/**') \
.exclude('jre/lib/security/cacerts') \
.exclude('jre/lib/audio/**')
usr_files.link('/usr/lib/jvm/' + jdkdir).to('java')
usr_files.link('/usr/lib/jvm/jre').to('java/jre')