Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Ulf Magnusson <ulfalizer@gmail.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH v2 1/1] package.bbclass: Remove unused variables and imports
Date: Wed, 26 Oct 2016 19:39:04 +0200	[thread overview]
Message-ID: <1477503544-13794-2-git-send-email-ulfalizer@gmail.com> (raw)
In-Reply-To: <1477503544-13794-1-git-send-email-ulfalizer@gmail.com>

Probably leftovers. Verified with a full core-image-sato build. For
imports, I tried to find helper functions that might use an import from
the parent function as well.

Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com>
---
 meta/classes/package.bbclass | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index a6f0a7a..3d5b981 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -335,7 +335,6 @@ def splitdebuginfo(file, debugfile, debugsrcdir, sourcefile, d):
 
     import stat
 
-    dvar = d.getVar('PKGD', True)
     objcopy = d.getVar("OBJCOPY", True)
     debugedit = d.expand("${STAGING_LIBDIR_NATIVE}/rpm/bin/debugedit")
 
@@ -378,14 +377,9 @@ def copydebugsources(debugsrcdir, d):
     # The debug src information written out to sourcefile is further procecessed
     # and copied to the destination here.
 
-    import stat
-
     sourcefile = d.expand("${WORKDIR}/debugsources.list")
     if debugsrcdir and os.path.isfile(sourcefile):
         dvar = d.getVar('PKGD', 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(os.path.dirname(workdir))
         workbasedir = os.path.basename(os.path.dirname(workdir)) + "/" + os.path.basename(workdir)
@@ -489,7 +483,6 @@ def runtime_mapping_rename (varname, pkg, d):
 
 python package_get_auto_pr() {
     import oe.prservice
-    import re
 
     # Support per recipe PRSERV_HOST
     pn = d.getVar('PN', True)
@@ -1024,7 +1017,7 @@ python split_and_strip_files () {
             fpath = dvar + dest
             # Skip it if the target doesn't exist
             try:
-                s = os.stat(fpath)
+                os.stat(fpath)
             except OSError as e:
                 (err, strerror) = e.args
                 if err != errno.ENOENT:
@@ -1073,8 +1066,6 @@ python split_and_strip_files () {
 }
 
 python populate_packages () {
-    import glob, re
-
     workdir = d.getVar('WORKDIR', True)
     outdir = d.getVar('DEPLOY_DIR', True)
     dvar = d.getVar('PKGD', True)
@@ -1219,7 +1210,6 @@ python populate_packages () {
 populate_packages[dirs] = "${D}"
 
 python package_fixsymlinks () {
-    import errno
     pkgdest = d.getVar('PKGDEST', True)
     packages = d.getVar("PACKAGES", False).split()
 
@@ -1630,7 +1620,6 @@ python package_do_shlibs() {
         sonames = list()
         renames = list()
         for file in pkgfiles[pkg]:
-                soname = None
                 if cpath.islink(file):
                     continue
                 if targetos == "darwin" or targetos == "darwin8":
-- 
2.7.4



  reply	other threads:[~2016-10-26 17:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-26 17:39 [PATCH v2 0/1] Remove unused variables and imports from package.bbclass Ulf Magnusson
2016-10-26 17:39 ` Ulf Magnusson [this message]
2016-10-31 17:04   ` [PATCH v2 1/1] package.bbclass: Remove unused variables and imports Burton, Ross

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1477503544-13794-2-git-send-email-ulfalizer@gmail.com \
    --to=ulfalizer@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox