Issue #1831
openFix non-idempotent setup.sh
0%
Description
The setup.sh scripts in user-scripts aren't idempotent; they install to a different path depending on whether they were previously installed. Attached is a patch that fixes this.
Files
Updated by Jeremy Rand over 6 years ago
- Assignee set to Wolfgang Wiedmeyer
Hi Wolfgang, any chance you could review this patch? Thanks.
Updated by Kurtis Hanna about 6 years ago
I don't quite understand this issue. Can you explain it a bit more Jeremy?
Updated by Jeremy Rand about 6 years ago
Kurtis Hanna wrote:
I don't quite understand this issue. Can you explain it a bit more Jeremy?
An idempotent script is defined as a script that does the same thing when run twice as when run once. For example, if you run an installer twice, the 2nd time you run it shouldn't change anything since it's already installed. All installer scripts should be idempotent.
Unfortunately, the install scripts in user-scripts are not idempotent. The first time you install it, it installs to a different directory than the second time you install it. This can cause user confusion, e.g. if the user runs the installer, and then tries to later install a newer version, the older and newer versions will both be simultaneously installed (and the path that the user is accustomed to using will still be running the old version).
This patch fixes the issue by making sure that the first installation always installs to the same directory as any subsequent installations.
Updated by Kurtis Hanna about 6 years ago
- Target version changed from Replicant 6.0 to Replicant 6.0 0005
Updated by Fil Bergamo almost 6 years ago
- Target version deleted (
Replicant 6.0 0005)
This issue does not involve the Replicant tree, but the user-contributed scripts.
As such, it should not be considered part of the roadmap to next Replicant release.
Removed target version.
Updated by _I3^ RELATIVISM over 3 years ago
- Type of work Any programming languages (scripts, C, etc), Unknown added