Skip to content

Commit

Permalink
Merge pull request #26 from kloptops/main
Browse files Browse the repository at this point in the history
pugwash: fixed some bugs, updated translations, bumped version.
  • Loading branch information
kloptops authored Nov 4, 2023
2 parents 979796a + 45baf27 commit 5913311
Show file tree
Hide file tree
Showing 15 changed files with 87 additions and 73 deletions.
4 changes: 2 additions & 2 deletions PortMaster/pugwash
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python3

## -- BEGIN PORTMASTER INFO --
PORTMASTER_VERSION = '8.4.23'
PORTMASTER_VERSION = '8.4.24'
PORTMASTER_RELEASE_CHANNEL = 'beta'
## -- END PORTMASTER INFO --

Expand Down Expand Up @@ -947,7 +947,7 @@ class PortMasterGUI(pySDL2gui.GUI, harbourmaster.Callback):
def delete_port_size(self, port_name):
# Delete info about a port
if port_name in self.port_size_files:
for port_file, port_info in self.port_size_files[port_name]:
for port_file, port_info in self.port_size_files[port_name].items():
if port_name in self.port_size_file_lookup[port_file]:
self.port_size_file_lookup[port_file].remove(port_name)

Expand Down
5 changes: 4 additions & 1 deletion PortMaster/pylibs/harbourmaster/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@
HM_DEFAULT_PORTS_DIR = Path("/roms/ports")
HM_DEFAULT_TOOLS_DIR = Path("/roms/ports")

if (Path().cwd() / '.git').is_dir() or (Path().cwd() / '..' / '.git').is_dir():
if (Path().cwd() / '..' / '.git').is_dir():
os.chdir(Path().cwd() / '..')

if (Path().cwd() / '.git').is_dir():
## For testing
HM_DEFAULT_TOOLS_DIR = Path('.').absolute()
HM_DEFAULT_PORTS_DIR = Path('ports/').absolute()
Expand Down
4 changes: 4 additions & 0 deletions PortMaster/pylibs/harbourmaster/harbour.py
Original file line number Diff line number Diff line change
Expand Up @@ -768,6 +768,10 @@ def port_info_attrs(self, port_info):
if rtr:
add_list_unique(attrs, 'rtr')

exp = port_info.get('attr', {}).get('exp', False)
if exp:
add_list_unique(attrs, 'exp')

if port_info['name'].casefold() in self.installed_ports:
add_list_unique(attrs, 'installed')

Expand Down
1 change: 1 addition & 0 deletions PortMaster/pylibs/harbourmaster/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
'porter': [],
'image': {},
'rtr': False,
'exp': False,
'runtime': None,
'reqs': [],
}
Expand Down
3 changes: 2 additions & 1 deletion PortMaster/pylibs/harbourmaster/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -505,11 +505,12 @@ def timeit_wrapper(*args, **kwargs):
total_time = end_time - start_time
logger.debug(f'TIME: {func.__name__}({args}, {kwargs}): Took {total_time:.4f} seconds')
return result

return timeit_wrapper


def port_sort_alphabetical(port_info):
port_info.get('attr', {}).get('title', port_info['name']).casefold()
return port_info.get('attr', {}).get('title', port_info['name']).casefold()


def port_sort_date_added(port_info):
Expand Down
Loading

0 comments on commit 5913311

Please sign in to comment.