diff options
author | 2022-07-18 15:50:00 -0400 | |
---|---|---|
committer | 2022-07-18 15:50:00 -0400 | |
commit | 248bff2120901089cacf41a26a044adf3c2e8126 (patch) | |
tree | 6d0fc6e70251d217bfffc4127824cae31b98f743 | |
parent | grs/Kernel.py: correctly parse vanilla-sources (diff) | |
download | grss-248bff2120901089cacf41a26a044adf3c2e8126.tar.gz grss-248bff2120901089cacf41a26a044adf3c2e8126.tar.bz2 grss-248bff2120901089cacf41a26a044adf3c2e8126.zip |
Switch to new /var/db/repos/gentoo and /var/cache/binpkgs defaults
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
-rw-r--r-- | TODO | 2 | ||||
-rwxr-xr-x | bin/grsup | 2 | ||||
-rw-r--r-- | grs/Constants.py | 4 | ||||
-rw-r--r-- | grs/ISOIt.py | 2 | ||||
-rw-r--r-- | grs/MountDirectories.py | 4 | ||||
-rwxr-xr-x | tests/test-mountdirectories.py | 8 |
6 files changed, 11 insertions, 11 deletions
@@ -1,7 +1,7 @@ My TODO list: 1. A local copy of PORTDIR should be created in CONST.TMPDIR + GRS name. This is -to prevent wierdness in case /usr/portage changes during a run. +to prevent wierdness in case /var/db/repos/gentoo changes during a run. 2. Upon building a system we should make use of the binpkgs in CONST.TMPDIR + GRS name as a time saver. This is something to go into the build scripts in the GRS repo and not @@ -92,7 +92,7 @@ def install_kernel(version = 'latest', logfile = CONST.LOGFILE): # Download the linux-image tarball to packages/linux-image request = urllib.request.urlopen('%s/%s/%s' % (baseurl, 'linux-images', kernel)) - package = '/usr/portage/packages/linux-images' + package = '/var/cache/binpkgs/linux-images' os.makedirs(package, mode=0o755, exist_ok=True) kpath = os.path.join(package, kernel) with open(kpath, 'wb') as f: diff --git a/grs/Constants.py b/grs/Constants.py index 3c4b3bc..f9a640e 100644 --- a/grs/Constants.py +++ b/grs/Constants.py @@ -87,7 +87,7 @@ class Constants(): 'tmpdir' : '/var/tmp/grs/%s', 'workdir' : '/var/tmp/grs/%s/work', 'package' : '/var/tmp/grs/%s/packages', - 'portage' : '/usr/portage', + 'portage' : '/var/db/repos/gentoo', 'kernelroot' : '/var/tmp/grs/%s/kernel', 'portage_configroot' : '/var/tmp/grs/%s/system', 'pidfile' : '/run/grs-%s.pid' @@ -162,7 +162,7 @@ CONST.LOGFILE = '/var/log/grs.log' CONST.TMPDIR = '/var/tmp/grs' CONST.WORKDIR = '/var/tmp/grs/work' CONST.PACKAGE = '/var/tmp/grs/package' -CONST.PORTAGE = '/usr/portage' +CONST.PORTAGE = '/var/db/repos/gentoo' CONST.KERNELROOT = '/var/tmp/grs/kernel' CONST.PORTAGE_CONFIGROOT = '/var/tmp/grs/system' CONST.PIDFILE = '/run/grs.pid' diff --git a/grs/ISOIt.py b/grs/ISOIt.py index 20e820f..e8b8a8c 100644 --- a/grs/ISOIt.py +++ b/grs/ISOIt.py @@ -63,7 +63,7 @@ class ISOIt(HashIt): # Emerge busybox. os.symlink( - '/usr/portage/profiles/hardened/linux/amd64', + '/var/db/repos/gentoo/profiles/default/linux/amd64/17.1/hardened', makeprofile_path ) cmd = 'emerge --nodeps -1q busybox' diff --git a/grs/MountDirectories.py b/grs/MountDirectories.py index a1a42af..1ada579 100644 --- a/grs/MountDirectories.py +++ b/grs/MountDirectories.py @@ -35,8 +35,8 @@ class MountDirectories(): {'dev/shm' : ('tmpfs', 'shm')}, 'proc', 'sys', - [portage, 'usr/portage'], - [package, 'usr/portage/packages'] + [portage, 'var/db/repos/gentoo'], + [package, 'var/cache/binpkgs'] ] # Once initiated, we only work with one portage_configroot self.portage_configroot = portage_configroot diff --git a/tests/test-mountdirectories.py b/tests/test-mountdirectories.py index f12819f..0393ae1 100755 --- a/tests/test-mountdirectories.py +++ b/tests/test-mountdirectories.py @@ -34,13 +34,13 @@ if __name__ == "__main__": open(empty_file, 'a').close() configroot = '/tmp/test-mountdirectories' - directories = [ 'dev', 'dev/pts', 'dev/shm', 'proc', 'sys', 'usr/portage', 'usr/portage/packages' ] + directories = [ 'dev', 'dev/pts', 'dev/shm', 'proc', 'sys', 'var/db/repos/gentoo', 'var/cache/binpkgs' ] for d in directories: try: os.makedirs(os.path.join(configroot, d)) except FileExistsError: pass - alt_empty_file = os.path.join(configroot, 'usr/portage/packages/empty') + alt_empty_file = os.path.join(configroot, 'var/cache/binpkgs/empty') md = MountDirectories(portage_configroot=configroot, package=package, logfile='/dev/null') @@ -54,13 +54,13 @@ if __name__ == "__main__": assert(some_mounted == True) assert(all_mounted == True) - # /tmp/test-package/aaa and /tmp/test-mountdirectories/usr/portage/packages/empty exist + # /tmp/test-package/aaa and /tmp/test-mountdirectories/var/cache/binpkgs/empty exist assert(os.path.isfile(alt_empty_file) == True) Execute('umount --force %s' % os.path.dirname(alt_empty_file)) some_mounted, all_mounted = md.are_mounted() assert(some_mounted == True) assert(all_mounted == False) - # /tmp/test-mountdirectories/usr/portage/packages/empty doesn't exist anymore + # /tmp/test-mountdirectories/var/cache/binpkgs/empty doesn't exist anymore assert(os.path.isfile(alt_empty_file) == False) assert(md.ismounted(package) == False) |