Project

General

Profile

Issue #1831

Fix non-idempotent setup.sh

Added by Jeremy Rand over 1 year ago. Updated 5 months ago.

Status:
New
Priority:
Normal
Category:
Wi-Fi
Target version:
-
Start date:
09/10/2017
Due date:
% Done:

0%

Resolution:
Device:

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.

6.0-repeat-setup.patch View (1.1 KB) Jeremy Rand, 09/10/2017 08:05 AM

History

#1 Updated by Jeremy Rand over 1 year ago

  • Assignee set to Wolfgang Wiedmeyer

Hi Wolfgang, any chance you could review this patch? Thanks.

#2 Updated by Kurtis Hanna 9 months ago

I don't quite understand this issue. Can you explain it a bit more Jeremy?

#3 Updated by Jeremy Rand 9 months 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.

#4 Updated by Kurtis Hanna 9 months ago

  • Target version changed from Replicant 6.0 to Replicant 6.0 0005

#5 Updated by Fil Bergamo 5 months 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.

Also available in: Atom PDF