catalyst icon indicating copy to clipboard operation
catalyst copied to clipboard

setup.py: prefix fixes

Open hanetzer opened this issue 7 years ago • 5 comments

Using these patches I end up a proper file list on my gentoo-on-gentoo prefix.

hanetzer avatar Apr 27 '18 05:04 hanetzer

Not ready for merging; needs work to actually work.

hanetzer avatar Apr 27 '18 06:04 hanetzer

27 Apr 2018 08:08:18 -00: NOTICE  : Loading configuration file: /home/hanetzer/gentoo/etc/catalyst/catalyst.conf
27 Apr 2018 08:08:18 -00: NOTICE  : conf_values[options] = {'autoresume', 'kerncache', 'seedcache', 'snapcache', 'bindist', 'pkgcache'}
27 Apr 2018 08:08:18 -00: NOTICE  : Processing spec file: stage1.spec
27 Apr 2018 08:08:18 -00: NOTICE  : Using target: stage1
27 Apr 2018 08:08:18 -00: NOTICE  : Source file specification matching setting is: strict
27 Apr 2018 08:08:18 -00: NOTICE  : Accepted source file extensions search order: ['tar', 'tar.xz', 'tpxz', 'xz', 'tar.bz2', 'bz2', 'tbz2', 'tar.gz', 'gz']
27 Apr 2018 08:08:18 -00: NOTICE  : Source path set to /home/hanetzer/gentoo/var/tmp/catalyst/builds/default/stage3-amd64-latest.tar.xz
27 Apr 2018 08:08:18 -00: NOTICE  : stage1 stage path is /home/hanetzer/gentoo/var/tmp/catalyst/tmp/default/stage1-amd64-latest/tmp/stage1root
27 Apr 2018 08:08:18 -00: NOTICE  : --- Running action sequence: unpack
27 Apr 2018 08:08:18 -00: NOTICE  : Referenced SEEDCACHE does not appear to be a directory, trying to untar...
27 Apr 2018 08:08:18 -00: NOTICE  : Resume: "seed source" unpack resume point is disabled
27 Apr 2018 08:08:18 -00: NOTICE  : Resume: Target chroot is invalid, cleaning up...
27 Apr 2018 08:08:18 -00: NOTICE  : Removing AutoResume Points ...
27 Apr 2018 08:08:18 -00: NOTICE  : Emptying directory: /home/hanetzer/gentoo/var/tmp/catalyst/tmp/default/.autoresume-stage1-amd64-latest
27 Apr 2018 08:08:18 -00: NOTICE  : Clearing the chroot path ...
27 Apr 2018 08:08:18 -00: NOTICE  : Emptying directory: /home/hanetzer/gentoo/var/tmp/catalyst/tmp/default/stage1-amd64-latest
27 Apr 2018 08:08:19 -00: NOTICE  : Starting auto from /home/hanetzer/gentoo/var/tmp/catalyst/builds/default/stage3-amd64-latest.tar.xz
27 Apr 2018 08:08:19 -00: NOTICE  : to /home/hanetzer/gentoo/var/tmp/catalyst/tmp/default/stage1-amd64-latest (this may take some time) ..
27 Apr 2018 08:08:32 -00: NOTICE  : --- Running action sequence: unpack_snapshot
27 Apr 2018 08:08:32 -00: NOTICE  : Unpacking portage tree (this can take a long time) ...
27 Apr 2018 08:08:40 -00: NOTICE  : --- Running action sequence: setup_confdir
27 Apr 2018 08:08:40 -00: NOTICE  : --- Running action sequence: portage_overlay
27 Apr 2018 08:08:40 -00: NOTICE  : --- Running action sequence: base_dirs
27 Apr 2018 08:08:40 -00: NOTICE  : --- Running action sequence: bind
27 Apr 2018 08:08:40 -00: NOTICE  : --- Running action sequence: chroot_setup
27 Apr 2018 08:08:40 -00: NOTICE  : Setting up chroot...
27 Apr 2018 08:08:40 -00: WARNING : Overriding certain env variables may cause catastrophic failure.
27 Apr 2018 08:08:40 -00: WARNING : If your build fails look here first as the possible problem.
27 Apr 2018 08:08:40 -00: WARNING : Catalyst assumes you know what you are doing when setting these variables.
27 Apr 2018 08:08:40 -00: WARNING : Catalyst Maintainers use VERY minimal envscripts, if used at all.
27 Apr 2018 08:08:40 -00: WARNING : You have been warned.
27 Apr 2018 08:08:40 -00: ERROR   : CatalystError: Could not write /home/hanetzer/gentoo/var/tmp/catalyst/tmp/default/stage1-amd64-latest/home/hanetzer/gentoo/etc/portage/make.conf: [Errno 2] No such file or directory: '/home/hanetzer/gentoo/var/tmp/catalyst/tmp/default/stage1-amd64-latest/home/hanetzer/gentoo/etc/portage/make.conf'
27 Apr 2018 08:08:40 -00: ERROR   : Exception running action sequence chroot_setup
Traceback (most recent call last):
  File "/home/hanetzer/gentoo/usr/lib64/python3.5/site-packages/catalyst/base/stagebase.py", line 1078, in chroot_setup
    self.write_make_conf(setup=True)
  File "/home/hanetzer/gentoo/usr/lib64/python3.5/site-packages/catalyst/base/stagebase.py", line 1090, in write_make_conf
    with open(makepath, "w") as myf:
FileNotFoundError: [Errno 2] No such file or directory: '/home/hanetzer/gentoo/var/tmp/catalyst/tmp/default/stage1-amd64-latest/home/hanetzer/gentoo/etc/portage/make.conf'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/hanetzer/gentoo/usr/lib64/python3.5/site-packages/catalyst/base/stagebase.py", line 1455, in run
    getattr(self, x)()
  File "/home/hanetzer/gentoo/usr/lib64/python3.5/site-packages/catalyst/base/stagebase.py", line 1082, in chroot_setup
    self.settings["make_conf"]), e))
catalyst.support.CatalystError: Could not write /home/hanetzer/gentoo/var/tmp/catalyst/tmp/default/stage1-amd64-latest/home/hanetzer/gentoo/etc/portage/make.conf: [Errno 2] No such file or directory: '/home/hanetzer/gentoo/var/tmp/catalyst/tmp/default/stage1-amd64-latest/home/hanetzer/gentoo/etc/portage/make.conf'
27 Apr 2018 08:08:40 -00: NOTICE  : Cleaning up... Running unbind()

Current issue.

hanetzer avatar Apr 27 '18 08:04 hanetzer

2 things:

  1. lstrip EPREFIX once, not every time you use it
  2. Don't change port_conf in defaults.py, that's what's causing your problem.

dwfreed avatar Apr 28 '18 14:04 dwfreed

has something changed? Catalyst must be run as root since it needs to create and use mounts as well as chroot. Is that now possible in an eprefix environment?

dol-sen avatar Oct 26 '18 18:10 dol-sen

@dol-sen I've not tried/looked at this in a while, but I could get it to work in a prefix, yes. No reason you can't install sudo or use su in a prefix, ya know.

hanetzer avatar Oct 29 '18 01:10 hanetzer