Open wjaguar opened 3 months ago
Good points made and a good idea - I hadn't realised the significance of /etc/ld.so.conf.d/.
BUT, your patch goes a lot further with no explanations - a couple of examples:
1] export XDG_DATA_DIRS=\${XDG_DATA_DIRS:-/usr/local/share:/usr/share}:$INSTALL_TDE/share
will continually add $INSTALL_TDE/share if tdebase is rebuilt and upgraded. May not be a common procedure for a release build, but this build script is usable for development builds and rebuilding and upgrading tdebase is not uncommon.
2] there can be duplication in the Slackware PKG_CONFIG_PATH caused by the pkgconfig.sh script and removing duplicated paths is an option in BUILD-TDE.sh
include /etc/ld.so.conf.d/*.conf
is included in the installation of /etc/ld.so.conf as part of the 'etc' package, and who would run a system without that package installed, so it seems unnecessary to check for its existence.I'll implement the three listed changes and have a more detailed look at the rest of the reversible_install.patch but don't think I'll be making other changes.
Your duplication anxiety seems to be based upon a misconception regarding the workings of the shell. See, nothing done in a script can affect the parent shell's envronment. No way, no how. The "installpkg" script is run, not sourced, therefore for those "export" statements to have any effect outside of it, you have to launch a new login shell, and said shell will source the script containing the statement, exactly once. The number of times you run "installpkg" for a package, be it rebuilt or unchanged, changes exactly nothing at all. In view of the above, if a profile script does any "duplication checks" for things that only it could add, it is purely a waste of code and a breeding ground for bugs. Which is why nothing else in the whole of Slackware ever does it.
The check for "include /etc/ld.so.conf.d/*.conf" is done because Slackware 15 is not the first Slackware version to see the light of day, yet the first to include that statement out of the box. Slackware 14.2 does not have it by default so it needs be added if absent.
As it is now, the tqt3's package install script writes its libs' path right into /etc/ld.so.conf, and tdebase's one writes its PATH and MANPATH changes right into /etc/profile. Both of those modifications need then be reversed manually after the packages' uninstallation, or before their reinstallation with a different install path. Also, given that a number of TDE's binaries still clash with KDE's analogous ones, TDE's putting itself in the PATH before everything else causes TDE's binaries to be started instead of KDE's even if KDE is the desktop environment used at the moment.
For the above reasons, I propose the following changes:
A patch implementing those changes is attached: reversible_install.patch.txt