summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch2/perforce.py
diff options
context:
space:
mode:
authorJoshua Watt <JPEWhacker@gmail.com>2021-02-09 09:50:21 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-02-10 23:48:16 +0000
commit75f87db413f3659fee18eff389b7b339b01cce15 (patch)
treee733135549b516c72c4f34172b6bbf865377fc76 /bitbake/lib/bb/fetch2/perforce.py
parent7283a0b3b6ca49d0d2e13593333a580ef10439a8 (diff)
downloadpoky-75f87db413f3659fee18eff389b7b339b01cce15.tar.gz
bitbake: logging: Make bitbake logger compatible with python logger
The bitbake logger overrode the definition of the debug() logging call to include a debug level, but this causes problems with code that may be using standard python logging, since the extra argument is interpreted differently. Instead, change the bitbake loggers debug() call to match the python logger call and add a debug2() and debug3() API to replace calls that were logging to a different debug level. [RP: Small fix to ensure bb.debug calls bbdebug()] (Bitbake rev: f68682a79d83e6399eb403f30a1f113516575f51) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/fetch2/perforce.py')
-rw-r--r--bitbake/lib/bb/fetch2/perforce.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/bitbake/lib/bb/fetch2/perforce.py b/bitbake/lib/bb/fetch2/perforce.py
index da6d337461..e2a41a4a12 100644
--- a/bitbake/lib/bb/fetch2/perforce.py
+++ b/bitbake/lib/bb/fetch2/perforce.py
@@ -90,16 +90,16 @@ class Perforce(FetchMethod):
90 p4port = d.getVar('P4PORT') 90 p4port = d.getVar('P4PORT')
91 91
92 if p4port: 92 if p4port:
93 logger.debug(1, 'Using recipe provided P4PORT: %s' % p4port) 93 logger.debug('Using recipe provided P4PORT: %s' % p4port)
94 ud.host = p4port 94 ud.host = p4port
95 else: 95 else:
96 logger.debug(1, 'Trying to use P4CONFIG to automatically set P4PORT...') 96 logger.debug('Trying to use P4CONFIG to automatically set P4PORT...')
97 ud.usingp4config = True 97 ud.usingp4config = True
98 p4cmd = '%s info | grep "Server address"' % ud.basecmd 98 p4cmd = '%s info | grep "Server address"' % ud.basecmd
99 bb.fetch2.check_network_access(d, p4cmd, ud.url) 99 bb.fetch2.check_network_access(d, p4cmd, ud.url)
100 ud.host = runfetchcmd(p4cmd, d, True) 100 ud.host = runfetchcmd(p4cmd, d, True)
101 ud.host = ud.host.split(': ')[1].strip() 101 ud.host = ud.host.split(': ')[1].strip()
102 logger.debug(1, 'Determined P4PORT to be: %s' % ud.host) 102 logger.debug('Determined P4PORT to be: %s' % ud.host)
103 if not ud.host: 103 if not ud.host:
104 raise FetchError('Could not determine P4PORT from P4CONFIG') 104 raise FetchError('Could not determine P4PORT from P4CONFIG')
105 105
@@ -208,7 +208,7 @@ class Perforce(FetchMethod):
208 for filename in p4fileslist: 208 for filename in p4fileslist:
209 item = filename.split(' - ') 209 item = filename.split(' - ')
210 lastaction = item[1].split() 210 lastaction = item[1].split()
211 logger.debug(1, 'File: %s Last Action: %s' % (item[0], lastaction[0])) 211 logger.debug('File: %s Last Action: %s' % (item[0], lastaction[0]))
212 if lastaction[0] == 'delete': 212 if lastaction[0] == 'delete':
213 continue 213 continue
214 filelist.append(item[0]) 214 filelist.append(item[0])
@@ -255,7 +255,7 @@ class Perforce(FetchMethod):
255 raise FetchError('Could not determine the latest perforce changelist') 255 raise FetchError('Could not determine the latest perforce changelist')
256 256
257 tipcset = tip.split(' ')[1] 257 tipcset = tip.split(' ')[1]
258 logger.debug(1, 'p4 tip found to be changelist %s' % tipcset) 258 logger.debug('p4 tip found to be changelist %s' % tipcset)
259 return tipcset 259 return tipcset
260 260
261 def sortable_revision(self, ud, d, name): 261 def sortable_revision(self, ud, d, name):