/usr/portage/distfiles vs /var/cache/distfiles

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

/usr/portage/distfiles vs /var/cache/distfiles

Paul B. Henson
I recently installed a new server, and noticed that it is using
/var/cache/distfiles rather than /usr/portage/distfiles. looking at the
documentation, it seems that is the new default, and it says "new
installations" will use it. I have older servers which are still using
/usr/portage/distfiles. None of them have DISTDIR configured, so I am
curious how portage is deciding between "old" and new"? If I wanted to
migrate my older boxes to the new location without explicitly setting
DISTDIR on them, what do I need to change?

Thanks…

Reply | Threaded
Open this post in threaded view
|

Re: /usr/portage/distfiles vs /var/cache/distfiles

Mike Gilbert-2
On Tue, Jan 14, 2020 at 5:05 PM Paul B. Henson <[hidden email]> wrote:
>
> I recently installed a new server, and noticed that it is using
> /var/cache/distfiles rather than /usr/portage/distfiles. looking at the
> documentation, it seems that is the new default, and it says "new
> installations" will use it. I have older servers which are still using
> /usr/portage/distfiles. None of them have DISTDIR configured, so I am
> curious how portage is deciding between "old" and new"? If I wanted to
> migrate my older boxes to the new location without explicitly setting
> DISTDIR on them, what do I need to change?

The portage ebuild has some code that automatically patches
/usr/share/portage/config/make.globals for existing installs. You can
update the setting there.

Alternatively, you can perform the following steps to make the portage
ebuild update make.globals for you.

1. Set DISTDIR to anything other than /usr/portage/distfiles in
/etc/portage/make.conf
2. Re-install sys-apps/portage.
3. Remove the DISTDIR setting from /etc/portage/make.conf.

From then on, portage will no longer patch the default DISTDIR setting
in make.globals.

Reference: https://gitweb.gentoo.org/proj/portage.git/tree/lib/portage/_compat_upgrade/default_locations.py?h=portage-2.3.84

Reply | Threaded
Open this post in threaded view
|

Re: /usr/portage/distfiles vs /var/cache/distfiles

Andrew Udvare
In reply to this post by Paul B. Henson
On 14/01/2020 17:05, Paul B. Henson wrote:

> I recently installed a new server, and noticed that it is using
> /var/cache/distfiles rather than /usr/portage/distfiles. looking at the
> documentation, it seems that is the new default, and it says "new
> installations" will use it. I have older servers which are still using
> /usr/portage/distfiles. None of them have DISTDIR configured, so I am
> curious how portage is deciding between "old" and new"? If I wanted to
> migrate my older boxes to the new location without explicitly setting
> DISTDIR on them, what do I need to change?
>
> Thanks…
>
I attempted to do this migration on two machines but was only successful
once. Pretty sure this is because of not using 17.1 profile on the
failing machine.

The first machine is on a 17.1 profile, and migration was relatively
simple, and worked. I did it based on this post:

https://forums.gentoo.org/viewtopic-p-8373904.html?sid=5c30f451df89c01a6bbe0a8dadd77c36#8373904

On the second machine, I did not change to profile 17.1. After moving
the files around, no matter what I tried, Portage refused to check the
new DISTDIR. I haven't had time to switch this machine to 17.1 yet.

Andrew


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

Re: /usr/portage/distfiles vs /var/cache/distfiles

Paul B. Henson
In reply to this post by Mike Gilbert-2
On Tue, Jan 14, 2020 at 05:48:40PM -0500, Mike Gilbert wrote:

> The portage ebuild has some code that automatically patches
> /usr/share/portage/config/make.globals for existing installs. You can
> update the setting there.

Ah, I didn't look there in my search :).

Cool, thanks much for the info.

Reply | Threaded
Open this post in threaded view
|

Re: /usr/portage/distfiles vs /var/cache/distfiles

Paul B. Henson
In reply to this post by Andrew Udvare
On Tue, Jan 14, 2020 at 06:33:58PM -0500, Andrew Udvare wrote:

> The first machine is on a 17.1 profile, and migration was relatively
> simple, and worked. I did it based on this post:
>
> https://forums.gentoo.org/viewtopic-p-8373904.html?sid=5c30f451df89c01a6bbe0a8dadd77c36#8373904

I'm already on the 17.1 profile. Thanks for the link.