Skip to content

Commit

Permalink
Search for user tag chainFile in main repo if needs be
Browse files Browse the repository at this point in the history
If it's writeable that's where local declarations go, and the tags
need to be in the same place
  • Loading branch information
RobertLuptonTheGood committed Jan 16, 2024
1 parent 72be254 commit 14e9ee5
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions python/eups/db/Database.py
Original file line number Diff line number Diff line change
Expand Up @@ -535,18 +535,18 @@ def getChainFile(self, tag, productName, searchUserDB=False):
if is_string(tag):
tag = eups.tags.Tag(tag)

pdirs = []
tfile = self._tagFileInDir(pdir, tag.name)
if os.path.exists(tfile):
return ChainFile(tfile)

# not found; user tags may be in the userDB
if searchUserDB and tag.isUser():
for d in self._getUserTagDb(values=True):
if d:
pdirs.append(self._productDir(productName, d))
else:
pdirs.append(pdir)

for pdir in pdirs:
tfile = self._tagFileInDir(pdir, tag.name)
if os.path.exists(tfile):
return ChainFile(tfile)
pdir = self._productDir(productName, d)
tfile = self._tagFileInDir(pdir, tag.name)
if os.path.exists(tfile):
return ChainFile(tfile)

return None

Expand Down

0 comments on commit 14e9ee5

Please sign in to comment.