Skip to contentSkip to conversation

package.bbclass: Fixup for using common function

PATCH New Richard Purdie 1 participant 1 message Aug 21, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package.bbclass: Fixup for using common function

We may as well use the common function for this rather than duplicating the code.

meta/classes/package.bbclass +2 -13
index 23832b1..0ff5370 100644
@@ -931,13 +931,7 @@ python split_and_strip_files () {
         for f in kernmods:
             sfiles.append((f, 16, strip))
 
-
-        import multiprocessing
-        nproc = multiprocessing.cpu_count()
-        pool = bb.utils.multiprocessingpool(nproc)
-        processed = list(pool.imap(oe.package.runstrip, sfiles))
-        pool.close()
-        pool.join()
+        oe.utils.multiprocess_exec(sfiles, oe.package.runstrip)
 
     #
     # End of strip
@@ -1314,12 +1308,7 @@ python package_do_filedeps() {
         for files in chunks(pkgfiles[pkg], 100):
             pkglist.append((pkg, files, rpmdeps, pkgdest))
 
-    import multiprocessing
-    nproc = multiprocessing.cpu_count()
-    pool =  bb.utils.multiprocessingpool(nproc)
-    processed = list(pool.imap(oe.package.filedeprunner, pkglist))
-    pool.close()
-    pool.join()
+    processed = oe.utils.multiprocess_exec( pkglist, oe.package.filedeprunner)
 
     provides_files = {}
     requires_files = {}