vappman 2.1.1__py3-none-any.whl → 2.1.2__py3-none-any.whl

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.
vappman/AppmanVars.py CHANGED
@@ -10,7 +10,7 @@ class AppLocation(NamedTuple):
10
10
  usr_path: Path # Path to user storage dir or None
11
11
 
12
12
  class AppmanVars:
13
- """ Encapuslates the places / functions we need to know
13
+ """ Encapsulates the places / functions we need to know
14
14
  about to observe, manage am/appman. """
15
15
  def __init__(self):
16
16
  self.system_app_dir = Path("/opt")
vappman/main.py CHANGED
@@ -481,9 +481,9 @@ class Vappman(Prerequisites):
481
481
  1st word.
482
482
  """
483
483
  def parse_app_list(lines):
484
- nonlocal current_in_user_mode
484
+ nonlocal switch_to_system_mode
485
485
  installs, installs_by_appname = {}, {}
486
- local = False
486
+ local = True if self.has_appman else False
487
487
  has_db_column = False
488
488
 
489
489
  # Process line by line
@@ -492,7 +492,7 @@ class Vappman(Prerequisites):
492
492
  for line in lines:
493
493
  line = line.strip()
494
494
  # Determine to reset location (Global vs Local)
495
- if 'HAVE INSTALLED' in line:
495
+ if not self.has_appman and 'HAVE INSTALLED' in line:
496
496
  local = bool('LOCAL' in line)
497
497
 
498
498
  # Check column headers to see if DB column is present
@@ -529,7 +529,7 @@ class Vappman(Prerequisites):
529
529
  # Store as a SimpleNamespace for dot-notation access
530
530
  ns = installs.get((name, db), None)
531
531
  if ns: # we have both user and system apps
532
- if current_in_user_mode and local:
532
+ if switch_to_system_mode and local:
533
533
  ns.version=version
534
534
  ns.where += where
535
535
  else:
@@ -547,12 +547,12 @@ class Vappman(Prerequisites):
547
547
  command = ['appman' if self.has_appman else 'am']
548
548
  command += cmd.split()
549
549
  output_key = ' '.join(command)
550
- current_in_user_mode = self.appman.is_user_mode()
550
+ switch_to_system_mode = not self.has_appman and self.appman.is_user_mode()
551
551
 
552
552
  output = self.saved_outputs.get(output_key, None)
553
553
  if repull or not output:
554
554
  if 'files' in cmd.split():
555
- if current_in_user_mode is True:
555
+ if switch_to_system_mode is True:
556
556
  # temp: promote to system mode to get all apps
557
557
  self.appman.set_system_mode_cheat(True)
558
558
 
@@ -563,11 +563,11 @@ class Vappman(Prerequisites):
563
563
  stderr=subprocess.PIPE, check=False)
564
564
  except Exception as exc:
565
565
  ConsoleWindow.stop_curses()
566
- if current_in_user_mode is True:
566
+ if switch_to_system_mode is True:
567
567
  self.appman.set_system_mode_cheat(False)
568
568
  print(f'FAILED: {command}: {exc}')
569
569
  sys.exit(1)
570
- if current_in_user_mode is True:
570
+ if switch_to_system_mode is True:
571
571
  self.appman.set_system_mode_cheat(False)
572
572
 
573
573
  if result.returncode != 0:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: vappman
3
- Version: 2.1.1
3
+ Version: 2.1.2
4
4
  Summary: A visual wrapper for appman
5
5
  Keywords: app,installer,manager,appimages
6
6
  Author-email: Joe Defen <joedef@google.com>
@@ -1,14 +1,14 @@
1
1
  vappman/AppimageDoctor.py,sha256=ohXy5xgTRDXIp2TrbacOqUp_VVODYTdsPrFFk5EeOds,13497
2
2
  vappman/AppmanLauncher.py,sha256=T3RXi3CpsdoSmVMMlkkuLHnQpUT2IcjRU0V3Lw6hA6Y,8774
3
- vappman/AppmanVars.py,sha256=reA_3TPvkhD3BUDuVEBAFGMS6uOmzjsQhOIJ7pdmttk,3731
3
+ vappman/AppmanVars.py,sha256=5Gsdm9dNHeJpaF4mgkpbIZtWQP_sOuuRCs3cSGYpX20,3731
4
4
  vappman/CommandRunner.py,sha256=-fF2dH58SODBRXannU8EhKDa8LLP-9_25Tyo8IDSXAQ,1264
5
5
  vappman/PersistentState.py,sha256=65aOCaW5pbHdFFQtBYZB0TwQAvHgMFzwDLkPXRQxoGw,3275
6
6
  vappman/Prerequisites.py,sha256=iBUkBQqPCNV-BXKDzZmKh7xaKGZE1QFzYTjbd3cuATE,10177
7
7
  vappman/VappmanListCache.py,sha256=lsA82WyGssYherJ3lK1DGABghbAupDNfLOgyu3C9-Oc,9852
8
8
  vappman/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
- vappman/main.py,sha256=b0KpZvtTioDnUPGR7lYX2pEbJ3ddbaMFanFI2jVXE2A,32149
10
- vappman-2.1.1.dist-info/entry_points.txt,sha256=c9NHAQ8xJLkwtSWlw_nGNlAPCMODp_qGj4wlaHvbVUM,45
11
- vappman-2.1.1.dist-info/licenses/LICENSE,sha256=qB9OdnyyF6WYHiEIXVm0rOSdcf8e2ctorrtWs6CC5lU,1062
12
- vappman-2.1.1.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
13
- vappman-2.1.1.dist-info/METADATA,sha256=AZU6Qf6YZJQzhJcrfvpBCZx5IyZbEiyZm2-KWvVHLvU,12378
14
- vappman-2.1.1.dist-info/RECORD,,
9
+ vappman/main.py,sha256=_kM5S74ZDZHsXdes614BWDmx4ERUQLJSqGwbUUgUXmc,32232
10
+ vappman-2.1.2.dist-info/entry_points.txt,sha256=c9NHAQ8xJLkwtSWlw_nGNlAPCMODp_qGj4wlaHvbVUM,45
11
+ vappman-2.1.2.dist-info/licenses/LICENSE,sha256=qB9OdnyyF6WYHiEIXVm0rOSdcf8e2ctorrtWs6CC5lU,1062
12
+ vappman-2.1.2.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
13
+ vappman-2.1.2.dist-info/METADATA,sha256=IbBu_S4tdoyzFde81WX96boGgpOENdT6EpAKImfPYcY,12378
14
+ vappman-2.1.2.dist-info/RECORD,,