From: Zac Medico Date: Tue, 25 Jun 2013 18:50:01 +0000 (-0700) Subject: repoman: canonical path for repo location compare X-Git-Tag: v2.2.0_alpha186~7 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=8403b5434c3b7c9e383a16f3d4f6619efacda385;p=portage.git repoman: canonical path for repo location compare --- diff --git a/bin/repoman b/bin/repoman index 2a3b4f30f..60286dbc8 100755 --- a/bin/repoman +++ b/bin/repoman @@ -582,8 +582,9 @@ if options.mode == 'commit' and not options.pretend and not vcs: options.pretend = True # Ensure that current repository is in the list of enabled repositories. +repodir = os.path.realpath(portdir_overlay) try: - repoman_settings.repositories.get_repo_for_location(portdir_overlay) + repoman_settings.repositories.get_repo_for_location(repodir) except KeyError: repo_name = portage.repository.config.RepoConfig._read_valid_repo_name(portdir_overlay)[0] layout_conf_data = portage.repository.config.parse_layout_conf(portdir_overlay)[0] @@ -607,22 +608,14 @@ portdb = trees[root]['porttree'].dbapi # Constrain dependency resolution to the master(s) # that are specified in layout.conf. -repodir = os.path.realpath(portdir_overlay) repo_config = repoman_settings.repositories.get_repo_for_location(repodir) portdb.porttrees = list(repo_config.eclass_db.porttrees) portdir = portdb.porttrees[0] commit_env = os.environ.copy() # list() is for iteration on a copy. for repo in list(repoman_settings.repositories): - found = False - for location in [portdir_overlay] + [x.location for x in repo_config.masters]: - try: - if os.path.samefile(location, repo.location): - found = True - break - except OSError: - pass - if not found: + # all paths are canonical + if repo.location not in [repodir] + [x.location for x in repo_config.masters]: del repoman_settings.repositories[repo.name] if repo_config.allow_provide_virtual: