def _package_external(directory, package_name, make_clean):
"""Builds packages with mk-build-deps and dpkg-buildpackage.
Args:
directory: the path to a repo synced on the VM via vagrant
package_name: the name of the debian package that will be created
"""
if env.pkgfmt != "deb":
print("External packages only support deb, not building.")
return
if not exists(directory):
print('path %s does not exist, cannot package' % directory)
return
print('packaging %s as %s' % (directory, package_name))
run('mkdir -p ~/endaga-packages')
with cd('/home/vagrant/'):
with cd(directory):
run('echo y | sudo mk-build-deps')
run('sudo gdebi --n %s-build-deps*.deb' % package_name)
run('rm -f %s-build-deps*.deb' % package_name)
clean_arg = '' if make_clean == 'yes' else '-nc'
run('dpkg-buildpackage -b -uc -us %s' % clean_arg)
run('mv %s_*.deb ~/endaga-packages/.' % package_name)
run('rm %s_*' % package_name)
external_packaging.py 文件源码
python
阅读 17
收藏 0
点赞 0
评论 0
评论列表
文章目录