This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "IPFire 2.x development tree".
The branch, next has been updated via 011204d96366bd8ca9e46e63a9edcb3a064a495f (commit) from 413149f80dba07373b0a52ba39259ae656b9a65f (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit 011204d96366bd8ca9e46e63a9edcb3a064a495f Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Jul 20 12:06:11 2018 +0000
fireinfo: Import latest patches
Signed-off-by: Michael Tremer michael.tremer@ipfire.org
-----------------------------------------------------------------------
Summary of changes: lfs/fireinfo | 3 ++ ...-when-proc-cpuinfo-doesn-t-have-any-infor.patch | 34 ++++++++++++++++++++++ ...Ignore-any-systems-with-ID-Default-string.patch | 25 ++++++++++++++++ 3 files changed, 62 insertions(+) create mode 100644 src/patches/fireinfo-Don-t-crash-when-proc-cpuinfo-doesn-t-have-any-infor.patch create mode 100644 src/patches/fireinfo-Ignore-any-systems-with-ID-Default-string.patch
Difference in files: diff --git a/lfs/fireinfo b/lfs/fireinfo index dec588705..784685029 100644 --- a/lfs/fireinfo +++ b/lfs/fireinfo @@ -71,6 +71,9 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) @$(PREBUILD) @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
+ cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/fireinfo-Don-t-crash-when-proc-cpuinfo-doesn-t-have-any-infor.patch + cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/fireinfo-Ignore-any-systems-with-ID-Default-string.patch + cd $(DIR_APP) && [ -x "configure" ] || sh ./autogen.sh cd $(DIR_APP) && ./configure --prefix=/usr cd $(DIR_APP) && make $(MAKETUNING) diff --git a/src/patches/fireinfo-Don-t-crash-when-proc-cpuinfo-doesn-t-have-any-infor.patch b/src/patches/fireinfo-Don-t-crash-when-proc-cpuinfo-doesn-t-have-any-infor.patch new file mode 100644 index 000000000..a99c618e9 --- /dev/null +++ b/src/patches/fireinfo-Don-t-crash-when-proc-cpuinfo-doesn-t-have-any-infor.patch @@ -0,0 +1,34 @@ +From e2b6025dea547bf8de4bd2b8056f2a8227c635f5 Mon Sep 17 00:00:00 2001 +From: Michael Tremer michael.tremer@ipfire.org +Date: Wed, 13 Jun 2018 20:56:41 +0200 +Subject: [PATCH 1/2] Don't crash when /proc/cpuinfo doesn't have any + information + +Signed-off-by: Michael Tremer michael.tremer@ipfire.org +--- + src/fireinfo/cpu.py | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) + +diff --git a/src/fireinfo/cpu.py b/src/fireinfo/cpu.py +index 541575a..dc76caf 100644 +--- a/src/fireinfo/cpu.py ++++ b/src/fireinfo/cpu.py +@@ -108,10 +108,11 @@ class CPU(object): + """ + Return the model string of this CPU. + """ +- try: +- return self.__cpuinfo["model_name"] +- except KeyError: +- return self.__cpuinfo["Processor"] ++ for key in ("model_name", "Processor"): ++ try: ++ return self.__cpuinfo[key] ++ except KeyError: ++ pass + + @property + def vendor(self): +-- +2.12.2 + diff --git a/src/patches/fireinfo-Ignore-any-systems-with-ID-Default-string.patch b/src/patches/fireinfo-Ignore-any-systems-with-ID-Default-string.patch new file mode 100644 index 000000000..ace5d0133 --- /dev/null +++ b/src/patches/fireinfo-Ignore-any-systems-with-ID-Default-string.patch @@ -0,0 +1,25 @@ +From d1f6789178e141664895332af79dbe7aa9e5ab68 Mon Sep 17 00:00:00 2001 +From: Michael Tremer michael.tremer@ipfire.org +Date: Wed, 13 Jun 2018 20:58:42 +0200 +Subject: [PATCH 2/2] Ignore any systems with ID "Default string" + +Signed-off-by: Michael Tremer michael.tremer@ipfire.org +--- + src/fireinfo/system.py | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/fireinfo/system.py b/src/fireinfo/system.py +index e3295af..73c3882 100644 +--- a/src/fireinfo/system.py ++++ b/src/fireinfo/system.py +@@ -42,6 +42,7 @@ INVALID_ID_STRINGS = ( + "N/A", "n/a", + "12345", "54321", "202020", + "Chassis", "chassis", ++ "Default string", + "EVAL", + "Not Applicable", + "None", "empty", +-- +2.12.2 +
hooks/post-receive -- IPFire 2.x development tree