makebuildserver: purge apt_package_cache feature
This is unmaintained, lightly used, a tangled mess, and can be replaced by things like the vagrant-cachier plugin or #418
This commit is contained in:
parent
52849deea0
commit
21ea1c1c89
|
@ -12,8 +12,7 @@ end
|
|||
|
||||
Vagrant.configure("2") do |config|
|
||||
|
||||
# these two caching methods conflict, so only use one at a time
|
||||
if Vagrant.has_plugin?("vagrant-cachier") and not configfile.has_key? "aptcachedir"
|
||||
if Vagrant.has_plugin?("vagrant-cachier")
|
||||
config.cache.scope = :box
|
||||
config.cache.auto_detect = false
|
||||
config.cache.enable :apt
|
||||
|
@ -77,12 +76,6 @@ Vagrant.configure("2") do |config|
|
|||
# necessary with 9p synced folders
|
||||
Dir.mkdir('cache') unless File.exists?('cache')
|
||||
|
||||
# cache .deb packages on the host via a mount trick
|
||||
if configfile.has_key? "aptcachedir"
|
||||
config.vm.synced_folder configfile["aptcachedir"], "/var/cache/apt/archives",
|
||||
owner: 'root', group: 'root', create: true
|
||||
end
|
||||
|
||||
config.vm.provision "shell", name: "setup-env-vars", path: "setup-env-vars",
|
||||
args: ["/opt/android-sdk"]
|
||||
config.vm.provision "shell", name: "apt-get-install", path: "provision-apt-get-install",
|
||||
|
|
|
@ -32,13 +32,6 @@
|
|||
#
|
||||
# cachedir = 'buildserver/cache'
|
||||
|
||||
# A big part of creating a new instance is downloading packages from Debian.
|
||||
# This setups up a folder in ~/.cache/fdroidserver to cache the downloaded
|
||||
# packages when rebuilding the build server from scratch. This requires
|
||||
# that virtualbox-guest-utils is installed.
|
||||
#
|
||||
# apt_package_cache = True
|
||||
|
||||
# The buildserver can use some local caches to speed up builds,
|
||||
# especially when the internet connection is slow and/or expensive.
|
||||
# If enabled, the buildserver setup will look for standard caches in
|
||||
|
|
|
@ -69,7 +69,6 @@ fi
|
|||
cat <<EOF > $WORKSPACE/makebuildserver.config.py
|
||||
debian_mirror = 'http://deb.debian.org/debian/'
|
||||
boot_timeout = 1200
|
||||
apt_package_cache = True
|
||||
copy_caches_from_host = True
|
||||
memory = $memory
|
||||
cpus = $cpus
|
||||
|
|
|
@ -77,7 +77,6 @@ BASEBOX_CHECKSUMS = {
|
|||
config = {
|
||||
'basebox': BASEBOX_DEFAULT,
|
||||
'debian_mirror': 'https://deb.debian.org/debian/',
|
||||
'apt_package_cache': False,
|
||||
'copy_caches_from_host': False,
|
||||
'boot_timeout': 600,
|
||||
'cachedir': os.path.join(os.getenv('HOME'), '.cache', 'fdroidserver'),
|
||||
|
@ -121,18 +120,6 @@ if config['vm_provider'] == 'libvirt':
|
|||
tmp = os.path.dirname(tmp)
|
||||
logging.debug('cache dir %s is accessible for libvirt vm.', config['cachedir'])
|
||||
|
||||
if config['apt_package_cache']:
|
||||
config['aptcachedir'] = config['cachedir'] + '/apt/archives'
|
||||
logging.debug('aptcachedir is set to %s', config['aptcachedir'])
|
||||
aptcachelock = os.path.join(config['aptcachedir'], 'lock')
|
||||
if os.path.isfile(aptcachelock):
|
||||
logging.info('apt cache dir is locked, removing lock')
|
||||
os.remove(aptcachelock)
|
||||
aptcachepartial = os.path.join(config['aptcachedir'], 'partial')
|
||||
if os.path.isdir(aptcachepartial):
|
||||
logging.info('removing partial downloads from apt cache dir')
|
||||
shutil.rmtree(aptcachepartial)
|
||||
|
||||
CACHE_FILES = [
|
||||
('https://services.gradle.org/distributions/gradle-6.8.3-bin.zip',
|
||||
'7faa7198769f872826c8ef4f1450f839ec27f0b4d5d1e51bade63667cbccd205'),
|
||||
|
|
Loading…
Reference in New Issue