Comments (6)
To be honest I don't see how this would improve things. It looks that in your case there is something wrong with /var/lib/alternatives (it is not readable or maybe it does not exist at all). So repeating command line arguments would not help.
from chkconfig.
What you do not see is when doing package/rmp installs, I see a bunch of "admindir /var/lib/alternatives invalid" messages. I have no idea WHAT message is invalid, let alone if it is a valid message or not.
If the message is from a remove and nothing to remove, there is no reason to open a bug report.
If the message is install, then I know to open a bug report. As a system QA tester I should not have to open each invalid rpm to read post install scripts to guess which call to admindir caused the problem.
from chkconfig.
Well, it should not matter in your case, how the alternatives were called. There is something wrong with alternatives db. I think we should extend the message in a way
admindir /var/lib/alternatives invalid: "Permission denied|Does not exist|..."
from chkconfig.
I understand what you are saying. But you are missing the point I am trying to make. A rpm has a bunch of postscript admin commands which have one or more failures. There is no way to identify which had a failure. Example: take the gcc-5.4.0-5.mga6.src.rpm for example:
postinstall scriptlet (using /bin/sh):
/usr/sbin/update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5.4.0 300500
[ -e /usr/bin/gcc ] || /usr/sbin/update-alternatives --auto gcc
/usr/sbin/update-alternatives --install /usr/bin/gcc-ar gcc-ar /usr/bin/gcc-ar-5.4.0 300500
[ -e /usr/bin/gcc-ar ] || /usr/sbin/update-alternatives --auto gcc-ar
/usr/sbin/update-alternatives --install /usr/bin/gcc-nm gcc-nm /usr/bin/gcc-nm-5.4.0 300500
[ -e /usr/bin/gcc-nm ] || /usr/sbin/update-alternatives --auto gcc-nm
/usr/sbin/update-alternatives --install /usr/bin/gcc-ranlib gcc-ranlib /usr/bin/gcc-ranlib-5.4.0 300500
[ -e /usr/bin/gcc-ranlib ] || /usr/sbin/update-alternatives --auto gcc-ranlib
postuninstall scriptlet (using /bin/sh):
if [ ! -f /usr/bin/gcc-5.4.0 ]; then
/usr/sbin/update-alternatives --remove gcc /usr/bin/gcc-5.4.0
fi
if [ ! -f /usr/bin/gcc-ar-5.4.0 ]; then
/usr/sbin/update-alternatives --remove gcc-ar /usr/bin/gcc-ar-5.4.0
fi
if [ ! -f /usr/bin/gcc-nm-5.4.0 ]; then
/usr/sbin/update-alternatives --remove gcc-nm /usr/bin/gcc-nm-5.4.0
fi
if [ ! -f /usr/bin/gcc-ranlib-5.4.0 ]; then
/usr/sbin/update-alternatives --remove gcc-ranlib /usr/bin/gcc-ranlib-5.4.0
fi
If two or three fail during package install/update I have no idea which ones failed.
from chkconfig.
Hmmm, I see. My problem here is that I can't image a situation where this would fail only in certain cases. If there is something wrong with /var/lib/alternatives then basically every call of alternatives will fail, so a specific command should not matter.
Honestly, change you are requesting is totally simple, but my twisted developer brain still says that it does not make sense. If you give me a reproducer where one call will succeed and the second one will fail, I will do that. Otherwise, I am already writing a patch that will print "admindir /var/lib/alternatives is not writable" :-)
from chkconfig.
Glad to hear you are a developer. Now put your package manager hat on, and a system tester gets one or more errors installing some package. As a developer/package owner would it not make the pkg manager's life easier if the bug reporter put which update-alternatives failed.
Consider this, update-alternatives --remove xxx will return a failure and as tester, I would not bother reporting an error if xxx did not exist.
from chkconfig.
Related Issues (20)
- Weird behavior when `--add-slave` and `--keep-foreign` used together for active alternative HOT 2
- [packit] Propose downstream failed for release 1.23
- alternatives.8 manual inconsistency for "--list" HOT 2
- chkconfig does not reload systemd
- RHEL10 - remove dependency on `beakerlib`
- `update-alternatives --install` fails when changing the follower name
- DIR handle is not closed after use HOT 3
- Do not hardcode systemd dir HOT 2
- mem leak in alternatives HOT 2
- please migrate to the new Fedora translation platform HOT 5
- Make alternatives state dir configurable (or move it from /var to /etc) HOT 3
- Remove everything related to zanata
- while add a invalid service in the directory of /etc/chkconfig.d, execute chkconfig will coredump HOT 3
- while executing chkconfig --override xxx,if xxx does not exist in the dir of /etc/init.d/ and /etc/xinet.d ,there is no notice? HOT 1
- Translation sync broken on Weblate HOT 1
- /usr/sbin/alternatives needs to support more inclusive terminology HOT 1
- An occasional high-risk problem HOT 2
- config files for alternatives? HOT 6
- "Could not merge the repository" on Fedora Weblate HOT 1
- Add '*' legend to alternatives --config ?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chkconfig.