From 258c9c1bd9d6213013c0fd6a0cdd61b6840b0bb1 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 24 Jun 2013 20:26:15 -0700 Subject: [PATCH] repoman: samefile for repo location comparison This ensures correct behavior with symlinks. --- bin/repoman | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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: -- 2.26.2