diff options
author | Richard Purdie <richard@ted.(none)> | 2009-04-28 08:24:11 +0100 |
---|---|---|
committer | Richard Purdie <richard@ted.(none)> | 2009-04-28 08:24:11 +0100 |
commit | 3927e38eba96a172c7df2c7270c31728b83612eb (patch) | |
tree | 48b0a30d721af9e2f25e03bea8e41035e9ff40bb /meta/classes | |
parent | 49ca46f588425c88e37a85df00b1fd4591a01ab6 (diff) | |
parent | d65be3dd2aaa643b5596c8470caf7f291513efee (diff) | |
download | openembedded-core-3927e38eba96a172c7df2c7270c31728b83612eb.tar.gz openembedded-core-3927e38eba96a172c7df2c7270c31728b83612eb.tar.bz2 openembedded-core-3927e38eba96a172c7df2c7270c31728b83612eb.tar.xz openembedded-core-3927e38eba96a172c7df2c7270c31728b83612eb.zip |
Merge ssh://gitserver@git.pokylinux.org/poky
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/base.bbclass | 11 | ||||
-rw-r--r-- | meta/classes/package.bbclass | 4 |
2 files changed, 13 insertions, 2 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass index 1f280a0dc..e801fd12a 100644 --- a/meta/classes/base.bbclass +++ b/meta/classes/base.bbclass @@ -681,9 +681,20 @@ def oe_unpack_file(file, data, url = None): if os.path.samefile(file, dest): return True + # Change to subdir before executing command + save_cwd = os.getcwd(); + parm = bb.decodeurl(url)[5] + if 'subdir' in parm: + newdir = ("%s/%s" % (os.getcwd(), parm['subdir'])) + bb.mkdirhier(newdir) + os.chdir(newdir) + cmd = "PATH=\"%s\" %s" % (bb.data.getVar('PATH', data, 1), cmd) bb.note("Unpacking %s to %s/" % (file, os.getcwd())) ret = os.system(cmd) + + os.chdir(save_cwd) + return ret == 0 addtask unpack after do_fetch diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass index fa53b1358..df870142f 100644 --- a/meta/classes/package.bbclass +++ b/meta/classes/package.bbclass @@ -23,7 +23,7 @@ def legitimize_package_name(s): # Remaining package name validity fixes return s.lower().replace('_', '-').replace('@', '+').replace(',', '+').replace('/', '-') -def do_split_packages(d, root, file_regex, output_pattern, description, postinst=None, recursive=False, hook=None, extra_depends=None, aux_files_pattern=None, postrm=None, allow_dirs=False, prepend=False, match_path=False, aux_files_pattern_verbatim=None): +def do_split_packages(d, root, file_regex, output_pattern, description, postinst=None, recursive=False, hook=None, extra_depends=None, aux_files_pattern=None, postrm=None, allow_dirs=False, prepend=False, match_path=False, aux_files_pattern_verbatim=None, allow_links=False): """ Used in .bb files to split up dynamically generated subpackages of a given package, usually plugins or modules. @@ -72,7 +72,7 @@ def do_split_packages(d, root, file_regex, output_pattern, description, postinst continue f = os.path.join(dvar + root, o) mode = os.lstat(f).st_mode - if not (stat.S_ISREG(mode) or (allow_dirs and stat.S_ISDIR(mode))): + if not (stat.S_ISREG(mode) or (allow_links and stat.S_ISLNK(mode)) or (allow_dirs and stat.S_ISDIR(mode))): continue on = legitimize_package_name(m.group(1)) pkg = output_pattern % on |