You are not logged in.

#1 2015-05-27 11:35:30

victl
Member
Registered: 2014-12-07
Posts: 25

[SOLVED]opt as symlink to usr/local, unable to install packages to opt

I've set /opt as a symbolic link to /usr/local, since /usr/local is a standalone partition on my system while /opt is not. I thought this would make my system more managable. But it turns out that this action messed up all packages who's default installation path set on /opt. Every time I install them from repos, pacman complains 'there is already an /opt in the filesystem', installation failed.
The only thing I can do is build them by myself from AUR and modify PKGBUILD file to point to /usr/local.
How could I install ready built packages with default install location set to /opt on my system?
PS: There is an option '-r' in pacman which does not serve for this intention.
Thanks for any help!

Last edited by victl (2015-05-28 09:24:46)

Offline

#2 2015-05-27 11:49:55

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,737
Website

Re: [SOLVED]opt as symlink to usr/local, unable to install packages to opt

Use a bind mount.

http://allanmcrae.com/2014/12/pacman-4-2-released/ (See heading "Directory Symlink Handling").


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#3 2015-05-28 09:21:35

victl
Member
Registered: 2014-12-07
Posts: 25

Re: [SOLVED]opt as symlink to usr/local, unable to install packages to opt

Yes, it works for me! Thank you very much!
For me, putting this line into /etc/fstab do the tricks(note I used spaces to separate items, in reality, you should use <tab> ):

/usr/local         /opt             none               bind
WorMzy wrote:

Use a bind mount.

http://allanmcrae.com/2014/12/pacman-4-2-released/ (See heading "Directory Symlink Handling").

Last edited by victl (2015-05-28 09:21:50)

Offline

#4 2015-05-28 09:51:09

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,737
Website

Re: [SOLVED]opt as symlink to usr/local, unable to install packages to opt

victl wrote:

note I used spaces to separate items, in reality, you should use <tab>

Not true, tabs are horrible things, and I don't let them anywhere near my fstab. tongue

In seriousness, either tabs or spaces are fine.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

Board footer

Powered by FluxBB