where is /usr/portage?

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

where is /usr/portage?

n952162
I re-installed gentoo from the minimal boot cd (amd64), re-emerged
everything from my old, saved world file, overnight, and its up and
running, more or less.  Then, I wanted to see what was available and
discovered, there's no /usr/portage directory! What did I do wrong?


Reply | Threaded
Open this post in threaded view
|

Re: where is /usr/portage?

Mick-10
On Monday, 11 November 2019 08:25:06 GMT n952162 wrote:
> I re-installed gentoo from the minimal boot cd (amd64), re-emerged
> everything from my old, saved world file, overnight, and its up and
> running, more or less.  Then, I wanted to see what was available and
> discovered, there's no /usr/portage directory! What did I do wrong?

Nothing.

/usr/portage has now moved to /var/db/repos/gentoo/.

/usr/portage/distfiles has moved to /var/cache/distfiles/

Portage will work fine with both legacy and new fs locations.
--
Regards,

Mick

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: where is /usr/portage?

Mick-10
On Monday, 11 November 2019 08:38:38 GMT you wrote:
> wishoo!   ;-)
>
> Thank you.


You're welcome.  :-)  This page explains the new portage fs locations in more
detail:

https://wiki.gentoo.org/wiki/Handbook:AMD64/Portage/Files

--
Regards,

Mick

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: where is /usr/portage?

Mickaël Bucas
In reply to this post by Mick-10
Le lun. 11 nov. 2019 à 09:35, Mick <[hidden email]> a écrit :

>
> On Monday, 11 November 2019 08:25:06 GMT n952162 wrote:
> > I re-installed gentoo from the minimal boot cd (amd64), re-emerged
> > everything from my old, saved world file, overnight, and its up and
> > running, more or less.  Then, I wanted to see what was available and
> > discovered, there's no /usr/portage directory! What did I do wrong?
>
> Nothing.
>
> /usr/portage has now moved to /var/db/repos/gentoo/.
>
> /usr/portage/distfiles has moved to /var/cache/distfiles/
>
> Portage will work fine with both legacy and new fs locations.
> --
> Regards,
>
> Mick

My two systems are currently using the old locations.
Is there a documentation about the way to migrate to the new locations
without breaking things ?
The profile links comes to mind but other things are probably necessary !

Has anyone already done the migration ?
In this case do you have advices or warnings about it ?

Thanks

Best regards
Mickaël Bucas

Reply | Threaded
Open this post in threaded view
|

Re: where is /usr/portage?

Arve Barsnes
On Mon, 11 Nov 2019 at 11:29, Mickaël Bucas <[hidden email]> wrote:
> My two systems are currently using the old locations.
> Is there a documentation about the way to migrate to the new locations
> without breaking things ?
> The profile links comes to mind but other things are probably necessary !
>
> Has anyone already done the migration ?
> In this case do you have advices or warnings about it ?

Any migration is probably not necessary ever. The location of your
repos are in your configuration, like
/etc/portage/repos.conf/gentoo.conf, so portage shouldn't care.

Regards,
Arve

Reply | Threaded
Open this post in threaded view
|

Re: where is /usr/portage?

Rich Freeman
In reply to this post by Mickaël Bucas
On Mon, Nov 11, 2019 at 5:28 AM Mickaël Bucas <[hidden email]> wrote:
>
> My two systems are currently using the old locations.
> Is there a documentation about the way to migrate to the new locations
> without breaking things ?
> The profile links comes to mind but other things are probably necessary !
>
> Has anyone already done the migration ?
> In this case do you have advices or warnings about it ?

Moving both paths around have been trivial for a very long time.  Both
are completely disposable when you think about it so there isn't much
you can do wrong.

Just set DISTDIR and PORTDIR anywhere you want.  You can optionally
move the existing files to those locations, but if you don't portage
will just re-create everything on the next emerge --sync and re-fetch
distfiles as needed.

If you're ever concerned that something bad has happened to either
directory you can always just wipe it out and let portage repopulate
it.

I personally keep both in /var/cache and am not a fan of the non-LSB
/var/db in general, as I think the repo basically is a cache.
However, this was not the majority view.  In any case it is just a
default so it really isn't a big deal - any user can put both of these
directories anywhere they prefer.  Ditto for binary packages, logs,
etc.

The only thing you'd need to be careful about migrating is the
installed package metadata, as that can't be easily regenerated.

I also keep a /usr/portage symlink because I must be getting old.  :)
Some tools also have that path hard-coded.

The one thing I do strongly recommend is not nesting DISTDIR inside
PORTDIR.  That really wasn't a great design from day 1 and I don't
think anybody disagreed with separating them.  I'm not sure how much I
like $PORTDIR/metadata being where it is either, but I can at least
see the argument of keeping syncs of it and PORTDIR atomic and that is
an easy way to accomplish this.

--
Rich

Reply | Threaded
Open this post in threaded view
|

Re: where is /usr/portage?

Dale-46
In reply to this post by Mickaël Bucas
Mickaël Bucas wrote:

> Le lun. 11 nov. 2019 à 09:35, Mick <[hidden email]> a écrit :
>> On Monday, 11 November 2019 08:25:06 GMT n952162 wrote:
>>> I re-installed gentoo from the minimal boot cd (amd64), re-emerged
>>> everything from my old, saved world file, overnight, and its up and
>>> running, more or less.  Then, I wanted to see what was available and
>>> discovered, there's no /usr/portage directory! What did I do wrong?
>> Nothing.
>>
>> /usr/portage has now moved to /var/db/repos/gentoo/.
>>
>> /usr/portage/distfiles has moved to /var/cache/distfiles/
>>
>> Portage will work fine with both legacy and new fs locations.
>> --
>> Regards,
>>
>> Mick
> My two systems are currently using the old locations.
> Is there a documentation about the way to migrate to the new locations
> without breaking things ?
> The profile links comes to mind but other things are probably necessary !
>
> Has anyone already done the migration ?
> In this case do you have advices or warnings about it ?
>
> Thanks
>
> Best regards
> Mickaël Bucas
>
>


Others have posted some good info but sometimes a example that is in use
can help a lot.  Here's what is in my make.conf:


root@fireball / # cat /etc/make.conf | grep var
PORT_LOGDIR=/var/log/portage/
source /var/lib/layman/make.conf
DISTDIR="/var/cache/portage/distfiles/"
PKGDIR="/var/cache/portage/packages"
PORTDIR="/var/cache/portage/tree"
root@fireball / #


The last three are what you need to look at.  I moved mine years ago,
long before the defaults were changed and maybe even on my last rig.  At
the time, there was good logic for it being where I put it but I'm sure
others have their own ideas and you may place yours somewhere else for
yet another good reason. 

In all honesty, you can put them practically anywhere as long as portage
knows where they are and the permissions can be set correctly.  By the
way, those are portage:portage for them all as far as I know.  This is mine:


root@fireball / # ls -al /var/cache/portage/
total 160
drwxr-xr-x   5 root    root      4096 Dec 20  2012 .
drwxr-xr-x  13 root    root      4096 Nov 11 03:39 ..
drwxrwxr-x   3 portage portage 143360 Nov 11 00:07 distfiles
drwxr-xr-x 109 portage portage   4096 Nov 11 01:22 packages
drwxr-xr-x 175 portage portage   4096 Nov 10 20:09 tree
root@fireball / #




For those who question where make.conf is, it's a link to the real one. 
Saves me some typing and I don't have to remember where the thing went
too.  ;-)  Y'all know how I am.  lol 

Hope that helps, a tiny bit more anyway.  You got some good info to
start with.

Dale

:-)  :-) 

Reply | Threaded
Open this post in threaded view
|

Re: where is /usr/portage?

Mick-10
On Monday, 11 November 2019 13:00:20 GMT Dale wrote:

> Mickaël Bucas wrote:
> > Le lun. 11 nov. 2019 à 09:35, Mick <[hidden email]> a écrit :
> >> On Monday, 11 November 2019 08:25:06 GMT n952162 wrote:
> >>> I re-installed gentoo from the minimal boot cd (amd64), re-emerged
> >>> everything from my old, saved world file, overnight, and its up and
> >>> running, more or less.  Then, I wanted to see what was available and
> >>> discovered, there's no /usr/portage directory! What did I do wrong?
> >>
> >> Nothing.
> >>
> >> /usr/portage has now moved to /var/db/repos/gentoo/.
> >>
> >> /usr/portage/distfiles has moved to /var/cache/distfiles/
> >>
> >> Portage will work fine with both legacy and new fs locations.
> >> --
> >> Regards,
> >>
> >> Mick
> >
> > My two systems are currently using the old locations.
> > Is there a documentation about the way to migrate to the new locations
> > without breaking things ?
> > The profile links comes to mind but other things are probably necessary !
> >
> > Has anyone already done the migration ?
> > In this case do you have advices or warnings about it ?
> >
> > Thanks
> >
> > Best regards
> > Mickaël Bucas
>
> Others have posted some good info but sometimes a example that is in use
> can help a lot.  Here's what is in my make.conf:
>
>
> root@fireball / # cat /etc/make.conf | grep var
> PORT_LOGDIR=/var/log/portage/
> source /var/lib/layman/make.conf
> DISTDIR="/var/cache/portage/distfiles/"
> PKGDIR="/var/cache/portage/packages"
> PORTDIR="/var/cache/portage/tree"
> root@fireball / #
>
>
> The last three are what you need to look at.  
... AND ...

