diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-08-20 16:52:21 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-08-21 11:37:01 +0100 |
commit | 8385d6d74624000d68814f4e3266d47bc8885942 (patch) | |
tree | b5936e4a38273c8b2f830c9b7ddfdde729b3d9c2 /meta/classes/package.bbclass | |
parent | 04568d1f18250d531aad5d286157d2d559083520 (diff) | |
download | openembedded-core-8385d6d74624000d68814f4e3266d47bc8885942.tar.gz openembedded-core-8385d6d74624000d68814f4e3266d47bc8885942.tar.bz2 openembedded-core-8385d6d74624000d68814f4e3266d47bc8885942.zip |
meta/classes: Various python whitespace fixes
It was pointed out we have a number of weird indentations in the python functions.
This patch cleans up 3, 7 and other weird indentations for the core bbclass files.
It also fixes some wierd (odd) shell function indentation which my searches picked up.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/package.bbclass')
-rw-r--r-- | meta/classes/package.bbclass | 74 |
1 files changed, 37 insertions, 37 deletions
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass index 278f0f0ea9..b17fa08da1 100644 --- a/meta/classes/package.bbclass +++ b/meta/classes/package.bbclass @@ -230,42 +230,42 @@ def splitfile2(debugsrcdir, d): sourcefile = d.expand("${WORKDIR}/debugsources.list") if debugsrcdir and os.path.isfile(sourcefile): - dvar = d.getVar('PKGD', True) - pathprefix = "export PATH=%s; " % d.getVar('PATH', True) - strip = d.getVar("STRIP", True) - objcopy = d.getVar("OBJCOPY", True) - debugedit = d.expand("${STAGING_LIBDIR_NATIVE}/rpm/bin/debugedit") - workdir = d.getVar("WORKDIR", True) - workparentdir = os.path.dirname(workdir) - workbasedir = os.path.basename(workdir) - - nosuchdir = [] - basepath = dvar - for p in debugsrcdir.split("/"): - basepath = basepath + "/" + p - if not os.path.exists(basepath): - nosuchdir.append(basepath) - bb.mkdirhier(basepath) - - processdebugsrc = "LC_ALL=C ; sort -z -u '%s' | egrep -v -z '(<internal>|<built-in>)$' | " - # We need to ignore files that are not actually ours - # we do this by only paying attention to items from this package - processdebugsrc += "fgrep -z '%s' | " - processdebugsrc += "(cd '%s' ; cpio -pd0mL --no-preserve-owner '%s%s' 2>/dev/null)" - - subprocess.call(processdebugsrc % (sourcefile, workbasedir, workparentdir, dvar, debugsrcdir), shell=True) - - # The copy by cpio may have resulted in some empty directories! Remove these - for root, dirs, files in os.walk("%s%s" % (dvar, debugsrcdir)): - for d in dirs: - dir = os.path.join(root, d) - #bb.note("rmdir -p %s" % dir) - subprocess.call("rmdir -p %s 2>/dev/null" % dir, shell=True) - - # Also remove debugsrcdir if its empty - for p in nosuchdir[::-1]: - if os.path.exists(p) and not os.listdir(p): - os.rmdir(p) + dvar = d.getVar('PKGD', True) + pathprefix = "export PATH=%s; " % d.getVar('PATH', True) + strip = d.getVar("STRIP", True) + objcopy = d.getVar("OBJCOPY", True) + debugedit = d.expand("${STAGING_LIBDIR_NATIVE}/rpm/bin/debugedit") + workdir = d.getVar("WORKDIR", True) + workparentdir = os.path.dirname(workdir) + workbasedir = os.path.basename(workdir) + + nosuchdir = [] + basepath = dvar + for p in debugsrcdir.split("/"): + basepath = basepath + "/" + p + if not os.path.exists(basepath): + nosuchdir.append(basepath) + bb.mkdirhier(basepath) + + processdebugsrc = "LC_ALL=C ; sort -z -u '%s' | egrep -v -z '(<internal>|<built-in>)$' | " + # We need to ignore files that are not actually ours + # we do this by only paying attention to items from this package + processdebugsrc += "fgrep -z '%s' | " + processdebugsrc += "(cd '%s' ; cpio -pd0mL --no-preserve-owner '%s%s' 2>/dev/null)" + + subprocess.call(processdebugsrc % (sourcefile, workbasedir, workparentdir, dvar, debugsrcdir), shell=True) + + # The copy by cpio may have resulted in some empty directories! Remove these + for root, dirs, files in os.walk("%s%s" % (dvar, debugsrcdir)): + for d in dirs: + dir = os.path.join(root, d) + #bb.note("rmdir -p %s" % dir) + subprocess.call("rmdir -p %s 2>/dev/null" % dir, shell=True) + + # Also remove debugsrcdir if its empty + for p in nosuchdir[::-1]: + if os.path.exists(p) and not os.listdir(p): + os.rmdir(p) def runstrip(file, elftype, d): # Function to strip a single file, called from split_and_strip_files below @@ -735,7 +735,7 @@ python split_and_strip_files () { file_list = {} file_links = {} if (d.getVar('INHIBIT_PACKAGE_DEBUG_SPLIT', True) != '1') and \ - (d.getVar('INHIBIT_PACKAGE_STRIP', True) != '1'): + (d.getVar('INHIBIT_PACKAGE_STRIP', True) != '1'): for root, dirs, files in os.walk(dvar): for f in files: file = os.path.join(root, f) |