In my catalyst.conf file, I set: distdir="/var/portage/distfiles" Also, in my make.conf, I have DISTDIR="/var/portage/distfiles" Sure enough, when I run catalyst, it says: Setting portdir to default value "/usr/portage" Setting distdir to config file value "/var/portage/distfiles" However, when it tries to emerge the first package during the building of the livecd-stage1, emerge tries to download the file to /usr/portage/distfiles. On my system, /usr/portage is mounted ro via NFS, so of course the operation fails. As a workaround, if I run: # DISTDIR="/var/portage/distfiles" catalyst -f <specfile> then the operation works as expected. Reproducible: Always Steps to Reproduce: 1. run catalyst 2. 3. Actual Results: emerge fails when unable to access distfiles directory Expected Results: successful catalyst build
Does this still happen? Resolving the bug. Reopen if this still occurs on a more recent version of catalyst.
Still have this problem as of version 1.1.9.
What about 1.1.10_pre5?
Created attachment 61235 [details] log of screen session showing catalyst error
Still had same problem with 1.1.10_pre5. I've attached a screen log of the error. Please let me know if there is any further testing I can do or information that I can provide.
distfiles are being downloaded to /usr/portage/distfiles even though /var/portage/distfiles is set .. well its doing the correct thing .. its bind mounting /var/portage/distfiles to /usr/portage/distfiles inside the chroot .. So I dont see the bug ... :/
I don't understand how this issue is invalid? Catalyst fails when /usr/portage/distfiles is mounted read-only. Lots of people have this set-up either due to an NFS-mounted portage tree or mounting /usr as read-only for security reasons. It seems that 1) catalyst does not respect the setting in catalyst.conf and 2) does not respect the setting in make.conf. Furthermore, catalyst gets it right when you export the DISTDIR variable manually. That in itself would indicate that the current behavior is not by design.
Catalyst has nothing to do with make.conf, as it runs on non-Gentoo systems. What rocket is saying is that it is downloading to /usr/portage/distfiles *inside* the chroot, which is a bind mount to the real distdir. So you're saying that it is not respecting the distdir option in catalyst.conf, right? No matter what, it will try to write to /usr/portage/distfiles *within* the chroot, so we won't do anything about that, but it should bind mount it to the proper location.
Ok, I think I understand what you are saying. Catalyst is bind mounting /usr/portage/distfiles from 'outside' to chroot to /var/portage/distfiles 'inside' the chroot? Does this mean, then, that catalyst will always not work with a ro /usr or /usr/portage/distfiles partition?
No. It should be doing the exact opposite of what you're saying. It should be bind mounting whatever distdir in /etc/catalyst/catalyst.conf says to /usr/portage/distfiles inside the chroot, falling back to /usr/portage/distfiles if there is nothing specified. So I ask again, is this not what it is doing? Also, if you have a /usr/portage/distfiles directory on your machine, you can always bind mount your real DISTDIR to it to work around this issue.
Ok, now I am very confused. Clearly, I don't fully understand exactly what Catalyst is doing. Let me see if I can pound this thing into my head one more time: So catalyst should bind mount /var/portage/distfiles on top of /usr/portage/distfiles, per the variable set in catalyst.conf. However, looking at the log that I posted earlier, catalyst fails to download the distfiles to /usr/portage/distfiles because the location is mounted read-only. Two things come to mind: 1) /var/portage/distfiles is not being mounted on top of /usr/portage/distfiles for some reason, or 2) is the syntax of my catalyst.conf wrong somehow, which causes catalyst to echo the correct distdir setting but not actually do anything with that setting due to some kind of syntax error? I don't know what's causing this behavior, but I'm willing to conduct any further testing that you want to try and solve this mystery.
rocket: any ideas here?