portageq repositories_configuration: Require EROOT argument.
authorArfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
Sun, 14 Jul 2013 18:01:52 +0000 (20:01 +0200)
committerArfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
Sun, 14 Jul 2013 18:01:52 +0000 (20:01 +0200)
bin/portageq

index 4c2f4646f59a581137f26ae13ea654c97a1c4266..c5c37d9b79cc7721c67ce2f76889b7b1bade2f6a 100755 (executable)
@@ -651,11 +651,15 @@ def gentoo_mirrors(argv):
 
 
 def repositories_configuration(argv):
-       """
+       """<eroot>
        Returns the configuration of repositories.
        """
-       sys.stdout.write(portage.settings.repositories.config_string())
+       if len(argv) < 1:
+               print("ERROR: insufficient parameters!", file=sys.stderr)
+               return 3
+       sys.stdout.write(portage.db[argv[0]]["vartree"].settings.repositories.config_string())
        sys.stdout.flush()
+repositories_configuration.uses_eroot = True
 
 
 def portdir(argv):