You are not logged in.
My root partition got maxxed out, and (details not relevant) I decided in the end that I could take the entire directory tree starting at /usr/share, copy it to a new directory /home/share:
cp -a /usr/share /home
and then create a softlink of /home/share back to /use/share
cd /usr
sudo ln -s ../home/usr/share/ share
I thought this worked just fine, until today when i tried to install something:
nsaction (conflicting files)
cdrtools: /usr/share exists in filesystem
Errors occurred, no packages were upgraded.
[scott@scott-dell7577 ~]$ sudo pacman -S cdrtools
resolving dependencies...
looking for conflicting packages...
Packages (1) cdrtools-3.02a09-2
Total Installed Size: 4.11 MiB
:: Proceed with installation? [Y/n] Y
(1/1) checking keys in keyring [######################] 100%
(1/1) checking package integrity [######################] 100%
(1/1) loading package files [######################] 100%
(1/1) checking for file conflicts [######################] 100%
error: failed to commit trnsaction (conflicting files)
cdrtools: /usr/share exists in filesystem
Errors occurred, no packages were upgraded.
Please Note that there is no spurious file. It is the directory /usr/share itself: I suppose pacman has noticed that the directory it created many packages ago has been replaced by a softlink. I don't see why this should pacman care , and why the install needs to fail.
I *don't * want pacman to overwrite the softlink; I just want it to use the directory /usr/share that is on my system, I assume that the --force option will also casue pacman to replace my version of that directoyn(i.e. the soft link) with it's hard directory.\
what set of options could i pass to pacman to tell it to accept the directory structure as is, as long as it succeeds to write the files it needs to write.?
More generally, WHen i need space within some system directory, is there some other better pacman-friendly way? Do I need to avoid transferring some directory to a remote file system that has space,, and then use a soft link to glue it back (so to-speak) to its original location?
EDIT: Would the option "--overwrite !/usr/share" work? So that once the soft-link is active, from then on I upgrade /install alwasys with that option\
sudo pacman --overwrite !/usr/share/ -S <pkg name>
That supposedly means do NOT overwrite the pre-existing directory. But will in then fail when it doesn't overwrite it, or will it happily not overwrite and successfully complete the upgrade?
thank you
Last edited by scot (2020-03-26 02:41:03)
Offline
You replaced a pacman-tracked directory with a file (symlinks are a type of file).
Please use mount points instead. If the new location isn't its own filesystem partition, you can use bind-mounts to mount a directory (instead of a partition) to /usr/share.
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
Please use code tags for terminal output: https://wiki.archlinux.org/index.php/Co … s_and_code
I assume that the --force option will also casue pacman to replace my version
Pacman doesn't have a --force option any more, but yes, I seem to recall that inappropriate use of --force did cause issues for people using symlinks instead of mounts.
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