summary refs log tree commit diff
path: root/pkgs/tools/system/auto-cpufreq/fix-version-output.patch
blob: 69293a4c3dc26d7e6e81d3e4801ad07188a35c07 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
--- a/auto_cpufreq/core.py
+++ b/auto_cpufreq/core.py
@@ -68,32 +68,8 @@ dist_name = distro.id()
 
 # display running version of auto-cpufreq
 def app_version():
-
-    print("auto-cpufreq version:")
-
-    # snap package
-    if os.getenv("PKG_MARKER") == "SNAP":
-        print(getoutput("echo Snap: $SNAP_VERSION"))
-    # aur package
-    elif dist_name in ["arch", "manjaro", "garuda"]:
-        aur_pkg_check = call("pacman -Qs auto-cpufreq > /dev/null", shell=True)
-        if aur_pkg_check == 1:
-            print(
-                "Git commit:",
-                check_output(["git", "describe", "--always"]).strip().decode(),
-            )
-        else:
-            print(getoutput("pacman -Qi auto-cpufreq | grep Version"))
-    else:
-        # source code (auto-cpufreq-installer)
-        try:
-            print(
-                "Git commit:",
-                check_output(["git", "describe", "--always"]).strip().decode(),
-            )
-        except Exception as e:
-            print(repr(e))
-            pass
+    print("auto-cpufreq version: @version@")
+    print("Git commit: v@version@")
 
 
 def app_res_use():