command.py 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717
  1. """
  2. BitBake 'Command' module
  3. Provide an interface to interact with the bitbake server through 'commands'
  4. """
  5. # Copyright (C) 2006-2007 Richard Purdie
  6. #
  7. # SPDX-License-Identifier: GPL-2.0-only
  8. #
  9. """
  10. The bitbake server takes 'commands' from its UI/commandline.
  11. Commands are either synchronous or asynchronous.
  12. Async commands return data to the client in the form of events.
  13. Sync commands must only return data through the function return value
  14. and must not trigger events, directly or indirectly.
  15. Commands are queued in a CommandQueue
  16. """
  17. from collections import OrderedDict, defaultdict
  18. import bb.event
  19. import bb.cooker
  20. import bb.remotedata
  21. class DataStoreConnectionHandle(object):
  22. def __init__(self, dsindex=0):
  23. self.dsindex = dsindex
  24. class CommandCompleted(bb.event.Event):
  25. pass
  26. class CommandExit(bb.event.Event):
  27. def __init__(self, exitcode):
  28. bb.event.Event.__init__(self)
  29. self.exitcode = int(exitcode)
  30. class CommandFailed(CommandExit):
  31. def __init__(self, message):
  32. self.error = message
  33. CommandExit.__init__(self, 1)
  34. def __str__(self):
  35. return "Command execution failed: %s" % self.error
  36. class CommandError(Exception):
  37. pass
  38. class Command:
  39. """
  40. A queue of asynchronous commands for bitbake
  41. """
  42. def __init__(self, cooker):
  43. self.cooker = cooker
  44. self.cmds_sync = CommandsSync()
  45. self.cmds_async = CommandsAsync()
  46. self.remotedatastores = bb.remotedata.RemoteDatastores(cooker)
  47. # FIXME Add lock for this
  48. self.currentAsyncCommand = None
  49. def runCommand(self, commandline, ro_only = False):
  50. command = commandline.pop(0)
  51. if hasattr(CommandsSync, command):
  52. # Can run synchronous commands straight away
  53. command_method = getattr(self.cmds_sync, command)
  54. if ro_only:
  55. if not hasattr(command_method, 'readonly') or not getattr(command_method, 'readonly'):
  56. return None, "Not able to execute not readonly commands in readonly mode"
  57. try:
  58. self.cooker.process_inotify_updates()
  59. if getattr(command_method, 'needconfig', True):
  60. self.cooker.updateCacheSync()
  61. result = command_method(self, commandline)
  62. except CommandError as exc:
  63. return None, exc.args[0]
  64. except (Exception, SystemExit):
  65. import traceback
  66. return None, traceback.format_exc()
  67. else:
  68. return result, None
  69. if self.currentAsyncCommand is not None:
  70. return None, "Busy (%s in progress)" % self.currentAsyncCommand[0]
  71. if command not in CommandsAsync.__dict__:
  72. return None, "No such command"
  73. self.currentAsyncCommand = (command, commandline)
  74. self.cooker.configuration.server_register_idlecallback(self.cooker.runCommands, self.cooker)
  75. return True, None
  76. def runAsyncCommand(self):
  77. try:
  78. self.cooker.process_inotify_updates()
  79. if self.cooker.state in (bb.cooker.state.error, bb.cooker.state.shutdown, bb.cooker.state.forceshutdown):
  80. # updateCache will trigger a shutdown of the parser
  81. # and then raise BBHandledException triggering an exit
  82. self.cooker.updateCache()
  83. return False
  84. if self.currentAsyncCommand is not None:
  85. (command, options) = self.currentAsyncCommand
  86. commandmethod = getattr(CommandsAsync, command)
  87. needcache = getattr( commandmethod, "needcache" )
  88. if needcache and self.cooker.state != bb.cooker.state.running:
  89. self.cooker.updateCache()
  90. return True
  91. else:
  92. commandmethod(self.cmds_async, self, options)
  93. return False
  94. else:
  95. return False
  96. except KeyboardInterrupt as exc:
  97. self.finishAsyncCommand("Interrupted")
  98. return False
  99. except SystemExit as exc:
  100. arg = exc.args[0]
  101. if isinstance(arg, str):
  102. self.finishAsyncCommand(arg)
  103. else:
  104. self.finishAsyncCommand("Exited with %s" % arg)
  105. return False
  106. except Exception as exc:
  107. import traceback
  108. if isinstance(exc, bb.BBHandledException):
  109. self.finishAsyncCommand("")
  110. else:
  111. self.finishAsyncCommand(traceback.format_exc())
  112. return False
  113. def finishAsyncCommand(self, msg=None, code=None):
  114. if msg or msg == "":
  115. bb.event.fire(CommandFailed(msg), self.cooker.data)
  116. elif code:
  117. bb.event.fire(CommandExit(code), self.cooker.data)
  118. else:
  119. bb.event.fire(CommandCompleted(), self.cooker.data)
  120. self.currentAsyncCommand = None
  121. self.cooker.finishcommand()
  122. def reset(self):
  123. self.remotedatastores = bb.remotedata.RemoteDatastores(self.cooker)
  124. def split_mc_pn(pn):
  125. if pn.startswith("multiconfig:"):
  126. _, mc, pn = pn.split(":", 2)
  127. return (mc, pn)
  128. return ('', pn)
  129. class CommandsSync:
  130. """
  131. A class of synchronous commands
  132. These should run quickly so as not to hurt interactive performance.
  133. These must not influence any running synchronous command.
  134. """
  135. def stateShutdown(self, command, params):
  136. """
  137. Trigger cooker 'shutdown' mode
  138. """
  139. command.cooker.shutdown(False)
  140. def stateForceShutdown(self, command, params):
  141. """
  142. Stop the cooker
  143. """
  144. command.cooker.shutdown(True)
  145. def getAllKeysWithFlags(self, command, params):
  146. """
  147. Returns a dump of the global state. Call with
  148. variable flags to be retrieved as params.
  149. """
  150. flaglist = params[0]
  151. return command.cooker.getAllKeysWithFlags(flaglist)
  152. getAllKeysWithFlags.readonly = True
  153. def getVariable(self, command, params):
  154. """
  155. Read the value of a variable from data
  156. """
  157. varname = params[0]
  158. expand = True
  159. if len(params) > 1:
  160. expand = (params[1] == "True")
  161. return command.cooker.data.getVar(varname, expand)
  162. getVariable.readonly = True
  163. def setVariable(self, command, params):
  164. """
  165. Set the value of variable in data
  166. """
  167. varname = params[0]
  168. value = str(params[1])
  169. command.cooker.extraconfigdata[varname] = value
  170. command.cooker.data.setVar(varname, value)
  171. def getSetVariable(self, command, params):
  172. """
  173. Read the value of a variable from data and set it into the datastore
  174. which effectively expands and locks the value.
  175. """
  176. varname = params[0]
  177. result = self.getVariable(command, params)
  178. command.cooker.data.setVar(varname, result)
  179. return result
  180. def setConfig(self, command, params):
  181. """
  182. Set the value of variable in configuration
  183. """
  184. varname = params[0]
  185. value = str(params[1])
  186. setattr(command.cooker.configuration, varname, value)
  187. def enableDataTracking(self, command, params):
  188. """
  189. Enable history tracking for variables
  190. """
  191. command.cooker.enableDataTracking()
  192. def disableDataTracking(self, command, params):
  193. """
  194. Disable history tracking for variables
  195. """
  196. command.cooker.disableDataTracking()
  197. def setPrePostConfFiles(self, command, params):
  198. prefiles = params[0].split()
  199. postfiles = params[1].split()
  200. command.cooker.configuration.prefile = prefiles
  201. command.cooker.configuration.postfile = postfiles
  202. setPrePostConfFiles.needconfig = False
  203. def matchFile(self, command, params):
  204. fMatch = params[0]
  205. return command.cooker.matchFile(fMatch)
  206. matchFile.needconfig = False
  207. def getUIHandlerNum(self, command, params):
  208. return bb.event.get_uihandler()
  209. getUIHandlerNum.needconfig = False
  210. getUIHandlerNum.readonly = True
  211. def setEventMask(self, command, params):
  212. handlerNum = params[0]
  213. llevel = params[1]
  214. debug_domains = params[2]
  215. mask = params[3]
  216. return bb.event.set_UIHmask(handlerNum, llevel, debug_domains, mask)
  217. setEventMask.needconfig = False
  218. setEventMask.readonly = True
  219. def setFeatures(self, command, params):
  220. """
  221. Set the cooker features to include the passed list of features
  222. """
  223. features = params[0]
  224. command.cooker.setFeatures(features)
  225. setFeatures.needconfig = False
  226. # although we change the internal state of the cooker, this is transparent since
  227. # we always take and leave the cooker in state.initial
  228. setFeatures.readonly = True
  229. def updateConfig(self, command, params):
  230. options = params[0]
  231. environment = params[1]
  232. cmdline = params[2]
  233. command.cooker.updateConfigOpts(options, environment, cmdline)
  234. updateConfig.needconfig = False
  235. def parseConfiguration(self, command, params):
  236. """Instruct bitbake to parse its configuration
  237. NOTE: it is only necessary to call this if you aren't calling any normal action
  238. (otherwise parsing is taken care of automatically)
  239. """
  240. command.cooker.parseConfiguration()
  241. parseConfiguration.needconfig = False
  242. def getLayerPriorities(self, command, params):
  243. command.cooker.parseConfiguration()
  244. ret = []
  245. # regex objects cannot be marshalled by xmlrpc
  246. for collection, pattern, regex, pri in command.cooker.bbfile_config_priorities:
  247. ret.append((collection, pattern, regex.pattern, pri))
  248. return ret
  249. getLayerPriorities.readonly = True
  250. def getRecipes(self, command, params):
  251. try:
  252. mc = params[0]
  253. except IndexError:
  254. mc = ''
  255. return list(command.cooker.recipecaches[mc].pkg_pn.items())
  256. getRecipes.readonly = True
  257. def getRecipeDepends(self, command, params):
  258. try:
  259. mc = params[0]
  260. except IndexError:
  261. mc = ''
  262. return list(command.cooker.recipecaches[mc].deps.items())
  263. getRecipeDepends.readonly = True
  264. def getRecipeVersions(self, command, params):
  265. try:
  266. mc = params[0]
  267. except IndexError:
  268. mc = ''
  269. return command.cooker.recipecaches[mc].pkg_pepvpr
  270. getRecipeVersions.readonly = True
  271. def getRecipeProvides(self, command, params):
  272. try:
  273. mc = params[0]
  274. except IndexError:
  275. mc = ''
  276. return command.cooker.recipecaches[mc].fn_provides
  277. getRecipeProvides.readonly = True
  278. def getRecipePackages(self, command, params):
  279. try:
  280. mc = params[0]
  281. except IndexError:
  282. mc = ''
  283. return command.cooker.recipecaches[mc].packages
  284. getRecipePackages.readonly = True
  285. def getRecipePackagesDynamic(self, command, params):
  286. try:
  287. mc = params[0]
  288. except IndexError:
  289. mc = ''
  290. return command.cooker.recipecaches[mc].packages_dynamic
  291. getRecipePackagesDynamic.readonly = True
  292. def getRProviders(self, command, params):
  293. try:
  294. mc = params[0]
  295. except IndexError:
  296. mc = ''
  297. return command.cooker.recipecaches[mc].rproviders
  298. getRProviders.readonly = True
  299. def getRuntimeDepends(self, command, params):
  300. ret = []
  301. try:
  302. mc = params[0]
  303. except IndexError:
  304. mc = ''
  305. rundeps = command.cooker.recipecaches[mc].rundeps
  306. for key, value in rundeps.items():
  307. if isinstance(value, defaultdict):
  308. value = dict(value)
  309. ret.append((key, value))
  310. return ret
  311. getRuntimeDepends.readonly = True
  312. def getRuntimeRecommends(self, command, params):
  313. ret = []
  314. try:
  315. mc = params[0]
  316. except IndexError:
  317. mc = ''
  318. runrecs = command.cooker.recipecaches[mc].runrecs
  319. for key, value in runrecs.items():
  320. if isinstance(value, defaultdict):
  321. value = dict(value)
  322. ret.append((key, value))
  323. return ret
  324. getRuntimeRecommends.readonly = True
  325. def getRecipeInherits(self, command, params):
  326. try:
  327. mc = params[0]
  328. except IndexError:
  329. mc = ''
  330. return command.cooker.recipecaches[mc].inherits
  331. getRecipeInherits.readonly = True
  332. def getBbFilePriority(self, command, params):
  333. try:
  334. mc = params[0]
  335. except IndexError:
  336. mc = ''
  337. return command.cooker.recipecaches[mc].bbfile_priority
  338. getBbFilePriority.readonly = True
  339. def getDefaultPreference(self, command, params):
  340. try:
  341. mc = params[0]
  342. except IndexError:
  343. mc = ''
  344. return command.cooker.recipecaches[mc].pkg_dp
  345. getDefaultPreference.readonly = True
  346. def getSkippedRecipes(self, command, params):
  347. # Return list sorted by reverse priority order
  348. import bb.cache
  349. skipdict = OrderedDict(sorted(command.cooker.skiplist.items(),
  350. key=lambda x: (-command.cooker.collection.calc_bbfile_priority(bb.cache.virtualfn2realfn(x[0])[0]), x[0])))
  351. return list(skipdict.items())
  352. getSkippedRecipes.readonly = True
  353. def getOverlayedRecipes(self, command, params):
  354. return list(command.cooker.collection.overlayed.items())
  355. getOverlayedRecipes.readonly = True
  356. def getFileAppends(self, command, params):
  357. fn = params[0]
  358. return command.cooker.collection.get_file_appends(fn)
  359. getFileAppends.readonly = True
  360. def getAllAppends(self, command, params):
  361. return command.cooker.collection.bbappends
  362. getAllAppends.readonly = True
  363. def findProviders(self, command, params):
  364. try:
  365. mc = params[0]
  366. except IndexError:
  367. mc = ''
  368. return command.cooker.findProviders(mc)
  369. findProviders.readonly = True
  370. def findBestProvider(self, command, params):
  371. (mc, pn) = split_mc_pn(params[0])
  372. return command.cooker.findBestProvider(pn, mc)
  373. findBestProvider.readonly = True
  374. def allProviders(self, command, params):
  375. try:
  376. mc = params[0]
  377. except IndexError:
  378. mc = ''
  379. return list(bb.providers.allProviders(command.cooker.recipecaches[mc]).items())
  380. allProviders.readonly = True
  381. def getRuntimeProviders(self, command, params):
  382. rprovide = params[0]
  383. try:
  384. mc = params[1]
  385. except IndexError:
  386. mc = ''
  387. all_p = bb.providers.getRuntimeProviders(command.cooker.recipecaches[mc], rprovide)
  388. if all_p:
  389. best = bb.providers.filterProvidersRunTime(all_p, rprovide,
  390. command.cooker.data,
  391. command.cooker.recipecaches[mc])[0][0]
  392. else:
  393. best = None
  394. return all_p, best
  395. getRuntimeProviders.readonly = True
  396. def dataStoreConnectorCmd(self, command, params):
  397. dsindex = params[0]
  398. method = params[1]
  399. args = params[2]
  400. kwargs = params[3]
  401. d = command.remotedatastores[dsindex]
  402. ret = getattr(d, method)(*args, **kwargs)
  403. if isinstance(ret, bb.data_smart.DataSmart):
  404. idx = command.remotedatastores.store(ret)
  405. return DataStoreConnectionHandle(idx)
  406. return ret
  407. def dataStoreConnectorVarHistCmd(self, command, params):
  408. dsindex = params[0]
  409. method = params[1]
  410. args = params[2]
  411. kwargs = params[3]
  412. d = command.remotedatastores[dsindex].varhistory
  413. return getattr(d, method)(*args, **kwargs)
  414. def dataStoreConnectorIncHistCmd(self, command, params):
  415. dsindex = params[0]
  416. method = params[1]
  417. args = params[2]
  418. kwargs = params[3]
  419. d = command.remotedatastores[dsindex].inchistory
  420. return getattr(d, method)(*args, **kwargs)
  421. def dataStoreConnectorRelease(self, command, params):
  422. dsindex = params[0]
  423. if dsindex <= 0:
  424. raise CommandError('dataStoreConnectorRelease: invalid index %d' % dsindex)
  425. command.remotedatastores.release(dsindex)
  426. def parseRecipeFile(self, command, params):
  427. """
  428. Parse the specified recipe file (with or without bbappends)
  429. and return a datastore object representing the environment
  430. for the recipe.
  431. """
  432. fn = params[0]
  433. appends = params[1]
  434. appendlist = params[2]
  435. if len(params) > 3:
  436. config_data = command.remotedatastores[params[3]]
  437. else:
  438. config_data = None
  439. if appends:
  440. if appendlist is not None:
  441. appendfiles = appendlist
  442. else:
  443. appendfiles = command.cooker.collection.get_file_appends(fn)
  444. else:
  445. appendfiles = []
  446. # We are calling bb.cache locally here rather than on the server,
  447. # but that's OK because it doesn't actually need anything from
  448. # the server barring the global datastore (which we have a remote
  449. # version of)
  450. if config_data:
  451. # We have to use a different function here if we're passing in a datastore
  452. # NOTE: we took a copy above, so we don't do it here again
  453. envdata = bb.cache.parse_recipe(config_data, fn, appendfiles)['']
  454. else:
  455. # Use the standard path
  456. parser = bb.cache.NoCache(command.cooker.databuilder)
  457. envdata = parser.loadDataFull(fn, appendfiles)
  458. idx = command.remotedatastores.store(envdata)
  459. return DataStoreConnectionHandle(idx)
  460. parseRecipeFile.readonly = True
  461. class CommandsAsync:
  462. """
  463. A class of asynchronous commands
  464. These functions communicate via generated events.
  465. Any function that requires metadata parsing should be here.
  466. """
  467. def buildFile(self, command, params):
  468. """
  469. Build a single specified .bb file
  470. """
  471. bfile = params[0]
  472. task = params[1]
  473. if len(params) > 2:
  474. internal = params[2]
  475. else:
  476. internal = False
  477. if internal:
  478. command.cooker.buildFileInternal(bfile, task, fireevents=False, quietlog=True)
  479. else:
  480. command.cooker.buildFile(bfile, task)
  481. buildFile.needcache = False
  482. def buildTargets(self, command, params):
  483. """
  484. Build a set of targets
  485. """
  486. pkgs_to_build = params[0]
  487. task = params[1]
  488. command.cooker.buildTargets(pkgs_to_build, task)
  489. buildTargets.needcache = True
  490. def generateDepTreeEvent(self, command, params):
  491. """
  492. Generate an event containing the dependency information
  493. """
  494. pkgs_to_build = params[0]
  495. task = params[1]
  496. command.cooker.generateDepTreeEvent(pkgs_to_build, task)
  497. command.finishAsyncCommand()
  498. generateDepTreeEvent.needcache = True
  499. def generateDotGraph(self, command, params):
  500. """
  501. Dump dependency information to disk as .dot files
  502. """
  503. pkgs_to_build = params[0]
  504. task = params[1]
  505. command.cooker.generateDotGraphFiles(pkgs_to_build, task)
  506. command.finishAsyncCommand()
  507. generateDotGraph.needcache = True
  508. def generateTargetsTree(self, command, params):
  509. """
  510. Generate a tree of buildable targets.
  511. If klass is provided ensure all recipes that inherit the class are
  512. included in the package list.
  513. If pkg_list provided use that list (plus any extras brought in by
  514. klass) rather than generating a tree for all packages.
  515. """
  516. klass = params[0]
  517. pkg_list = params[1]
  518. command.cooker.generateTargetsTree(klass, pkg_list)
  519. command.finishAsyncCommand()
  520. generateTargetsTree.needcache = True
  521. def findConfigFiles(self, command, params):
  522. """
  523. Find config files which provide appropriate values
  524. for the passed configuration variable. i.e. MACHINE
  525. """
  526. varname = params[0]
  527. command.cooker.findConfigFiles(varname)
  528. command.finishAsyncCommand()
  529. findConfigFiles.needcache = False
  530. def findFilesMatchingInDir(self, command, params):
  531. """
  532. Find implementation files matching the specified pattern
  533. in the requested subdirectory of a BBPATH
  534. """
  535. pattern = params[0]
  536. directory = params[1]
  537. command.cooker.findFilesMatchingInDir(pattern, directory)
  538. command.finishAsyncCommand()
  539. findFilesMatchingInDir.needcache = False
  540. def findConfigFilePath(self, command, params):
  541. """
  542. Find the path of the requested configuration file
  543. """
  544. configfile = params[0]
  545. command.cooker.findConfigFilePath(configfile)
  546. command.finishAsyncCommand()
  547. findConfigFilePath.needcache = False
  548. def showVersions(self, command, params):
  549. """
  550. Show the currently selected versions
  551. """
  552. command.cooker.showVersions()
  553. command.finishAsyncCommand()
  554. showVersions.needcache = True
  555. def showEnvironmentTarget(self, command, params):
  556. """
  557. Print the environment of a target recipe
  558. (needs the cache to work out which recipe to use)
  559. """
  560. pkg = params[0]
  561. command.cooker.showEnvironment(None, pkg)
  562. command.finishAsyncCommand()
  563. showEnvironmentTarget.needcache = True
  564. def showEnvironment(self, command, params):
  565. """
  566. Print the standard environment
  567. or if specified the environment for a specified recipe
  568. """
  569. bfile = params[0]
  570. command.cooker.showEnvironment(bfile)
  571. command.finishAsyncCommand()
  572. showEnvironment.needcache = False
  573. def parseFiles(self, command, params):
  574. """
  575. Parse the .bb files
  576. """
  577. command.cooker.updateCache()
  578. command.finishAsyncCommand()
  579. parseFiles.needcache = True
  580. def compareRevisions(self, command, params):
  581. """
  582. Parse the .bb files
  583. """
  584. if bb.fetch.fetcher_compare_revisions(command.cooker.data):
  585. command.finishAsyncCommand(code=1)
  586. else:
  587. command.finishAsyncCommand()
  588. compareRevisions.needcache = True
  589. def triggerEvent(self, command, params):
  590. """
  591. Trigger a certain event
  592. """
  593. event = params[0]
  594. bb.event.fire(eval(event), command.cooker.data)
  595. command.currentAsyncCommand = None
  596. triggerEvent.needcache = False
  597. def resetCooker(self, command, params):
  598. """
  599. Reset the cooker to its initial state, thus forcing a reparse for
  600. any async command that has the needcache property set to True
  601. """
  602. command.cooker.reset()
  603. command.finishAsyncCommand()
  604. resetCooker.needcache = False
  605. def clientComplete(self, command, params):
  606. """
  607. Do the right thing when the controlling client exits
  608. """
  609. command.cooker.clientComplete()
  610. command.finishAsyncCommand()
  611. clientComplete.needcache = False
  612. def findSigInfo(self, command, params):
  613. """
  614. Find signature info files via the signature generator
  615. """
  616. pn = params[0]
  617. taskname = params[1]
  618. sigs = params[2]
  619. res = bb.siggen.find_siginfo(pn, taskname, sigs, command.cooker.data)
  620. bb.event.fire(bb.event.FindSigInfoResult(res), command.cooker.data)
  621. command.finishAsyncCommand()
  622. findSigInfo.needcache = False