Modify fetchers to warn user if "param" is used
cover Modify fetchers to warn user if "param" is used
Andrei Gherzan (5):
fetch2/bzr.py: Use "protocol" parameter and warn user if recipe is
using "proto"
fetch2/git.py: Use "protocol" parameter and warn user if recipe is
using "proto"
fetch2/hg.py: Use "protocol" parameter and warn user if recipe is
using "proto"
fetch2/osc.py: Use "protocol" parameter and warn user if recipe is
using "proto"
fetch2/svn.py: Use "protocol" parameter and warn user if recipe is
using "proto"
bitbake/lib/bb/fetch2/bzr.py | 7 ++++++- bitbake/lib/bb/fetch2/git.py | 4 ++++ bitbake/lib/bb/fetch2/hg.py | 7 ++++++- bitbake/lib/bb/fetch2/osc.py | 7 ++++++- bitbake/lib/bb/fetch2/svn.py | 7 ++++++- 5 files changed, 28 insertions(+), 4 deletions(-)
Signature · 1 line
1.7.9.5
PATCH 1/5 fetch2/bzr.py: Use "protocol" parameter and warn user if recipe is using "proto"
If SRC_URI uses the parameter "proto" while specifying the protocol, use this value but warn the user about this problem.
--- bitbake/lib/bb/fetch2/bzr.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
bitbake/lib/bb/fetch2/bzr.py +6 -1
@@ -60,7 +60,12 @@ class Bzr(FetchMethod): basecmd = data.expand('${FETCHCMD_bzr}', d) - proto = ud.parm.get('proto', 'http') + proto = ud.parm.get('protocol', 'http') + + if ud.parm.get('proto') is not None: + logger.warn('Update %s recipe to use "protocol" not "proto".', d.getVar('PN', True)) + # Use proto value for now + proto = ud.parm.get('proto') bzrroot = ud.host + ud.path
Signature · 1 line
1.7.9.5
PATCH 2/5 fetch2/git.py: Use "protocol" parameter and warn user if recipe is using "proto"
If SRC_URI uses the parameter "proto" while specifying the protocol, use this value but warn the user about this problem.
--- bitbake/lib/bb/fetch2/git.py | 4 ++++ 1 file changed, 4 insertions(+)
bitbake/lib/bb/fetch2/git.py +4 -0
@@ -92,6 +92,10 @@ class Git(FetchMethod): """ if 'protocol' in ud.parm: ud.proto = ud.parm['protocol'] + elif 'proto' in ud.parm: + logger.warn('Update %s recipe to use "protocol" not "proto".', d.getVar('PN', True)) + # Use proto value for now + ud.proto = ud.parm['proto'] elif not ud.host: ud.proto = 'file' else:
Signature · 1 line
1.7.9.5
PATCH 3/5 fetch2/hg.py: Use "protocol" parameter and warn user if recipe is using "proto"
In reply to Andrei GherzanIf SRC_URI uses the parameter "proto" while specifying the protocol, use this value but warn the user about this problem.
--- bitbake/lib/bb/fetch2/hg.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
bitbake/lib/bb/fetch2/hg.py +6 -1
@@ -82,7 +82,12 @@ class Hg(FetchMethod): basecmd = data.expand('${FETCHCMD_hg}', d) - proto = ud.parm.get('proto', 'http') + proto = ud.parm.get('protocol', 'http') + + if ud.parm.get('proto') is not None: + logger.warn('Update %s recipe to use "protocol" not "proto".', d.getVar('PN', True)) + # Use proto value for now + proto = ud.parm.get('proto') host = ud.host if proto == "file":
Signature · 1 line
1.7.9.5
PATCH 4/5 fetch2/osc.py: Use "protocol" parameter and warn user if recipe is using "proto"
In reply to Andrei GherzanIf SRC_URI uses the parameter "proto" while specifying the protocol, use this value but warn the user about this problem.
--- bitbake/lib/bb/fetch2/osc.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
bitbake/lib/bb/fetch2/osc.py +6 -1
@@ -57,7 +57,12 @@ class Osc(FetchMethod): basecmd = data.expand('${FETCHCMD_osc}', d) - proto = ud.parm.get('proto', 'ocs') + proto = ud.parm.get('protocol', 'ocs') + + if ud.parm.get('proto') is not None: + logger.warn('Update %s recipe to use "protocol" not "proto".', d.getVar('PN', True)) + # Use proto value for now + proto = ud.parm.get('proto') options = []
Signature · 1 line
1.7.9.5
PATCH 5/5 fetch2/svn.py: Use "protocol" parameter and warn user if recipe is using "proto"
In reply to Andrei GherzanIf SRC_URI uses the parameter "proto" while specifying the protocol, use this value but warn the user about this problem.
--- bitbake/lib/bb/fetch2/svn.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
bitbake/lib/bb/fetch2/svn.py +6 -1
@@ -71,7 +71,12 @@ class Svn(FetchMethod): command is "fetch", "update", "info" """ - proto = ud.parm.get('proto', 'svn') + proto = ud.parm.get('protocol', 'svn') + + if ud.parm.get('proto') is not None: + logger.warn('Update %s recipe to use "protocol" not "proto".', d.getVar('PN', True)) + # Use proto value for now + proto = ud.parm.get('proto') svn_rsh = None if proto == "svn+ssh" and "rsh" in ud.parm:
Signature · 1 line
1.7.9.5
Quoted 12 lines · Andrei Gherzan
Andrei Gherzan (5):
fetch2/bzr.py: Use "protocol" parameter and warn user if recipe is
using "proto"
fetch2/git.py: Use "protocol" parameter and warn user if recipe is
using "proto"
fetch2/hg.py: Use "protocol" parameter and warn user if recipe is
using "proto"
fetch2/osc.py: Use "protocol" parameter and warn user if recipe is
using "proto"
fetch2/svn.py: Use "protocol" parameter and warn user if recipe is
using "proto"
Quoted 6 lines
bitbake/lib/bb/fetch2/bzr.py | 7 ++++++- bitbake/lib/bb/fetch2/git.py | 4 ++++ bitbake/lib/bb/fetch2/hg.py | 7 ++++++- bitbake/lib/bb/fetch2/osc.py | 7 ++++++- bitbake/lib/bb/fetch2/svn.py | 7 ++++++- 5 files changed, 28 insertions(+), 4 deletions(-)
How about putting this check into __init__.py and then just setting the protocol parameter instead if its used? We can then change the backends just to use procotol right now.
Cheers,
Richard
Quoted 20 lines · Richard Purdie
Quoted 12 lines · Andrei Gherzan
Andrei Gherzan (5):
fetch2/bzr.py: Use "protocol" parameter and warn user if recipe is
using "proto"
fetch2/git.py: Use "protocol" parameter and warn user if recipe is
using "proto"
fetch2/hg.py: Use "protocol" parameter and warn user if recipe is
using "proto"
fetch2/osc.py: Use "protocol" parameter and warn user if recipe is
using "proto"
fetch2/svn.py: Use "protocol" parameter and warn user if recipe is
using "proto"Quoted 6 lines
bitbake/lib/bb/fetch2/bzr.py | 7 ++++++- bitbake/lib/bb/fetch2/git.py | 4 ++++ bitbake/lib/bb/fetch2/hg.py | 7 ++++++- bitbake/lib/bb/fetch2/osc.py | 7 ++++++- bitbake/lib/bb/fetch2/svn.py | 7 ++++++- 5 files changed, 28 insertions(+), 4 deletions(-)
Quoted 5 lines
How about putting this check into
__init__.pyand then just setting the protocol parameter instead if its used? We can then change the backends just to use procotol right now.
I can add the warning in init but how would i define the local proto value to the one defined with parameter "proto"?
@g
Quoted 34 lines · Andrei Gherzan
On Tue, Jul 10, 2012 at 4:33 PM, Richard Purdie <[email protected]> wrote:
On Tue, 2012-07-10 at 14:15 +0300, Andrei Gherzan wrote:
> Andrei Gherzan (5):
>fetch2/bzr.py: Use "protocol" parameter and warn user if
recipe is
> using "proto"
>fetch2/git.py: Use "protocol" parameter and warn user if
recipe is
> using "proto"
>fetch2/hg.py: Use "protocol" parameter and warn user if
recipe is
> using "proto"
>fetch2/osc.py: Use "protocol" parameter and warn user if
recipe is
> using "proto"
>fetch2/svn.py: Use "protocol" parameter and warn user if
recipe is
> using "proto"
>
>bitbake/lib/bb/fetch2/bzr.py| 7 ++++++-
>bitbake/lib/bb/fetch2/git.py| 4 ++++
>bitbake/lib/bb/fetch2/hg.py| 7 ++++++-
>bitbake/lib/bb/fetch2/osc.py| 7 ++++++-
>bitbake/lib/bb/fetch2/svn.py| 7 ++++++-
> 5 files changed, 28 insertions(+), 4 deletions(-)How about putting this check into
__init__.pyand then just setting the
protocol parameter instead if its used? We can then change the backends
just to use procotol right now.
Quoted 2 lines
I can add the warning in init but how would i define the local proto value to the one defined with parameter "proto"?
In FetchData::__init__(), add
proto = self.parm.get("proto", None) if proto and "protocol" not in self.param:
self.parm["protocol"] = proto
before urldata_init?
Cheers,
Richard
Quoted 40 lines · Richard Purdie
Quoted 34 lines · Andrei Gherzan
On Tue, Jul 10, 2012 at 4:33 PM, Richard Purdie <[email protected]> wrote:
On Tue, 2012-07-10 at 14:15 +0300, Andrei Gherzan wrote:
> Andrei Gherzan (5):
>fetch2/bzr.py: Use "protocol" parameter and warn user if
recipe is
> using "proto"
>fetch2/git.py: Use "protocol" parameter and warn user if
recipe is
> using "proto"
>fetch2/hg.py: Use "protocol" parameter and warn user if
recipe is
> using "proto"
>fetch2/osc.py: Use "protocol" parameter and warn user if
recipe is
> using "proto"
>fetch2/svn.py: Use "protocol" parameter and warn user if
recipe is
> using "proto"
>
>bitbake/lib/bb/fetch2/bzr.py| 7 ++++++-
>bitbake/lib/bb/fetch2/git.py| 4 ++++
>bitbake/lib/bb/fetch2/hg.py| 7 ++++++-
>bitbake/lib/bb/fetch2/osc.py| 7 ++++++-
>bitbake/lib/bb/fetch2/svn.py| 7 ++++++-
> 5 files changed, 28 insertions(+), 4 deletions(-)How about putting this check into
__init__.pyand then just setting the
protocol parameter instead if its used? We can then change the backends
just to use procotol right now.Quoted 2 lines
I can add the warning in init but how would i define the local proto value to the one defined with parameter "proto"?
In
FetchData::__init__(), add
Quoted 7 lines
proto =
self.parm.get("proto", None)if proto and "protocol" not in self.param:
self.parm["protocol"] = protobefore
urldata_init?Yes. It makes sense this way. V2 is on it's way.
@g