#ebuild already exists
#self.logger.debug("Creating dep tree...")
no_deps = self.config.getboolean('options', 'no_deps')
+ category = self.config.get('options', 'category')
while len(self.tree):
(project_name, version) = self.tree.pop(0)
#self.logger.debug(self.tree)
#print "REQUIRES", requires
if requires:
for req in requires:
- if no_deps or ebuild_exists("dev-python/%s" % req.project_name.lower()):
- if not no_deps:
- self.logger.info("Skipping dependency (exists): %s" % req.project_name)
+ depcat = None
+ for cat in {category, 'dev-python'}:
+ if ebuild_exists('%s/%s' % (
+ category, req.project_name.lower())):
+ depcat = cat
+ break
+ if depcat:
+ self.logger.info(
+ 'skipping dependency (exists): %s/%s' % (
+ depcat, req.project_name))
+ elif no_deps:
+ self.logger.info(
+ 'skipping dependency: %s' % req.project_name)
else:
self.add_dep(req.project_name)
- #Only force overwriting and category on first ebuild created, not dependencies
+ #Only force overwriting on first ebuild created, not dependencies
self.config.setboolean('options', 'overwrite', False)
- self.config.set('options', 'category', '')
def add_dep(self, project_name):
'''Add dependency'''