bitbake-devel.lists.openembedded.org archive mirror
 help / color / mirror / Atom feed
From: Katu Txakur <katutxakurra@gmail.com>
To: bitbake-devel@lists.openembedded.org
Subject: [bitbake-devel] Perforce.py password with #
Date: Tue, 9 May 2023 12:52:00 +0200	[thread overview]
Message-ID: <CAM1ZcoXg6Sj7Y4Dd_7N3qFeKxqa5bktGP6G0JcG8qsL-aRN7DQ@mail.gmail.com> (raw)

[-- 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 --]

                 reply	other threads:[~2023-05-09 10:52 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=CAM1ZcoXg6Sj7Y4Dd_7N3qFeKxqa5bktGP6G0JcG8qsL-aRN7DQ@mail.gmail.com \
    --to=katutxakurra@gmail.com \
    --cc=bitbake-devel@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;
as well as URLs for NNTP newsgroup(s).