LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 07-07-2021, 02:23 PM   #1
parse_flower
LQ Newbie
 
Registered: Jul 2021
Posts: 2

Rep: Reputation: Disabled
Does slackware have a variant of "update-alternatives" or eselect?


Hello,

so Debian has update-alternatives, Gentoo has eselect, etc. That's how one would e.g. handle the iptables symlinks.

Does slackware have such a thing? Or should one use ln -sf manually here?

Like dependency handling, where I used some ldd, grep certain files etc.

thanks
 
Old 07-07-2021, 03:05 PM   #2
LuckyCyborg
Senior Member
 
Registered: Mar 2010
Posts: 3,531

Rep: Reputation: 3369Reputation: 3369Reputation: 3369Reputation: 3369Reputation: 3369Reputation: 3369Reputation: 3369Reputation: 3369Reputation: 3369Reputation: 3369Reputation: 3369
Quote:
Originally Posted by parse_flower View Post
Hello,

so Debian has update-alternatives, Gentoo has eselect, etc. That's how one would e.g. handle the iptables symlinks.

Does slackware have such a thing? Or should one use ln -sf manually here?

Like dependency handling, where I used some ldd, grep certain files etc.

thanks
BINGO!
 
Old 07-07-2021, 03:09 PM   #3
drumz
Member
 
Registered: Apr 2005
Location: Oklahoma, USA
Distribution: Slackware
Posts: 906

Rep: Reputation: 697Reputation: 697Reputation: 697Reputation: 697Reputation: 697Reputation: 697
You'll have to explain what you are actually trying to accomplish. You already have a mindset of how other distributions solve a certain problem, and then are trying to solve the problem in the same way in Slackware. Instead, ask what you are actually trying to achieve.

I'm not too familiar with update-alternatives or eselect, so I don't know for sure if Slackware has something similar. But I'm pretty sure it doesn't.

Perhaps this note from https://slackbuilds.org/repository/1...ies/wxPython3/ will help answer your question:

Quote:
NOTE:
wxPython3 can be installed alongside with wxPython, but it will
overwrite some files created by wxPython.

If you need to build packages using wxPython, simply reinstall wxPython
package and wx-config will point to correct version. The same solution
can be used if wxPython's wx-config is overwritten.
 
Old 07-07-2021, 04:05 PM   #4
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,241

Rep: Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322
General answer is no, Slackware does not have them.

Were you trying to accomplish something specific that you would have used eselect or update-alternatives for?
 
Old 07-07-2021, 04:49 PM   #5
chris.willing
Member
 
Registered: Jun 2014
Location: Brisbane, Australia
Distribution: Slackware,LFS
Posts: 917

Rep: Reputation: 619Reputation: 619Reputation: 619Reputation: 619Reputation: 619Reputation: 619
/usr/bin/vi (could point to elvis, nvi, vim)?
 
Old 07-11-2021, 06:30 AM   #6
parse_flower
LQ Newbie
 
Registered: Jul 2021
Posts: 2

Original Poster
Rep: Reputation: Disabled
Thanks LuckyCyborg, dugan,

so I think it's clear, and hereby explicitly "documented", that no such thing exists. That's probably in the spirit of Slackware.

If you came here searching for iptables symlinks:

Code:
#!/bin/sh

# switch iptables to "nft" backend, default is "legacy" backend
cd /usr/sbin
ln -sf xtables-nft-multi iptables-save
ln -sf xtables-nft-multi iptables-restore
ln -sf xtables-nft-multi iptables
ln -sf xtables-nft-multi ip6tables-save
ln -sf xtables-nft-multi ip6tables-restore
ln -sf xtables-nft-multi ip6tables
A word of caution. Even when there is no update-alternatives/eselect-workalike, the links may be silently undone when updating the iptables package. So I keep the script around, and maybe it should be run in certain situations, e.g. before running iptables commands.

Of course one could also write wrapper scripts and functions, and call iptables-nft directly from there. Note it seems docker and maybe other things call the iptables binary (whatever the link points to), so making the links makes sense.

drumz, why should one know about it, and why should anyone care?

First, because if you do these "ln -sf" commands, and something else wants to control these links, your work will soon be undone.

Second, imagine you do this on debian (just an example), not knowing about update-alternatives. And you open threads in a forum, trying to discuss your topic. If you get caught doing something "wrong" like that, the topic will certainly change ... For this, it is better to do things "right" to begin with.

What is update-alternatives/eselect?

So I think the more "full featured" distributions assume that /usr, /bin, /sbin, parts of /var and some other things are not for the user/admin to deal with, except for certain interfaces that have the distribution's blessing. For this, there are these tools that select default compiler versions (gcc, rust, llvm ...), select symlink targets for vi, iptables, others, select graphics related drivers and backends, and whatever. Just "eselect" in Gentoo, "update-alternatives --get-selections" shows more information about it. I'm sure Redhat, MX, Manjaro, Mint, Suse, Arch, deepin etc. have similar tools. Some more minimal ones might not.
 
Old 07-12-2021, 06:47 AM   #7
elcore
Senior Member
 
Registered: Sep 2014
Distribution: Slackware
Posts: 1,754

Rep: Reputation: Disabled
Maybe I've missed something obvious, but I don't think there's any use for symlinks if one defines absolute paths within the iptables scripts.

Quote:
Originally Posted by parse_flower View Post
So I think the more "full featured" distributions assume that /usr, /bin, /sbin, parts of /var and some other things are not for the user/admin to deal with, except for certain interfaces that have the distribution's blessing.
This is sometimes called policy, I believe that in Slackware it generally ends once you read and understand the license.
So far, my experience has been: Anything goes, break what you want and you get to keep the pieces, just don't complain later.
If you were the one who broke it, don't expect someone else to fix it.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Could it be possible to port Gentoo s eselect program? adcdam Slackware 6 09-20-2020 12:44 PM
[SOLVED] update-alternatives: error: unable to read link `/etc/alternatives/editor': Invalid a ccc Debian 1 12-16-2013 01:51 AM
Circular dependencies in portage, file and eselect Zmegolaz Linux - Software 6 04-17-2011 03:55 PM
LXer: GNOME Shell Themes Now Have Brilliant Equinox Theme Variant As Well LXer Syndicated Linux News 1 08-24-2010 05:58 PM
Help With Java Problem Please"""""""""""" suemcholan Linux - Newbie 1 04-02-2008 06:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 09:46 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration