reposyntax: Remove unneeded special case
authorSebastian Luther <SebastianLuther@gmx.de>
Wed, 22 Sep 2010 20:32:03 +0000 (22:32 +0200)
committerZac Medico <zmedico@gentoo.org>
Mon, 27 Sep 2010 06:50:15 +0000 (23:50 -0700)
pym/portage/repository.py
pym/portage/tests/resolver/ResolverPlayground.py

index 09e632c5dfa21b61f1f15e0c2f5d33751f23dddd..7f0d392a5145c9ad1d81d7c9a615238a62bd64e1 100644 (file)
@@ -176,11 +176,7 @@ class RepoConfigLoader(object):
                portdir = settings.get('PORTDIR', '')
                portdir_overlay = settings.get('PORTDIR_OVERLAY', '')
                add_overlays(portdir, portdir_overlay, prepos, ignored_map, ignored_location_map)
-               if paths:
-                       parse(paths, prepos, ignored_map, ignored_location_map)
-               else:
-                       prepos['DEFAULT'] = RepoConfig("DEFAULT", {"main_repo": "gentoo"})
-
+               parse(paths, prepos, ignored_map, ignored_location_map)
                ignored_repos = tuple((repo_name, tuple(paths)) \
                        for repo_name, paths in ignored_map.items())
 
index 8d6441c8c814782f726979b04df2130181e2ec3a..e9eefb5cc148d443374e43ad3e86653cfb979400 100644 (file)
@@ -296,7 +296,7 @@ class ResolverPlayground(object):
 
                repos_conf_file = os.path.join(user_config_dir, "repos.conf")           
                f = open(repos_conf_file, "w")
-               priority = 1
+               priority = 999
                for repo in sorted(self.repo_dirs.keys()):
                        f.write("[%s]\n" % repo)
                        f.write("LOCATION=%s\n" % self.repo_dirs[repo])
@@ -304,7 +304,7 @@ class ResolverPlayground(object):
                                f.write("PRIORITY=%s\n" % 1000)
                        else:
                                f.write("PRIORITY=%s\n" % priority)
-                               priority += 1
+                               priority -= 1
                f.close()
 
                for config_file, lines in user_config.items():