the last thing (PORTDIR) is what you should no longer have specified in /etc/
portage/make.conf, but in /etc/portage/repos.conf/gentoo.conf:

$ grep location /etc/portage/repos.conf/gentoo.conf
#location = /usr/portage          <==legacy portage fs location
location = /var/db/repos/gentoo

HTH.
--
Regards,

Mick

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: where is /usr/portage?

Mick-10
In reply to this post by Rich Freeman
On Monday, 11 November 2019 12:02:43 GMT Rich Freeman wrote:

> I also keep a /usr/portage symlink because I must be getting old.  :)
> Some tools also have that path hard-coded.

I wasn't aware of this - mine is just an empty directory with no symlink.  I
haven't noticed any adverse effects so far.

--
Regards,

Mick

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: where is /usr/portage?

Dale-46
In reply to this post by Mick-10
Mick wrote:

> On Monday, 11 November 2019 13:00:20 GMT Dale wrote:
>> Mickaël Bucas wrote:
>>> Le lun. 11 nov. 2019 à 09:35, Mick <[hidden email]> a écrit :
>>>> On Monday, 11 November 2019 08:25:06 GMT n952162 wrote:
>>>>> I re-installed gentoo from the minimal boot cd (amd64), re-emerged
>>>>> everything from my old, saved world file, overnight, and its up and
>>>>> running, more or less.  Then, I wanted to see what was available and
>>>>> discovered, there's no /usr/portage directory! What did I do wrong?
>>>> Nothing.
>>>>
>>>> /usr/portage has now moved to /var/db/repos/gentoo/.
>>>>
>>>> /usr/portage/distfiles has moved to /var/cache/distfiles/
>>>>
>>>> Portage will work fine with both legacy and new fs locations.
>>>> --
>>>> Regards,
>>>>
>>>> Mick
>>> My two systems are currently using the old locations.
>>> Is there a documentation about the way to migrate to the new locations
>>> without breaking things ?
>>> The profile links comes to mind but other things are probably necessary !
>>>
>>> Has anyone already done the migration ?
>>> In this case do you have advices or warnings about it ?
>>>
>>> Thanks
>>>
>>> Best regards
>>> Mickaël Bucas
>> Others have posted some good info but sometimes a example that is in use
>> can help a lot.  Here's what is in my make.conf:
>>
>>
>> root@fireball / # cat /etc/make.conf | grep var
>> PORT_LOGDIR=/var/log/portage/
>> source /var/lib/layman/make.conf
>> DISTDIR="/var/cache/portage/distfiles/"
>> PKGDIR="/var/cache/portage/packages"
>> PORTDIR="/var/cache/portage/tree"
>> root@fireball / #
>>
>>
>> The last three are what you need to look at.  
> ... AND ...
>
> the last thing (PORTDIR) is what you should no longer have specified in /etc/
> portage/make.conf, but in /etc/portage/repos.conf/gentoo.conf:
>
> $ grep location /etc/portage/repos.conf/gentoo.conf
> #location = /usr/portage          <==legacy portage fs location
> location = /var/db/repos/gentoo
>
> HTH.


Ahhhh, that one line is in there so I guess it got moved at some point,
likely the devs had some magic going on and did it for me.  ;-)  I'll
comment that out in make.conf, so I don't confuse myself later on.  :/ 
Come to think of it, I'll add a comment as to where it moved to as well
so I don't have to go dig for it some day. 

Thanks.  This will help the OP as well. 

Dale

:-)  :-) 



Reply | Threaded
Open this post in threaded view
|

Re: where is /usr/portage?

Francesco Turco-2
In reply to this post by Dale-46
On Mon, Nov 11, 2019, at 14:00, Dale wrote:
> root@fireball / # cat /etc/make.conf | grep var
> PORT_LOGDIR=/var/log/portage/
> source /var/lib/layman/make.conf
> DISTDIR="/var/cache/portage/distfiles/"
> PKGDIR="/var/cache/portage/packages"
> PORTDIR="/var/cache/portage/tree"

