bitbake-devel.lists.openembedded.org archive mirror
 help / color / mirror / Atom feed
* [bitbake-devel] Perforce.py password with #
@ 2023-05-09 10:52 Katu Txakur
  0 siblings, 0 replies; only message in thread
From: Katu Txakur @ 2023-05-09 10:52 UTC (permalink / raw)
  To: bitbake-devel

[-- Attachment #1: Type: text/plain, Size: 3999 bytes --]

Hi,

Using kirkstone branch, I've been trying to follow the Perforce
documentation in
https://docs.yoctoproject.org/bitbake/2.4/bitbake-user-manual/bitbake-user-manual-fetching.html#perforce-fetcher-p4
and I've created the following recipe:

#######################################
DESCRIPTION = "Perforce fetch test"
LICENSE = "CLOSED"

SRCREV = "${AUTOREV}"
FETCHCMD_p4 = "/usr/local/bin/p4"
P4PASSWD = "mypassword#"
P4PORT = "ssl:myserver:1666"
P4USER = "myuser"
P4DEPOT = "path_to_my_depot"

SRC_URI = "p4://${P4USER}:${P4PASSWD}@${P4DEPOT}/..."

PV = "p4-${SRCPV}"
S = "${WORKDIR}/p4"
######################################

I get the following error because my password finishes with a #:

user@pc:~/yocto/kirkstone/build$ bitbake  p4-test
/usr/lib/python3/dist-packages/html5lib/_trie/_base.py:3:
DeprecationWarning: Using or importing the ABCs from 'collections' instead
of from 'collections.abc' is deprecated since Python 3.3, and in 3.10 it
will stop working
  from collections import Mapping
Loading cache: 100%
|##########################################################################################################################################################################|
Time: 0:00:00
Loaded 1628 entries from dependency cache.
ERROR: /home/user/yocto/kirkstone/layers/meta-mylayer/recipes-custom/p4/
p4-test_0.1.bb: Error executing a python function in <code>:
                                        | ETA:  --:--:--

The stack trace of python calls that resulted in this exception/failure was:
File: '<code>', lineno: 3, function: <module>

 0001:__anon_20__home_user_yocto_kirkstone_poky_meta_conf_machine_include_arm_feature_arm_thumb_inc(d)

 0002:__anon_32__home_user_yocto_kirkstone_poky_meta_classes_patch_bbclass(d)
 ***
0003:__anon_762__home_user_yocto_kirkstone_poky_meta_classes_base_bbclass(d)

 0004:__anon_1135__home_user_yocto_kirkstone_poky_meta_classes_insane_bbclass(d)

 0005:__anon_1442__home_user_yocto_kirkstone_poky_meta_classes_insane_bbclass(d)

 0006:__anon_252__home_user_yocto_kirkstone_poky_meta_classes_package_bbclass(d)

 0007:__anon_723__home_user_yocto_kirkstone_poky_meta_classes_package_rpm_bbclass(d)
File: '/home/user/yocto/kirkstone/poky/meta/classes/base.bbclass', lineno:
635, function:
__anon_762__home_user_yocto_kirkstone_poky_meta_classes_base_bbclass
     0631:
     0632:    needsrcrev = False
     0633:    srcuri = d.getVar('SRC_URI')
     0634:    for uri_string in srcuri.split():
 *** 0635:        uri = bb.fetch.URI(uri_string)
     0636:        # Also check downloadfilename as the URL path might not
be useful for sniffing
     0637:        path = uri.params.get("downloadfilename", uri.path)
     0638:
     0639:        # HTTP/FTP use the wget fetcher
File: '/home/user/yocto/kirkstone/poky/bitbake/lib/bb/fetch2/__init__.py',
lineno: 253, function: __init__
     0249:            self.relative = True
     0250:
     0251:        if not self.relative:
     0252:            self.hostname = urlp.hostname or ''
 *** 0253:            self.port = urlp.port
     0254:
     0255:            self.userinfo += urlp.username or ''
     0256:
     0257:            if urlp.password:
File: '/usr/lib/python3.8/urllib/parse.py', lineno: 177, function: port
     0173:            try:
     0174:                port = int(port, 10)
     0175:            except ValueError:
     0176:                message = f'Port could not be cast to integer
value as {port!r}'
 *** 0177:                raise ValueError(message) from None
     0178:            if not ( 0 <= port <= 65535):
     0179:                raise ValueError("Port out of range 0-65535")
     0180:        return port
     0181:
Exception: ValueError: Port could not be cast to integer value as
'mypassword'

ERROR: Parsing halted due to errors, see error messages above

Summary: There were 2 ERROR messages, returning a non-zero exit code.

Note that in the Exception, the ValueError tries to parse my password,
without the # as the port number.

Thanks,
Katu

[-- Attachment #2: Type: text/html, Size: 5084 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-05-09 10:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-09 10:52 [bitbake-devel] Perforce.py password with # Katu Txakur

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).