App: Remove hardcoded local/src from App and defs.mk
local/src is a janware-specific path, remove it from App and defs.mk. It's still in pkg.sh as a safety measure. Will have to go, too, but is kept in for now until further audit. Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
701d8a33e7
commit
1062be24db
4 changed files with 58 additions and 55 deletions
|
|
@ -5,7 +5,6 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import os
|
||||
import pwd
|
||||
import re
|
||||
import sys
|
||||
|
||||
|
|
@ -115,6 +114,8 @@ class App(Base):
|
|||
return self.__pretty_topdir
|
||||
return self.__topdir
|
||||
for d in [self.__projs_root, self.___opt_root]:
|
||||
if d is None:
|
||||
continue
|
||||
ret = d + '/' + name
|
||||
if os.path.exists(ret):
|
||||
return ret
|
||||
|
|
@ -353,7 +354,7 @@ class App(Base):
|
|||
|
||||
# -- Members with default values
|
||||
self.__topdir_fmt = 'absolute'
|
||||
self.__projs_root = pwd.getpwuid(os.getuid()).pw_dir + '/local/src/jw.dev/proj'
|
||||
self.__projs_root: str | None = None
|
||||
self.___opt_root = '/opt'
|
||||
self.__pretty_projs_root = None
|
||||
|
||||
|
|
@ -485,7 +486,9 @@ class App(Base):
|
|||
return self.__top_name
|
||||
|
||||
@property
|
||||
def projs_root(self):
|
||||
def projs_root(self) -> str:
|
||||
if self.__projs_root is None:
|
||||
raise Exception('Tried to get unknown projects root directory')
|
||||
return self.__projs_root
|
||||
|
||||
@property
|
||||
|
|
|
|||
Loading…
Reference in a new issue