Skip to content
This repository was archived by the owner on Oct 4, 2023. It is now read-only.

Remove use of apt#49

Open
tssva wants to merge 2 commits into
wimpysworld:masterfrom
tssva:remove_apt
Open

Remove use of apt#49
tssva wants to merge 2 commits into
wimpysworld:masterfrom
tssva:remove_apt

Conversation

@tssva

@tssva tssva commented Aug 10, 2020

Copy link
Copy Markdown
Contributor

Use of apt in scripts is discouraged since it is meant as a user facing tool and is subject to interface change. apt-get and apt are currently used at different points in desktopify. This PR changes all instances of apt install to apt-get install.

In addition the check for already installed packages is changed to use dpkg which besides eliminating the discouraged apt also provides the advantage of returning the status of whether the packages are installed via the exit code so grepping output is not needed. I also reversed the order of the checks so dpkg is only run if the force option is not set.

root added 2 commits August 10, 2020 06:54
Use of apt-get in scripts is preferred because the interface
is less likely to change.
Use of apt in scripts is discouraged and using dpkg removes the
need to grep the output since the exit code indicates whether the
package is installed. Also reversed the order of the conditions so
the package check is skipped if force is enabled.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants