update-linux 3.0.7__tar.gz → 3.1.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: update-linux
3
- Version: 3.0.7
3
+ Version: 3.1.1
4
4
  Summary: Command to automate the routine updating of packages and system upgrading for Unix systems.
5
5
  Author-email: Barry Scott <barry@barrys-emacs.org>
6
6
  License: Apache-2.0
@@ -9,7 +9,7 @@ authors = [
9
9
  ]
10
10
  description = "Command to automate the routine updating of packages and system upgrading for Unix systems."
11
11
  readme = "README.md"
12
- requires-python = ">=3.10"
12
+ requires-python = ">= 3.10"
13
13
  license = {text = "Apache-2.0"}
14
14
  keywords = [ "development" ]
15
15
  classifiers = [
@@ -9,7 +9,7 @@ import tempfile
9
9
  import json
10
10
  from config_path import ConfigPath # type: ignore
11
11
 
12
- VERSION = '3.0.7'
12
+ VERSION = '3.1.1'
13
13
 
14
14
  default_json_config_template = u'''{
15
15
  "group":
@@ -418,11 +418,22 @@ For help:
418
418
  def reboot( self, host, cmd, wait_limit=600 ):
419
419
  while True:
420
420
  rc, stdout = self.runAndLog( host, cmd )
421
- if len(stdout) == 0:
421
+ # filter out warning/info messages before checking for success
422
+ filtered_stdout = []
423
+ for line in stdout:
424
+ if line.startswith(
425
+ ('Warning: '
426
+ ,'Offending key for '
427
+ ,'Matching host key in ')):
428
+ continue
429
+ filtered_stdout.append(line)
430
+
431
+ if len(filtered_stdout) == 0:
422
432
  # no messages assume ok
423
433
  break
424
434
 
425
- if stdout[0] == ('Connection to %s closed by remote host.\r\n' % (host,)):
435
+ if( filtered_stdout[0].startswith('Connection to ')
436
+ and filtered_stdout[0].endswith('closed by remote host.\r\n') ):
426
437
  # this is success
427
438
  break
428
439
 
@@ -640,8 +651,6 @@ class UpdatePluginFedora:
640
651
  self.app.info( host, 'Already running release %d' % (current_release,) )
641
652
  return
642
653
 
643
- return
644
-
645
654
  self.app.info( host, 'Currently release %d' % (current_release,) )
646
655
 
647
656
  # only update by one release at a time
@@ -664,7 +673,15 @@ class UpdatePluginFedora:
664
673
 
665
674
  def releaseInfo( self, host ):
666
675
  cmd = ['cat', '/etc/system-release-cpe']
667
- rc, stdout = self.app.runAndLog( host, cmd, log=False )
676
+ # first boot after a system upgrade seen to block this access
677
+ log = False
678
+ for _ in range(10):
679
+ rc, stdout = self.app.runAndLog( host, cmd, log=log )
680
+ if 'System is booting up' not in stdout[0]:
681
+ break
682
+ log = True
683
+ time.sleep(5)
684
+
668
685
  cpe_parts = stdout[0].strip().split( ':' )
669
686
  if len(cpe_parts) >= 4:
670
687
  return int( cpe_parts[4] )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: update-linux
3
- Version: 3.0.7
3
+ Version: 3.1.1
4
4
  Summary: Command to automate the routine updating of packages and system upgrading for Unix systems.
5
5
  Author-email: Barry Scott <barry@barrys-emacs.org>
6
6
  License: Apache-2.0
File without changes
File without changes
File without changes