1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-31 00:39:46 +00:00

package: Rename splitfile functions to something more descriptive

The splitfile and splitfile2 function names are confusing and the comments
are also misleading, hard to understand or plain incorrect. This tries to
improve things.

(From OE-Core rev: 46f3050a1f46f814e2d031e7e71600b2932d631c)

(From OE-Core rev: bc6f7085b42d8137957795e800e8b46d2f1eddac)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie
2013-01-29 13:43:15 +00:00
parent 8e5d8ed550
commit fed8dfff1f
+9 -12
View File
@@ -223,13 +223,12 @@ python () {
d.setVar("PACKAGERDEPTASK", "") d.setVar("PACKAGERDEPTASK", "")
} }
def splitfile(file, debugfile, debugsrcdir, d): def splitdebuginfo(file, debugfile, debugsrcdir, d):
# Function to split a single file, called from split_and_strip_files below # Function to split a single file into two components, one is the stripped
# A working 'file' (one which works on the target architecture) # target system binary, the other contains any debugging information. The
# is split and the split off portions go to debugfile. # two files are linked to reference each other.
# #
# The debug information is then processed for src references. These # sourcefile is also generated containing a list of debugsources
# references are copied to debugsrcdir, if defined.
import commands, stat, subprocess import commands, stat, subprocess
@@ -267,10 +266,8 @@ def splitfile(file, debugfile, debugsrcdir, d):
return 0 return 0
def splitfile2(debugsrcdir, d): def copydebugsources(debugsrcdir, d):
# Function to split a single file, called from split_and_strip_files below # The debug src information written out to sourcefile is further procecessed
#
# The debug src information processed in the splitfile2 is further procecessed
# and copied to the destination here. # and copied to the destination here.
import commands, stat, subprocess import commands, stat, subprocess
@@ -875,7 +872,7 @@ python split_and_strip_files () {
bb.mkdirhier(os.path.dirname(fpath)) bb.mkdirhier(os.path.dirname(fpath))
#bb.note("Split %s -> %s" % (file, fpath)) #bb.note("Split %s -> %s" % (file, fpath))
# Only store off the hard link reference if we successfully split! # Only store off the hard link reference if we successfully split!
if splitfile(file, fpath, debugsrcdir, d) == 0 and file_reference != "": if splitdebuginfo(file, fpath, debugsrcdir, d) == 0 and file_reference != "":
file_links[file_reference] = file file_links[file_reference] = file
# The above may have generated dangling symlinks, remove them! # The above may have generated dangling symlinks, remove them!
@@ -899,7 +896,7 @@ python split_and_strip_files () {
# Process the debugsrcdir if requested... # Process the debugsrcdir if requested...
# This copies and places the referenced sources for later debugging... # This copies and places the referenced sources for later debugging...
splitfile2(debugsrcdir, d) copydebugsources(debugsrcdir, d)
# #
# End of debug splitting # End of debug splitting
# #