public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Anthony G. Basile" <blueness@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/grss:master commit in: grs/, /, bin/, tests/
Date: Mon, 18 Jul 2022 19:50:37 +0000 (UTC)	[thread overview]
Message-ID: <1658173800.248bff2120901089cacf41a26a044adf3c2e8126.blueness@gentoo> (raw)

commit:     248bff2120901089cacf41a26a044adf3c2e8126
Author:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Mon Jul 18 19:50:00 2022 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Mon Jul 18 19:50:00 2022 +0000
URL:        https://gitweb.gentoo.org/proj/grss.git/commit/?id=248bff21

Switch to new /var/db/repos/gentoo and /var/cache/binpkgs defaults

Signed-off-by: Anthony G. Basile <blueness <AT> gentoo.org>

 TODO                           | 2 +-
 bin/grsup                      | 2 +-
 grs/Constants.py               | 4 ++--
 grs/ISOIt.py                   | 2 +-
 grs/MountDirectories.py        | 4 ++--
 tests/test-mountdirectories.py | 8 ++++----
 6 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/TODO b/TODO
index 2cb96b2..270b30b 100644
--- a/TODO
+++ b/TODO
@@ -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

diff --git a/bin/grsup b/bin/grsup
index 319236f..8e2679c 100755
--- a/bin/grsup
+++ b/bin/grsup
@@ -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)


                 reply	other threads:[~2022-07-18 19:50 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1658173800.248bff2120901089cacf41a26a044adf3c2e8126.blueness@gentoo \
    --to=blueness@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox