View previous topic :: View next topic |
Author |
Message |
auriga n00b
Joined: 03 Aug 2003 Posts: 11 Location: Derby, UK
|
Posted: Sun Oct 19, 2003 10:01 am Post subject: moving portage folders [SOLVED] |
|
|
EDIT: Merged a few threads together for the FAQ Forum reference. --pjp
Hi All
Not really a problem anymore, but I thought I would be nice and share my experience.
I had a spare HD available so I decided to use it for all my portage needs (portage dir, profile, distfiles, packages, etc). I moved the directories and reran an emerge sync and it worked fine.
When trying to emerge a package i got the following error
Code: | !!! No profile directory; system mode unavailable.
|
After much looking and prodding I found the following file which is a sym link to a file in /usr/portage. This MUST be changed before portage can be used with the new directories, even if you have changed make.conf or make.globals
Code: | lrwxrwxrwx 1 root root 39 Jun 5 20:45 make.profile -> ../usr/portage/profiles/default-x86-1.4
|
If you change this link to be your new profile location you will find that everything works ok again. _________________ Alan
2.6.12-vs2.0-gentoo-r1
System: i686 AMD Athlon(tm) MP 1600+
RAM: 1024MB |
|
Back to top |
|
|
Pithlit l33t
Joined: 27 Dec 2003 Posts: 887 Location: fuhen
|
Posted: Sat Jan 03, 2004 10:28 pm Post subject: moving portage folders [SOLVED] |
|
|
Well I'm sure this has already been answered somewhere/sometime/somehow... and I just need to know if this would work since I just made everything I need to work in Gentoo (yay me ) so I have no need for a Win partition. I now want to use that partition for the portage files...
/home/Win <-- being old win mountpoint and hopefully new portage mountpoint/dir
make.conf
Code: | PORTAGE_TMPDIR="/home/Win/tmp"
PORTDIR="/home/Win/portage"
DISTDIR="${PORTDIR}/distfiles"
PKGDIR="${PORTDIR}/packages"
ORTDIR_OVERLAY="/home/Win/overlay/portage" |
would that do the trick? Oh and I want to move the existing files to the new directories as well...
Last edited by Pithlit on Sun Jan 04, 2004 4:42 am; edited 1 time in total |
|
Back to top |
|
|
avendesora Veteran
Joined: 16 Aug 2002 Posts: 1739 Location: Betelgeuse vicinity
|
Posted: Sat Jan 03, 2004 10:53 pm Post subject: |
|
|
That looks good. Give it a try - copy everything and rename your old portage dir. See if emerge still works ok (emerge sync and install something). If it works, you can scratch the old dirs. |
|
Back to top |
|
|
Pithlit l33t
Joined: 27 Dec 2003 Posts: 887 Location: fuhen
|
Posted: Sun Jan 04, 2004 2:47 am Post subject: |
|
|
nope... moving the portage won't work that way... it complains about not finding a profile dir...
EDIT: Can someone help me out here?
Code: | root@machina / # emerge -pv xfree
!!! No profile directory; system mode unavailable. |
|
|
Back to top |
|
|
Pithlit l33t
Joined: 27 Dec 2003 Posts: 887 Location: fuhen
|
Posted: Sun Jan 04, 2004 4:40 am Post subject: |
|
|
CRAP! all I had to do was
after after:
Code: | ln -s /path/to/the/new/portage/profiles/default-x86-1.4 /etc/make.profile |
After doing the rsync everything runs well
---------------------------------------------------------------------------
Credits to https://forums.gentoo.org/viewtopic.php?t=97807&highlight=moving+portage |
|
Back to top |
|
|
cosh n00b
Joined: 02 May 2004 Posts: 6
|
Posted: Mon May 03, 2004 6:40 pm Post subject: moving portage tree |
|
|
hi, i would like to move my portage tree to some other dir then /usr/portage . i now that the vars which have therefore to be changed are in the make.conf.
my question is just: is there anything to know 'bout this - possible errors etc... |
|
Back to top |
|
|
hadfield Retired Dev
Joined: 18 Mar 2003 Posts: 308 Location: Vancouver, BC, Canada
|
Posted: Mon May 03, 2004 7:53 pm Post subject: |
|
|
I've heard of other people doing this with no problems. Just make sure you've changed PORTDIR to where ever you move it to and it should work fine. |
|
Back to top |
|
|
robmoss Retired Dev
Joined: 27 May 2003 Posts: 2634 Location: Jesus College, Oxford
|
Posted: Mon May 03, 2004 9:05 pm Post subject: |
|
|
I've heard of some problems with this. It's not recommended, although it is possible. But seeing as hardly anyone does this, you'll be one of the first to find the various bugs which no doubt lurk when doing things this way... _________________ Reality is for those who can't face Science Fiction.
emerge -U will kill your Gentoo
ecatmur, Lord of Portage Bash Scripts |
|
Back to top |
|
|
Rhino Apprentice
Joined: 12 Feb 2003 Posts: 177
|
Posted: Mon May 03, 2004 11:12 pm Post subject: |
|
|
i'm using my tree under /srv/portage for ages with no problems,
just make shure you setup your make.conf and the symlink
/etc/make.profile to point to your current profile under your
$PORTDIR/profiles/yourprofilename (/srv/portage/profiles/default-x86-2004.0) in my case. _________________ With sufficient thrust, pigs fly just fine.
[ RFC 1925 ] |
|
Back to top |
|
|
jel Apprentice
Joined: 10 Aug 2005 Posts: 259 Location: Gothenburg
|
Posted: Mon Oct 31, 2005 6:37 am Post subject: PORTDIR question |
|
|
Hello,
I have changed the PORTDIR location in /etc/make.conf (it now points to /opt/portage). However this change does not seem to be reflected properly since emerge --info still says eg.
Code: |
DISTDIR="/usr/portage/distfiles"
PKGDIR="/usr/portage/packages"
|
Shouldn't these be derived from $PORTDIR?
I used to have a symlink from /usr/portage pointing to /opt/portage but I deleted it and used touch to create an emtpy write protected file named portage owned by root in /usr to make sure emerge wasn't doing the wrong thing behind my back.
I realise I could just do ln -s /usr/portage /opt/portage and stop worrying but I'd really try a cleaner approach if possible. That is I want to keep the number of symlinks between my different filesystems to an absolute minimum.
What I am thinking right now is to add the correct values for DISTDIR and PKGDIR explicitly in /etc/make.conf.
TIA |
|
Back to top |
|
|
feivelda Guru
Joined: 21 Feb 2005 Posts: 480 Location: Frankfurt, Germany
|
Posted: Mon Oct 31, 2005 6:57 am Post subject: |
|
|
DISTDIR is a variable in make.conf and free to choose.
The standard path is /usr/portage/distfiles.
I have pointed it to /usr/local/distfiles since I sometimes delete /usr/portage.
But you can try following:
Code: | make.conf
PORTDIR="/opt/portage"
DISTDIR="${PORTDIR}/distfiles" |
But I don't know if this works |
|
Back to top |
|
|
Genone Retired Dev
Joined: 14 Mar 2003 Posts: 9538 Location: beyond the rim
|
Posted: Mon Oct 31, 2005 10:42 am Post subject: Re: PORTDIR question |
|
|
jel wrote: | Hello,
I have changed the PORTDIR location in /etc/make.conf (it now points to /opt/portage). However this change does not seem to be reflected properly since emerge --info still says eg.
Code: |
DISTDIR="/usr/portage/distfiles"
PKGDIR="/usr/portage/packages"
|
Shouldn't these be derived from $PORTDIR? |
Nope. One might argue that it would make sense, however it wouldn't work with our config system. |
|
Back to top |
|
|
jel Apprentice
Joined: 10 Aug 2005 Posts: 259 Location: Gothenburg
|
Posted: Mon Oct 31, 2005 6:53 pm Post subject: Re: PORTDIR question ** resolved |
|
|
Genone wrote: | Nope. One might argue that it would make sense, however it wouldn't work with our config system. |
OK, I see what you mean. I added Code: |
DISTDIR=${PORTDIR}/distfiles
PKGDIR=${PORTDIR}/packages
|
to /etc/make.conf and portage seems to be working as expected. |
|
Back to top |
|
|
hielvc Advocate
Joined: 19 Apr 2002 Posts: 2805 Location: Oceanside, Ca
|
Posted: Mon Dec 12, 2005 6:14 pm Post subject: |
|
|
You can also just move the 2 directories which are the largest under /usr/portage and those are /usr/portage/ditfiles and for those who make packages /usr/portage/packages. On my box Code: | du -sh /usr/portage
1.5G /usr/portage
du -sh /usr/portage/distfiles
1.5G /usr/portage/distfiles
du -sh /usr/portage/packages
970M /usr/portage/package |
So you can relocate them, edit the entries ,DISTDIR and PKGDIR, in /etc/make.conf and leave /usr/portage where it is.
Slighly off topic see this Cleaning out stale distfiles to manage these directories. _________________ An A-Z Index of the Linux BASH command line |
|
Back to top |
|
|
defenderBG l33t
Joined: 20 Jun 2006 Posts: 817
|
Posted: Wed Oct 18, 2006 12:38 am Post subject: |
|
|
Pithlit wrote: |
Code: | ln -s /path/to/the/new/portage/profiles/default-x86-1.4 /etc/make.profile |
|
I use amd64, so I tried to look for /path/to/the/new/portage/profiles/default-x86_64
no luck, you have to link only /path/to/the/new/portage/profiles/default-linux/amd64/2006.1 and than it will go, otherwise you get a message: "!!! No profile directory; system mode unavailable." |
|
Back to top |
|
|
Genone Retired Dev
Joined: 14 Mar 2003 Posts: 9538 Location: beyond the rim
|
Posted: Wed Oct 18, 2006 10:54 am Post subject: |
|
|
defenderBG wrote: | Pithlit wrote: |
Code: | ln -s /path/to/the/new/portage/profiles/default-x86-1.4 /etc/make.profile |
|
I use amd64, so I tried to look for /path/to/the/new/portage/profiles/default-x86_64
no luck, you have to link only /path/to/the/new/portage/profiles/default-linux/amd64/2006.1 and than it will go, otherwise you get a message: "!!! No profile directory; system mode unavailable." |
Well, profiles changed quite a bit in the last 30 months |
|
Back to top |
|
|
|