classes/patch.bbclass: Create a "patches" directory when initialising
authorJamie Lenehan <lenehan@twibble.org>
Wed, 30 Aug 2006 07:18:07 +0000 (07:18 +0000)
committerJamie Lenehan <lenehan@twibble.org>
Wed, 30 Aug 2006 07:18:07 +0000 (07:18 +0000)
the quilt patcher class. Without this quilt will search for a patches
directory - starting from the current directory up to the root
directory. If it finds an existing patches directory it will use it
for its patches. This causes all sorts of problems since it is not
where the patches are expected to be. Prior to the recent patcher
changes this directory was being created.

classes/patch.bbclass

index ea01824..c62a8eb 100644 (file)
@@ -174,6 +174,9 @@ def patch_init(d):
                def __init__(self, dir, d):
                        PatchSet.__init__(self, dir, d)
                        self.initialized = False
+                       p = os.path.join(self.dir, 'patches')
+                       if not os.path.exists(p):
+                               os.mkdir(p)
 
                def Clean(self):
                        try: