Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
moving portage folders [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
auriga
n00b
n00b


Joined: 03 Aug 2003
Posts: 11
Location: Derby, UK

PostPosted: Sun Oct 19, 2003 10:01 am    Post subject: moving portage folders [SOLVED] Reply with quote

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
View user's profile Send private message
Pithlit
l33t
l33t


Joined: 27 Dec 2003
Posts: 887
Location: fuhen

PostPosted: Sat Jan 03, 2004 10:28 pm    Post subject: moving portage folders [SOLVED] Reply with quote

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 :P ) 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
View user's profile Send private message
avendesora
Veteran
Veteran


Joined: 16 Aug 2002
Posts: 1739
Location: Betelgeuse vicinity

PostPosted: Sat Jan 03, 2004 10:53 pm    Post subject: Reply with quote

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
View user's profile Send private message
Pithlit
l33t
l33t


Joined: 27 Dec 2003
Posts: 887
Location: fuhen

PostPosted: Sun Jan 04, 2004 2:47 am    Post subject: Reply with quote

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
View user's profile Send private message
Pithlit
l33t
l33t


Joined: 27 Dec 2003
Posts: 887
Location: fuhen

PostPosted: Sun Jan 04, 2004 4:40 am    Post subject: Reply with quote

CRAP! all I had to do was

Code:
emerge sync


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 :D


---------------------------------------------------------------------------

Credits to http://forums.gentoo.org/viewtopic.php?t=97807&highlight=moving+portage
Back to top
View user's profile Send private message
cosh
n00b
n00b


Joined: 02 May 2004
Posts: 6

PostPosted: Mon May 03, 2004 6:40 pm    Post subject: moving portage tree Reply with quote

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
View user's profile Send private message
hadfield
Retired Dev
Retired Dev


Joined: 18 Mar 2003
Posts: 308
Location: Vancouver, BC, Canada

PostPosted: Mon May 03, 2004 7:53 pm    Post subject: Reply with quote

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
View user's profile Send private message
robmoss
Retired Dev
Retired Dev


Joined: 27 May 2003
Posts: 2634
Location: Jesus College, Oxford

PostPosted: Mon May 03, 2004 9:05 pm    Post subject: Reply with quote

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
View user's profile Send private message
Rhino
Apprentice
Apprentice


Joined: 12 Feb 2003
Posts: 177

PostPosted: Mon May 03, 2004 11:12 pm    Post subject: Reply with quote

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
View user's profile Send private message
jel
Apprentice
Apprentice


Joined: 10 Aug 2005
Posts: 259
Location: Gothenburg

PostPosted: Mon Oct 31, 2005 6:37 am    Post subject: PORTDIR question Reply with quote

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
View user's profile Send private message
feivelda
Guru
Guru


Joined: 21 Feb 2005
Posts: 480
Location: Frankfurt, Germany

PostPosted: Mon Oct 31, 2005 6:57 am    Post subject: Reply with quote

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
View user's profile Send private message
Genone
Retired Dev
Retired Dev


Joined: 14 Mar 2003
Posts: 9013
Location: beyond the rim

PostPosted: Mon Oct 31, 2005 10:42 am    Post subject: Re: PORTDIR question Reply with quote

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
View user's profile Send private message
jel
Apprentice
Apprentice


Joined: 10 Aug 2005
Posts: 259
Location: Gothenburg

PostPosted: Mon Oct 31, 2005 6:53 pm    Post subject: Re: PORTDIR question ** resolved Reply with quote

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
View user's profile Send private message
hielvc
Advocate
Advocate


Joined: 19 Apr 2002
Posts: 2801
Location: Oceanside, Ca

PostPosted: Mon Dec 12, 2005 6:14 pm    Post subject: Reply with quote

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
View user's profile Send private message
defenderBG
l33t
l33t


Joined: 20 Jun 2006
Posts: 817

PostPosted: Wed Oct 18, 2006 12:38 am    Post subject: Reply with quote

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
View user's profile Send private message
Genone
Retired Dev
Retired Dev


Joined: 14 Mar 2003
Posts: 9013
Location: beyond the rim

PostPosted: Wed Oct 18, 2006 10:54 am    Post subject: Reply with quote

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 :lol:
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum