From: Zac Medico Date: Tue, 25 Jun 2013 03:26:15 +0000 (-0700) Subject: repoman: samefile for repo location comparison X-Git-Tag: v2.2.0_alpha186~10 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=258c9c1bd9d6213013c0fd6a0cdd61b6840b0bb1;p=portage.git repoman: samefile for repo location comparison This ensures correct behavior with symlinks. --- diff --git a/bin/repoman b/bin/repoman index 5de554cd5..610744910 100755 --- a/bin/repoman +++ b/bin/repoman @@ -614,7 +614,15 @@ portdir = portdb.porttrees[0] commit_env = os.environ.copy() # list() is for iteration on a copy. for repo in list(repoman_settings.repositories): - if repo.location not in [portdir_overlay] + [x.location for x in repo_config.masters]: + 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: del repoman_settings.repositories[repo.name] if repo_config.allow_provide_virtual: