User:Sam/Portage help/Migrating to new repository data locations
This page gives a set of instructions for how to migrate from the old repository/data locations to the new locations used in e.g. stage3s going forward.
See bug #662982 for background and motivation.
|Purpose||Old path||New path|
|Storing the tree / ebuilds||/usr/portage||/var/db/repos/gentoo|
|Distfiles (downloaded source code/files)||/usr/portage/distfiles||/var/cache/distfiles|
Originally written by kurly from #gentoo.
If you use a separate partition for /usr/portage, you may want to consider how this affects your disk usage and may need /etc/fstab changes.
- Remove (or comment out) any PORTDIR, DISTDIR, PKGDIR entries in /etc/portage/make.conf
- Note the output of eselect profile show for later
- If /var/db/repos/ does not exist, create it:
ls -1 /var/db/repos
- Move /usr/portage/distfiles to /var/cache/distfiles
- Move /usr/portage/packages to /var/cache/binpkgs
- Move /usr/portage to /var/db/repos/gentoo
- Edit the 'location' variable in /etc/portage/repos.conf/gentoo.conf (or equivalent) to /var/db/repos/gentoo
- Use eselect profile set ____ with the profile noted earlier
- Reinstall portage: DISTDIR=/var/cache/distfiles PKGDIR=/var/cache/binpkgs emerge --oneshot portage
- If you run a local rsync mirror, edit the path entry in /etc/rsyncd.conf to point to /var/db/repos/gentoo
- If you share your distfiles, remember to update whatever symlink or config file you need for that