summaryrefslogtreecommitdiffstats
path: root/meta/classes/package.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2012-08-20 16:52:21 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-08-21 12:15:30 +0100
commit48619958d53cbec888a0a6806c5e494291e9e227 (patch)
tree0618ff69a32566be156b0f7e5d7a06cce350e033 /meta/classes/package.bbclass
parent7c40daab587306da25c8d8f566392ee1f57bbef4 (diff)
downloadpoky-48619958d53cbec888a0a6806c5e494291e9e227.tar.gz
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. (From OE-Core rev: 8385d6d74624000d68814f4e3266d47bc8885942) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/package.bbclass')
-rw-r--r--meta/classes/package.bbclass74
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):
230 230
231 sourcefile = d.expand("${WORKDIR}/debugsources.list") 231 sourcefile = d.expand("${WORKDIR}/debugsources.list")
232 if debugsrcdir and os.path.isfile(sourcefile): 232 if debugsrcdir and os.path.isfile(sourcefile):
233 dvar = d.getVar('PKGD', True) 233 dvar = d.getVar('PKGD', True)
234 pathprefix = "export PATH=%s; " % d.getVar('PATH', True) 234 pathprefix = "export PATH=%s; " % d.getVar('PATH', True)
235 strip = d.getVar("STRIP", True) 235 strip = d.getVar("STRIP", True)
236 objcopy = d.getVar("OBJCOPY", True) 236 objcopy = d.getVar("OBJCOPY", True)
237 debugedit = d.expand("${STAGING_LIBDIR_NATIVE}/rpm/bin/debugedit") 237 debugedit = d.expand("${STAGING_LIBDIR_NATIVE}/rpm/bin/debugedit")
238 workdir = d.getVar("WORKDIR", True) 238 workdir = d.getVar("WORKDIR", True)
239 workparentdir = os.path.dirname(workdir) 239 workparentdir = os.path.dirname(workdir)
240 workbasedir = os.path.basename(workdir) 240 workbasedir = os.path.basename(workdir)
241 241
242 nosuchdir = [] 242 nosuchdir = []
243 basepath = dvar 243 basepath = dvar
244 for p in debugsrcdir.split("/"): 244 for p in debugsrcdir.split("/"):
245 basepath = basepath + "/" + p 245 basepath = basepath + "/" + p
246 if not os.path.exists(basepath): 246 if not os.path.exists(basepath):
247 nosuchdir.append(basepath) 247 nosuchdir.append(basepath)
248 bb.mkdirhier(basepath) 248 bb.mkdirhier(basepath)
249 249
250 processdebugsrc = "LC_ALL=C ; sort -z -u '%s' | egrep -v -z '(<internal>|<built-in>)$' | " 250 processdebugsrc = "LC_ALL=C ; sort -z -u '%s' | egrep -v -z '(<internal>|<built-in>)$' | "
251 # We need to ignore files that are not actually ours 251 # We need to ignore files that are not actually ours
252 # we do this by only paying attention to items from this package 252 # we do this by only paying attention to items from this package
253 processdebugsrc += "fgrep -z '%s' | " 253 processdebugsrc += "fgrep -z '%s' | "
254 processdebugsrc += "(cd '%s' ; cpio -pd0mL --no-preserve-owner '%s%s' 2>/dev/null)" 254 processdebugsrc += "(cd '%s' ; cpio -pd0mL --no-preserve-owner '%s%s' 2>/dev/null)"
255 255
256 subprocess.call(processdebugsrc % (sourcefile, workbasedir, workparentdir, dvar, debugsrcdir), shell=True) 256 subprocess.call(processdebugsrc % (sourcefile, workbasedir, workparentdir, dvar, debugsrcdir), shell=True)
257 257
258 # The copy by cpio may have resulted in some empty directories! Remove these 258 # The copy by cpio may have resulted in some empty directories! Remove these
259 for root, dirs, files in os.walk("%s%s" % (dvar, debugsrcdir)): 259 for root, dirs, files in os.walk("%s%s" % (dvar, debugsrcdir)):
260 for d in dirs: 260 for d in dirs:
261 dir = os.path.join(root, d) 261 dir = os.path.join(root, d)
262 #bb.note("rmdir -p %s" % dir) 262 #bb.note("rmdir -p %s" % dir)
263 subprocess.call("rmdir -p %s 2>/dev/null" % dir, shell=True) 263 subprocess.call("rmdir -p %s 2>/dev/null" % dir, shell=True)
264 264
265 # Also remove debugsrcdir if its empty 265 # Also remove debugsrcdir if its empty
266 for p in nosuchdir[::-1]: 266 for p in nosuchdir[::-1]:
267 if os.path.exists(p) and not os.listdir(p): 267 if os.path.exists(p) and not os.listdir(p):
268 os.rmdir(p) 268 os.rmdir(p)
269 269
270def runstrip(file, elftype, d): 270def runstrip(file, elftype, d):
271 # Function to strip a single file, called from split_and_strip_files below 271 # Function to strip a single file, called from split_and_strip_files below
@@ -735,7 +735,7 @@ python split_and_strip_files () {
735 file_list = {} 735 file_list = {}
736 file_links = {} 736 file_links = {}
737 if (d.getVar('INHIBIT_PACKAGE_DEBUG_SPLIT', True) != '1') and \ 737 if (d.getVar('INHIBIT_PACKAGE_DEBUG_SPLIT', True) != '1') and \
738 (d.getVar('INHIBIT_PACKAGE_STRIP', True) != '1'): 738 (d.getVar('INHIBIT_PACKAGE_STRIP', True) != '1'):
739 for root, dirs, files in os.walk(dvar): 739 for root, dirs, files in os.walk(dvar):
740 for f in files: 740 for f in files:
741 file = os.path.join(root, f) 741 file = os.path.join(root, f)