I'm sure you already know that, but that's an example of a useless use of cat.

The following command is better:
# grep var /etc/make.conf

:-)

--
https://fturco.net/

Reply | Threaded
Open this post in threaded view
|

Re: where is /usr/portage?

Dale-46
Francesco Turco wrote:

> On Mon, Nov 11, 2019, at 14:00, Dale wrote:
>> root@fireball / # cat /etc/make.conf | grep var
>> PORT_LOGDIR=/var/log/portage/
>> source /var/lib/layman/make.conf
>> DISTDIR="/var/cache/portage/distfiles/"
>> PKGDIR="/var/cache/portage/packages"
>> PORTDIR="/var/cache/portage/tree"
> I'm sure you already know that, but that's an example of a useless use of cat.
>
> The following command is better:
> # grep var /etc/make.conf
>
> :-)
>

I occasionally use grep that way, especially if I'm not sure what
file/directory it is in.  I use the -r option then tho.  Handy for
/etc/portage/ but no clue where the file might be exactly.  ;-)

Dale

:-)  :-) 

Reply | Threaded
Open this post in threaded view
|

Re: where is /usr/portage?

Mickaël Bucas
In reply to this post by Dale-46
Le lun. 11 nov. 2019 à 14:38, Dale <[hidden email]> a écrit :

>
> Mick wrote:
> > On Monday, 11 November 2019 13:00:20 GMT Dale wrote:
> >> Mickaël Bucas wrote:
> >>> Le lun. 11 nov. 2019 à 09:35, Mick <[hidden email]> a écrit :
> >>>> On Monday, 11 November 2019 08:25:06 GMT n952162 wrote:
> >>>>> I re-installed gentoo from the minimal boot cd (amd64), re-emerged
> >>>>> everything from my old, saved world file, overnight, and its up and
> >>>>> running, more or less.  Then, I wanted to see what was available and
> >>>>> discovered, there's no /usr/portage directory! What did I do wrong?
> >>>> Nothing.
> >>>>
> >>>> /usr/portage has now moved to /var/db/repos/gentoo/.
> >>>>
> >>>> /usr/portage/distfiles has moved to /var/cache/distfiles/
> >>>>
> >>>> Portage will work fine with both legacy and new fs locations.
> >>>> --
> >>>> Regards,
> >>>>
> >>>> Mick
> >>> My two systems are currently using the old locations.
> >>> Is there a documentation about the way to migrate to the new locations
> >>> without breaking things ?
> >>> The profile links comes to mind but other things are probably necessary !
> >>>
> >>> Has anyone already done the migration ?
> >>> In this case do you have advices or warnings about it ?
> >>>
> >>> Thanks
> >>>
> >>> Best regards
> >>> Mickaël Bucas
> >> Others have posted some good info but sometimes a example that is in use
> >> can help a lot.  Here's what is in my make.conf:
> >>
> >>
> >> root@fireball / # cat /etc/make.conf | grep var
> >> PORT_LOGDIR=/var/log/portage/
> >> source /var/lib/layman/make.conf
> >> DISTDIR="/var/cache/portage/distfiles/"
> >> PKGDIR="/var/cache/portage/packages"
> >> PORTDIR="/var/cache/portage/tree"
> >> root@fireball / #
> >>
> >>
> >> The last three are what you need to look at.
> > ... AND ...
> >
> > the last thing (PORTDIR) is what you should no longer have specified in /etc/
> > portage/make.conf, but in /etc/portage/repos.conf/gentoo.conf:
> >
> > $ grep location /etc/portage/repos.conf/gentoo.conf
> > #location = /usr/portage          <==legacy portage fs location
> > location = /var/db/repos/gentoo
> >
> > HTH.
>
>
> Ahhhh, that one line is in there so I guess it got moved at some point,
> likely the devs had some magic going on and did it for me.  ;-)  I'll
> comment that out in make.conf, so I don't confuse myself later on.  :/
> Come to think of it, I'll add a comment as to where it moved to as well
> so I don't have to go dig for it some day.
>
> Thanks.  This will help the OP as well.
>
> Dale
>
> :-)  :-)
>
Thanks for all explanations.
I've moved the Gentoo tree and distfiles from /usr to /var.
Having these in /usr has always felt strange to me but I never thought
it was so easy to move them !

Best regards
Mickaël Bucas