mirror of
ssh://git.janware.com/janware/proj/jw-pkg
synced 2026-04-25 09:35:54 +02:00
jw.pkg.App.proj_dir(): Return absolute path
Make App.proj_dir() return an absolute path. This looks like a good idea, because some of the $(call proj_query xxx) paths end up being relative, because they get proj_dir()'s idea of a directory prepended. This prohibits caching them in $(TOPDIR)/make/.cache.mk for make benefit glorious nation of performance. Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
adb9837c63
commit
c8c5788aeb
1 changed files with 2 additions and 2 deletions
|
|
@ -101,11 +101,11 @@ class App(Base):
|
|||
|
||||
def proj_dir(self, name):
|
||||
if name == self.top_name:
|
||||
return self.topdir
|
||||
return os.path.abspath(self.topdir)
|
||||
for d in [ self.projs_root, '/opt' ]:
|
||||
r = d + '/' + name
|
||||
if os.path.exists(r):
|
||||
return r
|
||||
return os.path.abspath(r)
|
||||
if os.path.exists(f'/usr/share/doc/packages/{name}/VERSION'):
|
||||
# The package exists but does not have a dedicated project directory
|
||||
return None
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue