🐛 Update/fix for Debian 13 trixie
This commit is contained in:
		
							parent
							
								
									13eade8841
								
							
						
					
					
						commit
						dcabc8576e
					
				
					 2 changed files with 5 additions and 1 deletions
				
			
		| 
						 | 
					@ -70,7 +70,7 @@ def running_kernel_version():
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if re.search(r'Debian', proc_version_):
 | 
					    if re.search(r'Debian', proc_version_):
 | 
				
			||||||
        # Remove gcc version first
 | 
					        # Remove gcc version first
 | 
				
			||||||
        proc_version_ = re.sub(r'\(gcc.*?\)', '', proc_version_)
 | 
					        proc_version_ = re.sub(r'\(([^\(]*-gnu-)?gcc.*?\)', '', proc_version_)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        # Then look for the Debian kernel version
 | 
					        # Then look for the Debian kernel version
 | 
				
			||||||
        m = re.search(r'((?<=Debian )(\S+)|(?<=PVE )(\S+))', proc_version_)
 | 
					        m = re.search(r'((?<=Debian )(\S+)|(?<=PVE )(\S+))', proc_version_)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -76,6 +76,10 @@ class RunningKernelVersionTestCase(unittest.TestCase):
 | 
				
			||||||
        self.assertEqual(check_kernel.running_kernel_version(),
 | 
					        self.assertEqual(check_kernel.running_kernel_version(),
 | 
				
			||||||
                         Version('5.10.46-4'))
 | 
					                         Version('5.10.46-4'))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        patch_object(check_kernel, 'proc_version', return_value='Linux version 6.12.41+deb13-amd64 (debian-kernel@lists.debian.org) (x86_64-linux-gnu-gcc-14 (Debian 14.2.0-19) 14.2.0, GNU ld (GNU Binutils for Debian) 2.44) #1 SMP PREEMPT_DYNAMIC Debian 6.12.41-1 (2025-08-12)')
 | 
				
			||||||
 | 
					        self.assertEqual(check_kernel.running_kernel_version(),
 | 
				
			||||||
 | 
					                         Version('6.12.41-1'))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def testDebianProxmox(self):
 | 
					    def testDebianProxmox(self):
 | 
				
			||||||
        patch_object(check_kernel, 'proc_version', return_value='Linux version 5.4.162-1-pve (build@proxmox) (gcc version 8.3.0 (Debian 8.3.0-6)) #1 SMP PVE 5.4.162-2 (Thu, 20 Jan 2022 16:38:53 +0100)')
 | 
					        patch_object(check_kernel, 'proc_version', return_value='Linux version 5.4.162-1-pve (build@proxmox) (gcc version 8.3.0 (Debian 8.3.0-6)) #1 SMP PVE 5.4.162-2 (Thu, 20 Jan 2022 16:38:53 +0100)')
 | 
				
			||||||
        self.assertEqual(check_kernel.running_kernel_version(),
 | 
					        self.assertEqual(check_kernel.running_kernel_version(),
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue