update-linux 3.1.0__tar.gz → 3.2.0__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.1.0
3
+ Version: 3.2.0
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.1.0'
12
+ VERSION = '3.2.0'
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
 
@@ -587,7 +598,7 @@ class UpdatePluginFedora:
587
598
 
588
599
  self.app.info( host, 'Starting Update' )
589
600
 
590
- cmd = ['dnf', '-vy', 'update', '--refresh']
601
+ cmd = ['dnf', '-y', 'update', '--refresh']
591
602
  rc, stdout = self.app.runAndLog( host, cmd )
592
603
 
593
604
  self.app.writeLines( update_log_name, stdout )
@@ -662,7 +673,15 @@ class UpdatePluginFedora:
662
673
 
663
674
  def releaseInfo( self, host ):
664
675
  cmd = ['cat', '/etc/system-release-cpe']
665
- 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
+
666
685
  cpe_parts = stdout[0].strip().split( ':' )
667
686
  if len(cpe_parts) >= 4:
668
687
  return int( cpe_parts[4] )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: update-linux
3
- Version: 3.1.0
3
+ Version: 3.2.0
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