DietPi-Globals | G_CHECK_URL makes Error_NoConnection_NoInstall obsolete

Created on 30 Dec 2017  ·  6Comments  ·  Source: MichaIng/DietPi

Just found this, as I wanted to fix uninstallations for a similar reasons.

G_CHECK_URL now terminates whole dietpi-software, thus on the one hand, Error_NoConnection_NoInstall is not needed anymore, on the other hand, I found at least one case, where, based on device, the check gets an empty string, thus has to fail, before other devices are handled: https://github.com/Fourdee/DietPi/blob/testing/dietpi/dietpi-software#L6768

The check has to move into device/distro check statement now. I will fix in this case, but I just checked for dpkg -i installations so far.

Enhancement Priority Low v6.0

All 6 comments

Ah sorry, I was mistaken, the URL check in that case do occur after all supported hw architectures were checked.

Still, we should go through the installations and at least remove the Error_NoConnection_NoInstall by times 😉. I adjust issue name to reflect this task as part of dietpi-globals.

Ok, so the reason of leaving Error_NoConnection_NoInstall in:

  • Allows us to add the software title/name to the error export G_ERROR_HANDLER_ONERROR_USERMSG="Unable to Install ${aSOFTWARE_WHIP_NAME[$INSTALLING_INDEX]}: ${aSOFTWARE_WHIP_DESC[$INSTALLING_INDEX]}\n\n$INSTALL_URL_ADDRESS is offline and/or unreachable."

🈯️ https://github.com/Fourdee/DietPi/commit/6826ec1938e23e8a904ac2430f602207114b6e3a I'll remove Error_NoConnection_NoInstall all entries 1st (anything to reduce the line count in dietpi-software lol :)), then go from there.

@Fourdee
At the moment in case of failure, the script would end directly with G_CHECK_URL and not going further into the if-then-else statement, if I'm not wrong?

But yes, we could add the G_ERROR_HANDLER_ONERROR_USERMSG at the beginning of installation+configuration+purging? Or adjust the title to reflect the exact software that failed.

@MichaIng

At the moment in case of failure, the script would end directly with G_CHECK_URL and not going further into the if-then-else statement, if I'm not wrong?

Yep, correct 👍

But yes, we could add the G_ERROR_HANDLER_ONERROR_USERMSG at the beginning of installation+configuration+purging? Or adjust the title to reflect the exact software that failed.

Yep, was thinking about this aswell, a small function would be ideal that we can call, prior to installing each item. The function would set G_ERROR_HANDLER_ONERROR_USERMSG to contain the software title.
I'll take a look.

  • add the G_ERROR_HANDLER_ONERROR_USERMSG at the beginning of installation+configuration+purging?
  • 🈯️ installation
  • 🈯️ Configuration (will need to add, another Banner_Configuration() )
  • 🈯️ Purging
  • 🈯️ Removal of AGX_ERROR_HANDLED (no longer required)

@MichaIng

Believe this is now resolved, will mark as closed. Please reopen if required.

@Fourdee
Great work, looks well cleaned up.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

k-plan picture k-plan  ·  3Comments

k-plan picture k-plan  ·  3Comments

pgferr picture pgferr  ·  3Comments

Fourdee picture Fourdee  ·  3Comments

Fourdee picture Fourdee  ·  3Comments