Properly setup apt

This commit is contained in:
Waqar Ahmed
2021-04-21 05:17:45 +05:00
committed by Waqar Ahmed
parent 464c86eb90
commit d3e2921458
2 changed files with 0 additions and 13 deletions

View File

@@ -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([

View File

@@ -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')