aboutsummaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-03-25 15:46:18 +0000
committerRichard Purdie <rpurdie@linux.intel.com>2010-03-25 17:26:30 +0000
commit881caec450d40a41ddb21979e286a601fa0763e5 (patch)
treec237fd34327337b50c8a0e9ecde0835f89207be1 /bitbake
parent19d5f2b067bdfdf7caa87b67ffae5d81e4ecdf29 (diff)
downloadopenembedded-core-contrib-881caec450d40a41ddb21979e286a601fa0763e5.tar.gz
bb.manifest: Drop, its unused and obsolete. No point in having dead code around
(Bitbake rev: 69374497b557a5e99ffc7cbe5e075d63e2d9cfaa) Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/manifest.py144
1 files changed, 0 insertions, 144 deletions
diff --git a/bitbake/lib/bb/manifest.py b/bitbake/lib/bb/manifest.py
deleted file mode 100644
index 418367759f..0000000000
--- a/bitbake/lib/bb/manifest.py
+++ /dev/null
@@ -1,144 +0,0 @@
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
-#
-# Copyright (C) 2003, 2004 Chris Larson
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-import os, sys
-import bb, bb.data
-
-def getfields(line):
- fields = {}
- fieldmap = ( "pkg", "src", "dest", "type", "mode", "uid", "gid", "major", "minor", "start", "inc", "count" )
- for f in xrange(len(fieldmap)):
- fields[fieldmap[f]] = None
-
- if not line:
- return None
-
- splitline = line.split()
- if not len(splitline):
- return None
-
- try:
- for f in xrange(len(fieldmap)):
- if splitline[f] == '-':
- continue
- fields[fieldmap[f]] = splitline[f]
- except IndexError:
- pass
- return fields
-
-def parse (mfile, d):
- manifest = []
- while 1:
- line = mfile.readline()
- if not line:
- break
- if line.startswith("#"):
- continue
- fields = getfields(line)
- if not fields:
- continue
- manifest.append(fields)
- return manifest
-
-def emit (func, manifest, d):
-#str = "%s () {\n" % func
- str = ""
- for line in manifest:
- emittedline = emit_line(func, line, d)
- if not emittedline:
- continue
- str += emittedline + "\n"
-# str += "}\n"
- return str
-
-def mangle (func, line, d):
- import copy
- newline = copy.copy(line)
- src = bb.data.expand(newline["src"], d)
-
- if src:
- if not os.path.isabs(src):
- src = "${WORKDIR}/" + src
-
- dest = newline["dest"]
- if not dest:
- return
-
- if dest.startswith("/"):
- dest = dest[1:]
-
- if func is "do_install":
- dest = "${D}/" + dest
-
- elif func is "do_populate":
- dest = "${WORKDIR}/install/" + newline["pkg"] + "/" + dest
-
- elif func is "do_stage":
- varmap = {}
- varmap["${bindir}"] = "${STAGING_DIR}/${HOST_SYS}/bin"
- varmap["${libdir}"] = "${STAGING_DIR}/${HOST_SYS}/lib"
- varmap["${includedir}"] = "${STAGING_DIR}/${HOST_SYS}/include"
- varmap["${datadir}"] = "${STAGING_DATADIR}"
-
- matched = 0
- for key in varmap:
- if dest.startswith(key):
- dest = varmap[key] + "/" + dest[len(key):]
- matched = 1
- if not matched:
- newline = None
- return
- else:
- newline = None
- return
-
- newline["src"] = src
- newline["dest"] = dest
- return newline
-
-def emit_line (func, line, d):
- import copy
- newline = copy.deepcopy(line)
- newline = mangle(func, newline, d)
- if not newline:
- return None
-
- str = ""
- type = newline["type"]
- mode = newline["mode"]
- src = newline["src"]
- dest = newline["dest"]
- if type is "d":
- str = "install -d "
- if mode:
- str += "-m %s " % mode
- str += dest
- elif type is "f":
- if not src:
- return None
- if dest.endswith("/"):
- str = "install -d "
- str += dest + "\n"
- str += "install "
- else:
- str = "install -D "
- if mode:
- str += "-m %s " % mode
- str += src + " " + dest
- del newline
- return str