Commits

Anonymous committed a06b771

Create cookies.catalog, fix bug, apply hints from cookies.

Comments (0)

Files changed (2)

+# "cookies" for toolshelf.
+
+# When you try to dock a source tree, toolshelf looks in this file to
+# see if it is listed here.  If it is, and if you didn't specify any hints,
+# it uses the hints listed in this file.
+
+kulp/tenyr{x=scripts}
+http://ftp.gnu.org/gnu/bison/bison-2.5.tar.gz{x=tests:x=etc:x=examples:x=build-aux}
 
 class Cookies(object):
     def __init__(self):
-        self.filename = os.path.join(TOOLSHELF, 'cookies.catalog')
+        self.filename = os.path.join(
+            TOOLSHELF, '.toolshelf', 'cookies.catalog'
+        )
         self._source_map = None
 
     @property
     def source_map(self):
         if self._source_map is None:
             problems = []
-            sources = Source.from_spec('external', self.filename, problems)
+            sources = Source.from_catalog('external', self.filename, problems)
             if problems:
                 raise ValueError(problems)
             self._source_map = {}
     # TODO: improve this
     if problems:
         raise SourceSpecSyntaxError(repr(problems))
+    COOKIES.apply_hints(sources)
     for source in sources:
         source.checkout()
         source.build()