mirror of
https://github.com/truenas/scale-build.git
synced 2025-12-20 02:49:28 +00:00
Properly setup apt
This commit is contained in:
@@ -54,12 +54,6 @@ def _make_bootstrapdir_impl(bootstrapdir_type, logger_file=None):
|
||||
], exception=CallError, exception_msg='Failed mount --bind /var/cache/apt', **run_args
|
||||
)
|
||||
|
||||
# TODO: Remove me please
|
||||
logger.debug('Setting up apt-cacher')
|
||||
os.makedirs(os.path.join(CHROOT_BASEDIR, 'etc/apt/apt.conf.d'), exist_ok=True)
|
||||
with open(os.path.join(CHROOT_BASEDIR, 'etc/apt/apt.conf.d/02proxy'), 'w') as f:
|
||||
f.write('Acquire::http::Proxy "http://192.168.0.3:3142";\n')
|
||||
|
||||
if bootstrapdir_type == 'package':
|
||||
# Add extra packages for builds
|
||||
run([
|
||||
|
||||
@@ -59,13 +59,6 @@ class BuildPackageMixin:
|
||||
|
||||
def _build_impl(self):
|
||||
shutil.copytree(self.source_path, self.source_in_chroot, dirs_exist_ok=True, symlinks=True)
|
||||
|
||||
# TODO: Remove me please
|
||||
self.logger.debug('Setting up apt-cacher')
|
||||
os.makedirs(os.path.join(self.dpkg_overlay, 'etc/apt/apt.conf.d'), exist_ok=True)
|
||||
with open(os.path.join(self.dpkg_overlay, 'etc/apt/apt.conf.d/02proxy'), 'w') as f:
|
||||
f.write('Acquire::http::Proxy "http://192.168.0.3:3142";\n')
|
||||
|
||||
if os.path.exists(os.path.join(self.dpkg_overlay_packages_path, 'Packages.gz')):
|
||||
self.run_in_chroot('apt update')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user