本文整理匯總了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')