Esempio n. 1
0
 def use_package(self, location):
     if not os.path.isdir(location + '/glue/packages'):
         error('Package at '+location+' does not have a subdirectory glue/packages so cannot be added to a tree. Hint; add_source_tree will work with the same arugments, but you will need to manually tell the build system about items in the current tree. \n')
     self.extrasearchpath = self.extrasearchpath + [location]
     x = len(self.items)
     newitems, newdeps = buildutils.merge_all([location + '/glue/packages'], 'items')
     self.items = self.items + newitems
     self.deps = self.deps + newdeps
     #sys.stderr.write('(Adding %d items from %s)\n' % (len(self.items) - x, location))
     self.init(self.arch_name, self.platform_name, self.target_name)
Esempio n. 2
0
 def use_package(self, location):
     if not os.path.isdir(location + '/glue/packages'):
         error('Package at '+location+' does not have a subdirectory glue/packages so cannot be added to a tree. Hint; add_source_tree will work with the same arugments, but you will need to manually tell the build system about items in the current tree. \n')
     self.extrasearchpath = self.extrasearchpath + [location]
     x = len(self.items)
     newitems, newdeps = buildutils.merge_all([location + '/glue/packages'], 'items')
     self.items = self.items + newitems
     self.deps = self.deps + newdeps
     #sys.stderr.write('(Adding %d items from %s)\n' % (len(self.items) - x, location))
     self.init(self.arch_name, self.platform_name, self.target_name)
Esempio n. 3
0
# Nemesis tree blueprint
#
# Copyright 1998 University of Cambridge
#
# code to read the packages files and incorporate
# the changes described in choices, resulting in a specialized
# tree.
import treeinfo
import customizer
import sys, string, os, buildutils
from nemclasses import *

dirs = [treeinfo.build_tree_dir + '/glue/packages']
if treeinfo.source_tree_dir:
    dirs.append(treeinfo.source_tree_dir + '/glue/packages')

(items, deps) = buildutils.merge_all(dirs, 'items')

cust = customizer.Customizer(items)
cust.deps = cust.deps + deps
cust.init(treeinfo.arch_name, treeinfo.platform_name, treeinfo.target_name)
cust.interpret(treeinfo.build_tree_dir + '/choices')

cust.makeconsistent(1)
items = cust.getitems()
db = cust.getdb()
searchpath = cust.getpath()
deps = cust.deps
Esempio n. 4
0
# Copyright 1999 University of Cambridge
#
#
# generates a new set of package description records
# based on the contents of the blueprint and the build
# tree.
#
# possibly also generates a bunch of package directories

import treeinfo
import customizer
import sys, os, buildutils
from nemclasses import *

(items, _) = buildutils.merge_all([
    treeinfo.build_tree_dir + '/glue/packages',
    treeinfo.source_tree_dir + '/glue/packages'
], 'items')


class Finder:
    def __init__(self, surpressbackups, root='./'):
        self.root = root
        self.files = {}
        self.symlinks = {}
        self.danglies = {}
        self.directories = {}
        self.vdirectories = {}
        self.surpressbackups = surpressbackups
        os.path.walk(root, self.visit, None)

    def visit(self, bogus, dirname, names):
Esempio n. 5
0
#
# Copyright 1999 University of Cambridge
#
#
# generates a new set of package description records
# based on the contents of the blueprint and the build
# tree.
#
# possibly also generates a bunch of package directories

import treeinfo
import customizer
import sys, os, buildutils
from nemclasses import *

(items,_) = buildutils.merge_all([treeinfo.build_tree_dir+'/glue/packages', treeinfo.source_tree_dir+'/glue/packages'], 'items')

class Finder:
    def __init__(self, surpressbackups, root = './'):
        self.root = root
        self.files = {}
        self.symlinks = {}
        self.danglies = {}
        self.directories = {}
        self.vdirectories = {}
        self.surpressbackups = surpressbackups
        os.path.walk(root, self.visit, None)
    def visit(self, bogus, dirname, names):
        dirname = dirname[len(self.root):]
        if dirname == '': dirname = '/'        
        self.directories[dirname] = names
Esempio n. 6
0
# Nemesis tree blueprint
#
# Copyright 1998 University of Cambridge
#
# code to read the packages files and incorporate
# the changes described in choices, resulting in a specialized
# tree.
import treeinfo
import customizer
import sys, string, os, buildutils
from nemclasses import *

dirs = [treeinfo.build_tree_dir+'/glue/packages']
if treeinfo.source_tree_dir:
    dirs.append( treeinfo.source_tree_dir+'/glue/packages')

(items, deps) = buildutils.merge_all(dirs,'items')

cust = customizer.Customizer(items)
cust.deps = cust.deps + deps
cust.init(treeinfo.arch_name, treeinfo.platform_name, treeinfo.target_name)
cust.interpret(treeinfo.build_tree_dir+'/choices')

cust.makeconsistent(1)
items = cust.getitems()
db = cust.getdb()
searchpath = cust.getpath()
deps = cust.deps