]> code.ossystems Code Review - openembedded-core.git/commitdiff
bitbake-dev: Sync with upstream
authorRichard Purdie <rpurdie@linux.intel.com>
Mon, 11 May 2009 21:59:35 +0000 (22:59 +0100)
committerRichard Purdie <rpurdie@linux.intel.com>
Mon, 11 May 2009 21:59:35 +0000 (22:59 +0100)
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
32 files changed:
bitbake-dev/ChangeLog
bitbake-dev/lib/bb/COW.py
bitbake-dev/lib/bb/__init__.py
bitbake-dev/lib/bb/cache.py
bitbake-dev/lib/bb/cooker.py
bitbake-dev/lib/bb/data.py
bitbake-dev/lib/bb/data_smart.py
bitbake-dev/lib/bb/fetch/__init__.py
bitbake-dev/lib/bb/fetch/bzr.py
bitbake-dev/lib/bb/fetch/cvs.py
bitbake-dev/lib/bb/fetch/git.py
bitbake-dev/lib/bb/fetch/hg.py
bitbake-dev/lib/bb/fetch/local.py
bitbake-dev/lib/bb/fetch/perforce.py
bitbake-dev/lib/bb/fetch/ssh.py
bitbake-dev/lib/bb/fetch/svk.py
bitbake-dev/lib/bb/fetch/svn.py
bitbake-dev/lib/bb/fetch/wget.py
bitbake-dev/lib/bb/msg.py
bitbake-dev/lib/bb/providers.py
bitbake-dev/lib/bb/runqueue.py
bitbake-dev/lib/bb/shell.py
bitbake-dev/lib/bb/taskdata.py
bitbake-dev/lib/bb/ui/crumbs/buildmanager.py
bitbake-dev/lib/bb/ui/crumbs/runningbuild.py
bitbake-dev/lib/bb/ui/depexp.py
bitbake-dev/lib/bb/ui/goggle.py
bitbake-dev/lib/bb/ui/knotty.py
bitbake-dev/lib/bb/ui/ncurses.py
bitbake-dev/lib/bb/ui/puccho.py
bitbake-dev/lib/bb/ui/uievent.py
bitbake-dev/lib/bb/xmlrpcserver.py

index a2c9d80801fe6dce34121bdade86affb9163fc60..65c5e4bf366c5d00e49b8f21cb313506c7a44ea2 100644 (file)
@@ -169,6 +169,13 @@ Changes in Bitbake 1.9.x:
          proxies to work better. (from Poky)
        - Also allow user and pswd options in SRC_URIs globally (from Poky)
        - Improve proxy handling when using mirrors (from Poky)
+       - Add bb.utils.prune_suffix function
+       - Fix hg checkouts of specific revisions (from Poky)
+       - Fix wget fetching of urls with parameters specified (from Poky)
+       - Add username handling to git fetcher (from Poky)
+       - Set HOME environmental variable when running fetcher commands (from Poky)
+       - Make sure allowed variables inherited from the environment are exported again (from Poky)
+       - When running a stage task in bbshell, run populate_staging, not the stage task (from Poky)
 
 Changes in Bitbake 1.8.0:
        - Release 1.7.x as a stable series
index e5063d60a8f171d62dc32e8a9d6927b3f257086d..ca206cf4b49d72fc323908cf0acdb48f2199bf1c 100644 (file)
 # Assign a file to __warn__ to get warnings about slow operations.
 #
 
-from inspect import getmro
-
 import copy
-import types, sets
+import types
 types.ImmutableTypes = tuple([ \
     types.BooleanType, \
     types.ComplexType, \
@@ -35,7 +33,7 @@ types.ImmutableTypes = tuple([ \
     types.LongType, \
     types.NoneType, \
     types.TupleType, \
-    sets.ImmutableSet] + \
+    frozenset] + \
     list(types.StringTypes))
 
 MUTABLE = "__mutable__"
index 99995212c3d7e0adebc4cbcc0ecbe230e549040b..f2f8f656d88d832616abbe571ef7b0e28fa098d6 100644 (file)
@@ -1130,4 +1130,5 @@ def dep_opconvert(mysplit, myuse):
 
 if __name__ == "__main__":
     import doctest, bb
+    bb.msg.set_debug_level(0)
     doctest.testmod(bb)
index 1001012e0c2643ad319546d7fdc02019fb2ad1f5..272619386aa1307f9075104425e49b058c27ea6a 100644 (file)
@@ -31,7 +31,6 @@
 import os, re
 import bb.data
 import bb.utils
-from sets import Set
 
 try:
     import cPickle as pickle
@@ -525,6 +524,6 @@ class CacheData:
         (set elsewhere)
         """
         self.ignored_dependencies = []
-        self.world_target = Set()
+        self.world_target = set()
         self.bbfile_priority = {}
         self.bbfile_config_priorities = []
index bbae4f03b580f1ac4391fbaf0c422e8446175a22..b12dc13b62d7174e3f97e85f977b8efd8d5459f9 100644 (file)
@@ -26,7 +26,6 @@ import sys, os, getopt, glob, copy, os.path, re, time
 import bb
 from bb import utils, data, parse, event, cache, providers, taskdata, runqueue
 from bb import xmlrpcserver, command
-from sets import Set
 import itertools, sre_constants
 
 class MultipleMatches(Exception):
@@ -97,7 +96,7 @@ class BBCooker:
             self.configuration.cmd = bb.data.getVar("BB_DEFAULT_TASK", self.configuration.data, True) or "build"
 
         bbpkgs = bb.data.getVar('BBPKGS', self.configuration.data, True)
-        if bbpkgs:
+        if bbpkgs and len(self.configuration.pkgs_to_build) == 0:
             self.configuration.pkgs_to_build.extend(bbpkgs.split())
 
         #
@@ -635,7 +634,7 @@ class BBCooker:
 
         # Tweak some variables
         item = self.bb_cache.getVar('PN', fn, True)
-        self.status.ignored_dependencies = Set()
+        self.status.ignored_dependencies = set()
         self.status.bbfile_priority[fn] = 1
 
         # Remove external dependencies
@@ -762,7 +761,7 @@ class BBCooker:
         self.status = bb.cache.CacheData()
 
         ignore = bb.data.getVar("ASSUME_PROVIDED", self.configuration.data, 1) or ""
-        self.status.ignored_dependencies = Set(ignore.split())
+        self.status.ignored_dependencies = set(ignore.split())
 
         for dep in self.configuration.extra_assume_provided:
             self.status.ignored_dependencies.add(dep)
@@ -836,7 +835,11 @@ class BBCooker:
                 if dirfiles:
                     newfiles += dirfiles
                     continue
-            newfiles += glob.glob(f) or [ f ]
+            else:
+                globbed = glob.glob(f)
+                if not globbed and os.path.exists(f):
+                    globbed = [f]
+                newfiles += globbed
 
         bbmask = bb.data.getVar('BBMASK', self.configuration.data, 1)
 
@@ -849,9 +852,8 @@ class BBCooker:
             bb.msg.fatal(bb.msg.domain.Collection, "BBMASK is not a valid regular expression.")
 
         finalfiles = []
-        for i in xrange( len( newfiles ) ):
-            f = newfiles[i]
-            if bbmask and bbmask_compiled.search(f):
+        for f in newfiles:
+            if bbmask_compiled.search(f):
                 bb.msg.debug(1, bb.msg.domain.Collection, "skipping masked file %s" % f)
                 masked += 1
                 continue
index cc08d6900967c4946d5315f0d92c9aa14124921f..d3058b9a1daf06112c4d5c5c78d383d2d14c94ba 100644 (file)
@@ -37,7 +37,7 @@ the speed is more critical here.
 #
 #Based on functions from the base bb module, Copyright 2003 Holger Schurig
 
-import sys, os, re, time, types
+import sys, os, re, types
 if sys.argv[0][-5:] == "pydoc":
     path = os.path.dirname(os.path.dirname(sys.argv[1]))
 else:
@@ -553,7 +553,9 @@ def inherits_class(klass, d):
 def _test():
     """Start a doctest run on this module"""
     import doctest
+    import bb
     from bb import data
+    bb.msg.set_debug_level(0)
     doctest.testmod(data)
 
 if __name__ == "__main__":
index 0d39d20a457c9010d2b45da124baeb317df1fb11..c93aea7fef3dc900d435a85e472db765a60cc6cd 100644 (file)
@@ -32,7 +32,6 @@ import copy, os, re, sys, time, types
 import bb
 from bb   import utils, methodpool
 from COW  import COWDictBase
-from sets import Set
 from new  import classobj
 
 
@@ -142,7 +141,7 @@ class DataSmart:
             try:
                 self._special_values[keyword].add( base )
             except:
-                self._special_values[keyword] = Set()
+                self._special_values[keyword] = set()
                 self._special_values[keyword].add( base )
 
             return
@@ -154,7 +153,7 @@ class DataSmart:
         if '_' in var:
             override = var[var.rfind('_')+1:]
             if not self._seen_overrides.has_key(override):
-                self._seen_overrides[override] = Set()
+                self._seen_overrides[override] = set()
             self._seen_overrides[override].add( var )
 
         # setting var
index 3333a278e135c5180dadba3f551081956eea7b6b..36335849926e826cbfdf7e76bbce848822133570 100644 (file)
@@ -24,16 +24,11 @@ BitBake build tools.
 #
 # Based on functions from the base bb module, Copyright 2003 Holger Schurig
 
-import os, re, fcntl
+import os, re
 import bb
 from   bb import data
 from   bb import persist_data
 
-try:
-    import cPickle as pickle
-except ImportError:
-    import pickle
-
 class FetchError(Exception):
     """Exception raised when a download fails"""
 
@@ -65,7 +60,6 @@ def uri_replace(uri, uri_find, uri_replace, d):
         result_decoded[loc] = uri_decoded[loc]
         import types
         if type(i) == types.StringType:
-            import re
             if (re.match(i, uri_decoded[loc])):
                 result_decoded[loc] = re.sub(i, uri_replace_decoded[loc], uri_decoded[loc])
                 if uri_find_decoded.index(i) == 2:
index b23e9eef8683ef11b3d27ceaf558940659f02410..b27fb63d072c42a88c53dc676bc87af7daba5ef5 100644 (file)
@@ -29,7 +29,6 @@ import bb
 from bb import data
 from bb.fetch import Fetch
 from bb.fetch import FetchError
-from bb.fetch import MissingParameterError
 from bb.fetch import runfetchcmd
 
 class Bzr(Fetch):
index aa55ad8bf60faed67005e3b36db5ac3989284fd2..d8bd4eaf75e6a90aae278a655d3b4ac5aa58300f 100644 (file)
@@ -26,7 +26,7 @@ BitBake build tools.
 #Based on functions from the base bb module, Copyright 2003 Holger Schurig
 #
 
-import os, re
+import os
 import bb
 from   bb import data
 from   bb.fetch import Fetch
index 010a4f57a25ea404e8132011ab6b16e3b8b28897..6456403e14cfcd8dea3157b8ea24edd29b1d0011 100644 (file)
@@ -20,11 +20,10 @@ BitBake 'Fetch' git implementation
 # with this program; if not, write to the Free Software Foundation, Inc.,
 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
-import os, re
+import os
 import bb
 from   bb    import data
 from   bb.fetch import Fetch
-from   bb.fetch import FetchError
 from   bb.fetch import runfetchcmd
 
 class Git(Fetch):
@@ -37,9 +36,12 @@ class Git(Fetch):
 
     def localpath(self, url, ud, d):
 
-        ud.proto = "rsync"
         if 'protocol' in ud.parm:
             ud.proto = ud.parm['protocol']
+        elif not ud.host:
+            ud.proto = 'file'
+        else:
+            ud.proto = "rsync"
 
         ud.branch = ud.parm.get("branch", "master")
 
@@ -49,12 +51,9 @@ class Git(Fetch):
         elif tag:
             ud.tag = tag
 
-        if not ud.tag:
+        if not ud.tag or ud.tag == "master":
             ud.tag = self.latest_revision(url, ud, d)  
 
-        if ud.tag == "master":
-            ud.tag = self.latest_revision(url, ud, d)
-
         ud.localfile = data.expand('git_%s%s_%s.tar.gz' % (ud.host, ud.path.replace('/', '.'), ud.tag), d)
 
         return os.path.join(data.getVar("DL_DIR", d, True), ud.localfile)
@@ -90,11 +89,12 @@ class Git(Fetch):
 
         os.chdir(repodir)
         # Remove all but the .git directory
-        runfetchcmd("rm * -Rf", d)
-        runfetchcmd("git fetch %s://%s%s%s %s" % (ud.proto, username, ud.host, ud.path, ud.branch), d)
-        runfetchcmd("git fetch --tags %s://%s%s%s" % (ud.proto, username, ud.host, ud.path), d)
-        runfetchcmd("git prune-packed", d)
-        runfetchcmd("git pack-redundant --all | xargs -r rm", d)
+        if not self._contains_ref(ud.tag, d):
+            runfetchcmd("rm * -Rf", d)
+            runfetchcmd("git fetch %s://%s%s%s %s" % (ud.proto, username, ud.host, ud.path, ud.branch), d)
+            runfetchcmd("git fetch --tags %s://%s%s%s" % (ud.proto, username, ud.host, ud.path), d)
+            runfetchcmd("git prune-packed", d)
+            runfetchcmd("git pack-redundant --all | xargs -r rm", d)
 
         os.chdir(repodir)
         mirror_tarballs = data.getVar("BB_GENERATE_MIRROR_TARBALLS", d, True)
@@ -120,6 +120,10 @@ class Git(Fetch):
     def suppports_srcrev(self):
         return True
 
+    def _contains_ref(self, tag, d):
+        output = runfetchcmd("git log --pretty=oneline -n 1 %s -- 2> /dev/null | wc -l" % tag, d, quiet=True)
+        return output.split()[0] != "0"
+
     def _revision_key(self, url, ud, d):
         """
         Return a unique key for the url
index b87fd0fbe514c6c650e2b76f82eeb2dfcdb61ffe..f53be8b20bc69f0ce80ea12aebb3c972321513cb 100644 (file)
@@ -24,7 +24,7 @@ BitBake 'Fetch' implementation for mercurial DRCS (hg).
 #
 # Based on functions from the base bb module, Copyright 2003 Holger Schurig
 
-import os, re
+import os
 import sys
 import bb
 from bb import data
@@ -123,9 +123,6 @@ class Hg(Fetch):
             bb.msg.debug(1, bb.msg.domain.Fetcher, "Running %s" % updatecmd)
             runfetchcmd(updatecmd, d)
 
-            updatecmd = self._buildhgcommand(ud, d, "update")
-            bb.msg.debug(1, bb.msg.domain.Fetcher, "Running %s" % updatecmd)
-            runfetchcmd(updatecmd, d)
         else:
             fetchcmd = self._buildhgcommand(ud, d, "fetch")
             bb.msg.note(1, bb.msg.domain.Fetcher, "Fetch " + loc)
@@ -134,6 +131,12 @@ class Hg(Fetch):
             os.chdir(ud.pkgdir)
             bb.msg.debug(1, bb.msg.domain.Fetcher, "Running %s" % fetchcmd)
             runfetchcmd(fetchcmd, d)
+       
+       # Even when we clone (fetch), we still need to update as hg's clone
+       # won't checkout the specified revision if its on a branch
+        updatecmd = self._buildhgcommand(ud, d, "update")
+        bb.msg.debug(1, bb.msg.domain.Fetcher, "Running %s" % updatecmd)
+        runfetchcmd(updatecmd, d)
 
         os.chdir(ud.pkgdir)
         try:
index 54d598ae890025d789b6872f29f4d99144f9271a..577774e5973c754a903bfe6deb78e6e2d54dfc9b 100644 (file)
@@ -25,7 +25,7 @@ BitBake build tools.
 #
 # Based on functions from the base bb module, Copyright 2003 Holger Schurig
 
-import os, re
+import os
 import bb
 from   bb import data
 from   bb.fetch import Fetch
index 2fb38b41902a1a3425b9f389da7739763d30d6b2..394f5a225331dcea7d91ebbe9daf27c32c679859 100644 (file)
@@ -25,12 +25,11 @@ BitBake build tools.
 #
 # Based on functions from the base bb module, Copyright 2003 Holger Schurig
 
-import os, re
+import os
 import bb
 from   bb import data
 from   bb.fetch import Fetch
 from   bb.fetch import FetchError
-from   bb.fetch import MissingParameterError
 
 class Perforce(Fetch):
     def supports(self, url, ud, d):
index 81a9892dcc8740f329cd2769f7fadf0d28f88b2e..68e6fdb1df86e143b217566bc4338dee8bd59ad2 100644 (file)
@@ -37,11 +37,9 @@ IETF secsh internet draft:
 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
 import re, os
-import bb
 from   bb import data
 from   bb.fetch import Fetch
 from   bb.fetch import FetchError
-from   bb.fetch import MissingParameterError
 
 
 __pattern__ = re.compile(r'''
index d863ccb6e098a219c9fb41d3e6df84b2b0263daa..4dfae1819b1b82b9d0c79635c4a5a18b1c6ef5e5 100644 (file)
@@ -25,7 +25,7 @@ This implementation is for svk. It is based on the svn implementation
 #
 # Based on functions from the base bb module, Copyright 2003 Holger Schurig
 
-import os, re
+import os
 import bb
 from   bb import data
 from   bb.fetch import Fetch
@@ -67,6 +67,7 @@ class Svk(Fetch):
 
         svkroot = ud.host + ud.path
 
+        # pyflakes claims date is not known... it looks right
         svkcmd = "svk co -r {%s} %s/%s" % (date, svkroot, ud.module)
 
         if ud.revision:
index aead1629b3416fdeee7d6a6f216c20ee25c1bcf3..eef9862a84abc27d3d93dc1d1b08e006db0d30f0 100644 (file)
@@ -23,7 +23,7 @@ BitBake 'Fetch' implementation for svn.
 #
 # Based on functions from the base bb module, Copyright 2003 Holger Schurig
 
-import os, re
+import os
 import sys
 import bb
 from   bb import data
index 442fc3e489f795fd335063316f038fedc1272db9..2a899c5808603bf6c1b623c2909ac01fa5f26ac0 100644 (file)
@@ -25,7 +25,7 @@ BitBake build tools.
 #
 # Based on functions from the base bb module, Copyright 2003 Holger Schurig
 
-import os, re
+import os
 import bb
 from   bb import data
 from   bb.fetch import Fetch
index 7aa0a27d252159f37f883a53810bc76f209220a9..7990833c2e0090c7263f43dc9edd6515f61730dd 100644 (file)
@@ -22,8 +22,8 @@ Message handling infrastructure for bitbake
 # with this program; if not, write to the Free Software Foundation, Inc.,
 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
-import sys, os, re, bb
-from bb import utils, event
+import sys, bb
+from bb import event
 
 debug_level = {}
 
index 3e842ee0cabbda638834995e8cd1e015404fe123..d0e71173df57747e242541043cb3856e65f70474 100644 (file)
@@ -21,7 +21,7 @@
 # with this program; if not, write to the Free Software Foundation, Inc.,
 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
-import os, re
+import re
 from bb import data, utils
 import bb
 
index 01452d2f3300e19ef8ae862e02ca2359fc6379f7..4f0996dad6ad5c8db1660078642bb94a05c59aa8 100644 (file)
@@ -23,7 +23,6 @@ Handles preparation and execution of a queue of tasks
 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
 from bb import msg, data, event, mkdirhier, utils
-from sets import Set 
 import bb, os, sys
 import signal
 import stat
@@ -544,8 +543,8 @@ class RunQueue:
 
             self.runq_fnid.append(taskData.tasks_fnid[task])
             self.runq_task.append(taskData.tasks_name[task])
-            self.runq_depends.append(Set(depends))
-            self.runq_revdeps.append(Set())
+            self.runq_depends.append(set(depends))
+            self.runq_revdeps.append(set())
 
             runq_build.append(0)
 
@@ -641,7 +640,7 @@ class RunQueue:
                 if maps[origdep] == -1:
                     bb.msg.fatal(bb.msg.domain.RunQueue, "Invalid mapping - Should never happen!")
                 newdeps.append(maps[origdep])
-            self.runq_depends[listid] = Set(newdeps)
+            self.runq_depends[listid] = set(newdeps)
 
         bb.msg.note(2, bb.msg.domain.RunQueue, "Assign Weightings")
 
index 9d47effd6971b89281ed95d573e107196af48623..2ab855b6449e8df1384570ba1d6b2f245710ea7b 100644 (file)
@@ -510,7 +510,7 @@ SRC_URI = ""
 
     def stage( self, params ):
         """Execute 'stage' on a providee"""
-        self.build( params, "stage" )
+        self.build( params, "populate_staging" )
     stage.usage = "<providee>"
 
     def status( self, params ):
index 64ab032c3c8829c9f0517296a281c92a2df5d66d..52a4f4e647f881e01ccd990a6bbc83eec0c8d15e 100644 (file)
@@ -23,8 +23,7 @@ Task data collection and handling
 # with this program; if not, write to the Free Software Foundation, Inc.,
 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
-from bb import data, event, mkdirhier, utils
-import bb, os
+import bb
 
 class TaskData:
     """
index 572cc4c7c8b8a4ca57631aa1725701e4ca2f93ab..f89e8eefd44db877cd66fe3b0fe462b48e1d7296 100644 (file)
@@ -20,9 +20,7 @@
 
 import gtk
 import gobject
-import gtk.glade
 import threading
-import urllib2
 import os
 import datetime
 import time
index 54d56c24529bf3cb8308e69344b2bd2d2fbcd51c..34f65d239600af3bf7838097ec1063298a818242 100644 (file)
@@ -20,7 +20,6 @@
 
 import gtk
 import gobject
-import gtk.glade
 
 class RunningBuildModel (gtk.TreeStore):
     (COL_TYPE, COL_PACKAGE, COL_TASK, COL_MESSAGE, COL_ICON, COL_ACTIVE) = (0, 1, 2, 3, 4, 5)
index 9d92fa0a087c34c5c8a917766f9f950f536955dc..0c559c7976d2c980a8bd7e11068373a0dcfdbcf9 100644 (file)
@@ -20,6 +20,7 @@
 import gobject
 import gtk
 import threading
+import xmlrpclib
 
 # Package Model
 (COL_PKG_NAME) = (0)
index 0118a356fafac1d538c0e24bc0facd454401ec61..94995d82dbca704465412abc21aa1abac06428a5 100644 (file)
@@ -20,8 +20,7 @@
 
 import gobject
 import gtk
-import threading
-import bb.ui.uihelper
+import xmlrpclib
 from bb.ui.crumbs.runningbuild import RunningBuildTreeView, RunningBuild
 
 def event_handle_idle_func (eventHandler, build):
index a6595df3f44002530501a7324ad0cdc0c6b9bfc7..a334c2977efa3ca55664831d97bcd8432a7e3f17 100644 (file)
 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
 import os
-import bb
-from bb import cooker
 
 import sys
-import time
 import itertools
 import xmlrpclib
 
index 3cac264648a0d99173f867affe3f6bbb2a482359..2cd7e8e6e71684611a8317c9273fcd6cc6aac327 100644 (file)
@@ -44,9 +44,9 @@
 
 """
 
-import os, sys, curses, time, random, threading, itertools, time
-from curses.textpad import Textbox
+import os, sys, curses, itertools, time
 import bb
+import xmlrpclib
 from bb import ui
 from bb.ui import uihelper
 
@@ -180,6 +180,7 @@ class NCursesUI:
         def __init__( self, x, y, width, height ):
             NCursesUI.Window.__init__( self, x, y, width, height )
 
+# put that to the top again from curses.textpad import Textbox
 #            self.textbox = Textbox( self.win )
 #            t = threading.Thread()
 #            t.run = self.textbox.edit
index a6a613f1cf621cb0f51383be805d83ed705e7412..dd34182c8de52e2f21497ba0aa1ab8c164b53426 100644 (file)
@@ -24,7 +24,6 @@ import gtk.glade
 import threading
 import urllib2
 import os
-import datetime
 
 from bb.ui.crumbs.buildmanager import BuildManager, BuildConfiguration
 from bb.ui.crumbs.buildmanager import BuildManagerTreeView
index 9d724d7fc56536c4103dad417f0519200909aa5e..23fdd0f9610aa0e6e4f1d2d3c139332a6355f560 100644 (file)
@@ -24,7 +24,7 @@ server and queue them for the UI to process. This process must be used to avoid
 client/server deadlocks.
 """
 
-import sys, socket, threading
+import socket, threading
 from SimpleXMLRPCServer import SimpleXMLRPCServer, SimpleXMLRPCRequestHandler
 
 class BBUIEventQueue:
@@ -37,8 +37,8 @@ class BBUIEventQueue:
         self.BBServer = BBServer
 
         self.t = threading.Thread()
-        self.t.setDaemon(True)\r
-        self.t.run = self.startCallbackHandler\r
+        self.t.setDaemon(True)
+        self.t.run = self.startCallbackHandler
         self.t.start()
 
     def getEvent(self):
@@ -72,7 +72,7 @@ class BBUIEventQueue:
     def startCallbackHandler(self):
 
         server = UIXMLRPCServer()
-        self.host, self.port = server.socket.getsockname()\r
+        self.host, self.port = server.socket.getsockname()
 
         server.register_function( self.system_quit, "event.quit" )
         server.register_function( self.queue_event, "event.send" )
@@ -85,7 +85,7 @@ class BBUIEventQueue:
             server.handle_request()
         server.server_close()
 
-    def system_quit( self ):\r
+    def system_quit( self ):
         """
         Shut down the callback thread
         """
@@ -97,11 +97,11 @@ class BBUIEventQueue:
 
 class UIXMLRPCServer (SimpleXMLRPCServer):
 
-    def __init__( self, interface = ("localhost", 0) ):\r
+    def __init__( self, interface = ("localhost", 0) ):
         self.quit = False
-        SimpleXMLRPCServer.__init__( self,\r
-                                    interface,\r
-                                    requestHandler=SimpleXMLRPCRequestHandler,\r
+        SimpleXMLRPCServer.__init__( self,
+                                    interface,
+                                    requestHandler=SimpleXMLRPCRequestHandler,
                                     logRequests=False, allow_none=True)
 
     def get_request(self):
@@ -123,5 +123,5 @@ class UIXMLRPCServer (SimpleXMLRPCServer):
         if request is None:
             return
         SimpleXMLRPCServer.process_request(self, request, client_address)
-\r
+
 
index 075eda0573af96bad37a8603506dab2f66259494..2a23436b65f8c8ccab869b5e910a9d566979c53d 100644 (file)
@@ -37,7 +37,7 @@ import xmlrpclib
 DEBUG = False
 
 from SimpleXMLRPCServer import SimpleXMLRPCServer, SimpleXMLRPCRequestHandler
-import os, sys, inspect, select
+import inspect, select
 
 class BitBakeServerCommands():
     def __init__(self, server, cooker):