[OE-core] [PATCH] smartpm: make "smart query/info" search package name in Provides too.

Zhou, Li li.zhou at windriver.com
Mon Jul 4 07:11:43 UTC 2016


Ping

On 06/22/2016 01:19 PM, Li Zhou wrote:
> "smart query glibc" or "smart info glibc" will get result as:
> "error: 'glibc' matches no packages".
> While "smart install glibc" can get result as:
> "libc6-xxx (for glibc) is already installed".
> Here change "smart query/info" to search package name in Provides too,
> and one result example is: "smart query glibc" gets the same result
> with "smart query libc6".
>
> Signed-off-by: Li Zhou <li.zhou at windriver.com>
> ---
>   ...e-smart-query-info-search-package-name-in.patch | 51 ++++++++++++++++++++++
>   meta/recipes-devtools/python/python-smartpm_git.bb |  1 +
>   2 files changed, 52 insertions(+)
>   create mode 100644 meta/recipes-devtools/python/python-smartpm/0001-smartpm-make-smart-query-info-search-package-name-in.patch
>
> diff --git a/meta/recipes-devtools/python/python-smartpm/0001-smartpm-make-smart-query-info-search-package-name-in.patch b/meta/recipes-devtools/python/python-smartpm/0001-smartpm-make-smart-query-info-search-package-name-in.patch
> new file mode 100644
> index 0000000..75389c3
> --- /dev/null
> +++ b/meta/recipes-devtools/python/python-smartpm/0001-smartpm-make-smart-query-info-search-package-name-in.patch
> @@ -0,0 +1,51 @@
> +From 7b7b7c120dd20f825ec886a9b90b1d4291d1d332 Mon Sep 17 00:00:00 2001
> +From: Li Zhou <li.zhou at windriver.com>
> +Date: Wed, 22 Jun 2016 11:09:20 +0800
> +Subject: [PATCH] smartpm: make "smart query/info" search package name in
> + Provides too.
> +
> +"smart query glibc" or "smart info glibc" will get result as:
> +"error: 'glibc' matches no packages".
> +While "smart install glibc" can get result as:
> +"libc6-xxx (for glibc) is already installed".
> +Here change "smart query/info" to search package name in Provides too,
> +and one result example is: "smart query glibc" gets the same result
> +with "smart query libc6".
> +
> +Upstream-Status: Pending
> +
> +Signed-off-by: Li Zhou <li.zhou at windriver.com>
> +---
> + smart/commands/info.py  | 2 +-
> + smart/commands/query.py | 2 +-
> + 2 files changed, 2 insertions(+), 2 deletions(-)
> +
> +diff --git a/smart/commands/info.py b/smart/commands/info.py
> +index 59fbe98..85d05f9 100644
> +--- a/smart/commands/info.py
> ++++ b/smart/commands/info.py
> +@@ -75,7 +75,7 @@ def main(ctrl, opts, reloadchannels=True):
> +     if opts.args:
> +         pkgs = {}
> +         for arg in opts.args:
> +-            ratio, results, suggestions = ctrl.search(arg, addprovides=False)
> ++            ratio, results, suggestions = ctrl.search(arg)
> +
> +             if not results:
> +                 if suggestions:
> +diff --git a/smart/commands/query.py b/smart/commands/query.py
> +index b6f5697..22cb60f 100644
> +--- a/smart/commands/query.py
> ++++ b/smart/commands/query.py
> +@@ -165,7 +165,7 @@ def main(ctrl, opts, reloadchannels=True):
> +     else:
> +         packages = {}
> +         for arg in opts.args:
> +-            ratio, results, suggestions = ctrl.search(arg, addprovides=False)
> ++            ratio, results, suggestions = ctrl.search(arg)
> +             if not results:
> +                 if suggestions:
> +                     dct = {}
> +--
> +2.9.0
> +
> diff --git a/meta/recipes-devtools/python/python-smartpm_git.bb b/meta/recipes-devtools/python/python-smartpm_git.bb
> index d9a908d..b926f66 100644
> --- a/meta/recipes-devtools/python/python-smartpm_git.bb
> +++ b/meta/recipes-devtools/python/python-smartpm_git.bb
> @@ -23,6 +23,7 @@ SRC_URI = "\
>             file://smart-already-installed-message.patch \
>             file://smart-set-noprogress-for-pycurl.patch \
>             file://smart-cache.py-getPackages-matches-name-version.patch \
> +          file://0001-smartpm-make-smart-query-info-search-package-name-in.patch \
>            "
>   
>   SRCREV = "407a7eca766431257dcd1da15175cc36a1bb22d0"

-- 
Best Regards!
Zhou Li
Phone number: 86-10-84778511




More information about the Openembedded-core mailing list