Skip to main content
15 events
when toggle format what by license comment
Apr 11, 2024 at 10:05 vote accept MathematicalOrchid
Apr 15, 2021 at 1:28 answer added Charles Duffy timeline score: 27
Aug 19, 2019 at 12:39 comment added Kusalananda So make a test RPM with the script and use set -x in it for testing. Also, you may want to ask a new question about rolling that RPM (with exactly what goes wrong and how it goes wrong). This seems to be your actual issue.
Aug 19, 2019 at 12:37 comment added MathematicalOrchid @Kusalananda If we run the script directly, it works perfectly. But if we install the RPM, something goes wrong somewhere.
Aug 19, 2019 at 12:17 comment added Kusalananda Um... You would have to rebuild the RPM once you've fixed it, so you might as well unpack it and and fix it properly from the start. You are likely to want to iterate over this process until the issue is solved. This is assuming that you are the maintainer of this RPM package. If you aren't, you could file a bug report to the maintainer.
Aug 19, 2019 at 12:15 comment added MathematicalOrchid @Kusalananda It's actually a script that gets executed when an RPM is installed. I'd rather not have to rebuild the RPM to debug why it isn't working.
Aug 19, 2019 at 12:10 comment added Kusalananda If the script is inside a compressed archive, how are you running the script?
Aug 19, 2019 at 12:04 comment added Arkadiusz Drabczyk @Kusalananda: ok, I got. Thanks for explanation.
Aug 19, 2019 at 12:01 comment added Kusalananda @ArkadiuszDrabczyk In bash 5.0.7, it would trace the call to the shell script, but tracing would not be turned on inside the script itself, i.e. the shell option would not be inherited by the script.
Aug 19, 2019 at 12:00 comment added Arkadiusz Drabczyk @Kusalananda: The example I posted works for me and if I understand correctly ./script.sh is a child process, right?
Aug 19, 2019 at 11:56 comment added Kusalananda @ArkadiuszDrabczyk The trace setting is not inherited by child processes. If it (and other shell settings) was, it would make writing scripts really tricky, as you would have to either reset options in every script, or write alternative code paths for each eventuality.
Aug 19, 2019 at 11:53 history edited MathematicalOrchid CC BY-SA 4.0
added 318 characters in body
Aug 19, 2019 at 11:52 comment added Arkadiusz Drabczyk Something like: set -x; ./script.sh ; set +x
Aug 19, 2019 at 11:49 comment added Arkadiusz Drabczyk Can you simply set set -x in the terminal and run the script?
Aug 19, 2019 at 11:46 history asked MathematicalOrchid CC BY-SA 4.0