Migration of certain Gentoo directory paths
Hello,
I'm in the final stages of preparing a v1.5.2 release of the image, and as part of this have, following upstream policy [1,2], migrated certain Gentoo system paths, as follows:
- /usr/portage -> /var/db/repos/gentoo ($PORTDIR)
- /usr/portage/distfiles -> /var/cache/distfiles ($DISTDIR)
- /usr/portage/packages -> /var/cache/binpkgs ($PKGDIR)
- /usr/local/portage/<overlay> -> /var/db/repos/<overlay>
If you are currently using v1.5.1 or earlier of this image, please be aware that a
fixup script has been added to the repo, which will migrate the directories on your system to the new locations for you (script
here).
This fixup script will be run automatically, within a week at most, by a cron.weekly service already installed on your RPi. However, if you wish to correct the directory locations immediately (or you have the weekly fixup service disabled), then simply issue the following commands on your RPi (if running as demouser, prefix them with sudo):
Code: Select all
pi64 ~ # emaint sync --repo genpi64
pi64 ~ # /etc/cron.weekly/fixup
Results may be viewed in /var/log/latest-fixup-run.log (the relevant fixup is number 0009, and lives at [3] pre-migration, and [4] post-migration). It does nothing on a system where the directories have already been migrated. (Also, if you are using any layman repos, note that these will
not be moved.)
The migration script also ensures that /etc/portage/make.conf contains appropriate definitions for PORTDIR [5], PKGDIR and DISTDIR, and corrects the /etc/portage/make.profile symlink (so it still refers). It also leaves symlinks from the old to new locations, to ease migration (e.g., /usr/portage becomes a symlink to /var/db/repos/gentoo).
Because of the symlinks, any scripts you have that use the old locations
should still work, but ideally, replace hardcoded references therein to the appropriate portageq calls. For example:
Code: Select all
#!/bin/bash
# My local script
PORTDIR="$(portageq get_repo_path / gentoo)"
PKGDIR="$(portageq pkgdir)"
DISTDIR="$(portageq distdir)"
Any issues, please post here or email me (
sakaki@deciban.com)
Thanks!
References
[1]
https://bugs.gentoo.org/378603
[2]
https://projects.gentoo.org/council/mee ... ummary.txt
[3] /usr/local/portage/genpi64/app-portage/weekly-genup/files/fixup-0009-migrate-portage-paths.sh
[4] /var/db/repos/genpi64/app-portage/weekly-genup/files/fixup-0009-migrate-portage-paths.sh
[5] Now deprecated, but still used by various downstream scripts.