snapcraft file refinement
This commit is contained in:
parent
93e7da4e4a
commit
83796c458c
|
@ -1,6 +1,6 @@
|
|||
name: auto-cpufreq
|
||||
base: core18
|
||||
version: '1.0' # just for humans, typically '1.2+git' or '1.3.2'
|
||||
version: '1.0'
|
||||
summary: Automatic CPU speed & power optimizer for Linux
|
||||
description: |
|
||||
Automatic CPU speed & power optimizer for Linux based on active
|
||||
|
@ -8,12 +8,11 @@ description: |
|
|||
Ultimately allowing you to improve battery life without making
|
||||
any compromises.
|
||||
|
||||
grade: devel # must be 'stable' to release into candidate/stable channels
|
||||
confinement: devmode # use 'strict' once you have the right plugs and slots
|
||||
grade: stable
|
||||
confinement: classic
|
||||
|
||||
parts:
|
||||
auto-cpufreq:
|
||||
# See 'snapcraft plugins'
|
||||
plugin: python
|
||||
python-version: python3
|
||||
source: .
|
||||
|
@ -37,5 +36,4 @@ apps:
|
|||
LC_ALL: C.UTF-8
|
||||
LANG: C.UTF-8
|
||||
PKG_MARKER: SNAP
|
||||
daemon: simple
|
||||
|
||||
daemon: simple
|
|
@ -321,7 +321,7 @@ def sysinfo():
|
|||
|
||||
# get distro information in snap env.
|
||||
if os.getenv("PKG_MARKER") == "SNAP":
|
||||
searchfile = open("/var/lib/snapd/hostfs/etc/os-release", "r")
|
||||
searchfile = open("/usr/lib/os-release", "r")
|
||||
for line in searchfile:
|
||||
if line.startswith('NAME='):
|
||||
distro = line[5:line.find('$')].strip("\"")
|
||||
|
|
Loading…
Reference in New Issue