Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite install script #13

Closed
arcticicestudio opened this issue Oct 28, 2017 · 0 comments
Closed

Rewrite install script #13

arcticicestudio opened this issue Oct 28, 2017 · 0 comments
Labels
Hacktoberfest This repository participates in the Hacktoberfest type-feature
Milestone

Comments

@arcticicestudio
Copy link
Contributor

arcticicestudio commented Oct 28, 2017

Fixes #12
Fixes #6
Fixes #3

Prehistory

The profile script is currently not usable due to a undocumented behavior of dconf resulting in whether overriden profiles or error messages. The logic of the script worked previously, but the dconf or gsettings API changed breaking the script (forks of terminal.sexy) which's logic is used by almost all GNOME Terminal theme projects.

I've reported #789056 to the official GNOME bug tracker for the dconf component which got closed with the following reason:

This is simply an error in your script: you're using dconf to read keys that have never been written to. You need to use the gsettings tool instead, which takes into account the schema so it can return the default value in that case.

I tried to find the documentation where this behavior of dconf is described, but it seems like this knowledge is only documented in the code itself or internal developer documents.

Description

Since the script was never really optimized I decided to rewrite it to fix issues like #12 and #3 and implement the following additional features:

  • Profile Handling - the script should be able to detect available profiles and
    • clone the default profile if no specific profile has been specified - The script must be able to get the UUID of the default profile and clone it
    • install the theme for a specific profile - the user should be able to pass the name of the profile the theme should be installed to
    • handle already existing Nord profiles and compare the version - if the Nord GNOME Terminal theme Nord profile already exists and the script version less than the installed version the user should be able to confirm whether to override the theme of abort the installation, otherwise the profile should
      • be updated if the script version is greater than the installed version
      • be reinstalled if the installed version is equal to the script version
  • Log Level - the script should provide a option to allow the user to define the log level where the available levels should be
    • 0 - ERROR
    • 1 - WARNING
    • 2 - SUCCESS (default)
    • 3 - INFO
    • 4 - DEBUG
  • Dependency Management - the script should be able to validate all required dependencies to ensure the script can run on the executive environment which includes
    • dconf (dconf)
    • expr (coreutils)
    • gsettings (glib2)
    • uuidgen (util-linux)
@arcticicestudio arcticicestudio added type-feature Hacktoberfest This repository participates in the Hacktoberfest labels Oct 28, 2017
@arcticicestudio arcticicestudio added this to the 0.2.0 milestone Oct 28, 2017
@arcticicestudio arcticicestudio self-assigned this Oct 28, 2017
arcticicestudio added a commit that referenced this issue Oct 28, 2017
[Prehistory]

The profile script was no more usable due to a undocumented behavior
of "dconf resulting in whether overriden profiles or error messages.
The logic of the script worked previously, but the "dconf" or
"gsettings" API changed breaking the script (forks of "terminal.sexy"(1))
which's logic is used by almost all GNOME Terminal theme projects.

I've reported #789056 to the official GNOME bug tracker for the "dconf
component which got closed with the following reason:

> This is simply an error in your script: you're using dconf to read keys
that have never been written to. You need to use the gsettings tool
instead, which takes into account the schema so it can return the default
value in that case.

I tried to find the documentation where this behavior of "dconf" is
described, but it seems like this knowledge is only documented in the
code itself or internal developer documents.

[Description]

Since the script was never really optimized I decided to rewrite it to
fix issues like GH-12 and GH-3 and implement the following additional
features:

  * Profile Handling - the script is now able to detect available
  profiles and
    * clone the default profile if no specific profile has been
    specified - The script is able to get the UUID of the "default"
    profile and clone it
    * install the theme for a specific profile - the user can pass the
    name of the profile the theme should be installed to
    * handle already existing "Nord" profiles via version comparison -
    if the "Nord" profile already exists and the script version is less
    than the installed version the user must confirm whether to override
    the theme of abort the installation, otherwise the profile will be
      * updated if the script version is greater than the installed
        version
      * reinstalled if the installed version is equal to the script
        version
  * Log Level - the script now provides a option to allow the user to
    define the log level. Available log levels are
      * 0 - ERROR
      * 1 - WARNING
      * 2 - SUCCESS (default)
      * 3 - INFO
      * 4 - DEBUG
  * Dependency Management -  the script is able to validate all required
    dependencies to ensure the script can run on the executive
    environment which includes
    * dconf (dconf)
    * expr (coreutils)
    * gsettings (glib2)
    * uuidgen (util-linux)

References:
  (1) https://terminal.sexy
  (2) https://bugzilla.gnome.org/show_bug.cgi?id=789056

Fixes GH-12 and GH-3

GH-13
arcticicestudio added a commit that referenced this issue Oct 28, 2017
[Prehistory]

The profile script was no more usable due to a undocumented behavior
of "dconf resulting in whether overriden profiles or error messages.
The logic of the script worked previously, but the "dconf" or
"gsettings" API changed breaking the script (forks of "terminal.sexy"(1))
which's logic is used by almost all GNOME Terminal theme projects.

I've reported #789056 to the official GNOME bug tracker for the "dconf
component which got closed with the following reason:

> This is simply an error in your script: you're using dconf to read keys
that have never been written to. You need to use the gsettings tool
instead, which takes into account the schema so it can return the default
value in that case.

I tried to find the documentation where this behavior of "dconf" is
described, but it seems like this knowledge is only documented in the
code itself or internal developer documents.

[Description]

Since the script was never really optimized I decided to rewrite it to
fix issues like GH-12 and GH-3 and implement the following additional
features:

  * Profile Handling - the script is now able to detect available
  profiles and
    * clone the default profile if no specific profile has been
    specified - The script is able to get the UUID of the "default"
    profile and clone it
    * install the theme for a specific profile - the user can pass the
    name of the profile the theme should be installed to
    * handle already existing "Nord" profiles via version comparison -
    if the "Nord" profile already exists and the script version is less
    than the installed version the user must confirm whether to override
    the theme of abort the installation, otherwise the profile will be
      * updated if the script version is greater than the installed
        version
      * reinstalled if the installed version is equal to the script
        version
  * Log Level - the script now provides a option to allow the user to
    define the log level. Available log levels are
      * 0 - ERROR
      * 1 - WARNING
      * 2 - SUCCESS (default)
      * 3 - INFO
      * 4 - DEBUG
  * Dependency Management -  the script is able to validate all required
    dependencies to ensure the script can run on the executive
    environment which includes
    * dconf (dconf)
    * expr (coreutils)
    * gsettings (glib2)
    * uuidgen (util-linux)

References:
  (1) https://terminal.sexy
  (2) https://bugzilla.gnome.org/show_bug.cgi?id=789056

Fixes GH-12 and GH-3

GH-13
arcticicestudio added a commit that referenced this issue Oct 30, 2017
@arcticicestudio arcticicestudio removed their assignment Oct 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Hacktoberfest This repository participates in the Hacktoberfest type-feature
Projects
None yet
Development

No branches or pull requests

1 participant