Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 304011 - Pkgcore support for eselect
Summary: Pkgcore support for eselect
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: eselect (show other bugs)
Hardware: All All
: High enhancement (vote)
Assignee: Gentoo eselect Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-08 14:32 UTC by Ulrich Müller
Modified: 2016-12-10 17:16 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
adds pkgcore support (0001-add-pkgcore-support.patch,3.41 KB, patch)
2011-05-30 02:02 UTC, Brian Harring (RETIRED)
Details | Diff
Fix pkgcore support (0001-Fix-pkgcore-support.patch,1.26 KB, patch)
2016-12-04 06:09 UTC, Ulrich Müller
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ulrich Müller gentoo-dev 2010-02-08 14:32:30 UTC
package-manager.bash supports only portage and paludis. We should have support for pkgcore too.
Comment 1 Ulrich Müller gentoo-dev 2010-10-26 08:21:07 UTC
@ferringb: Any news about this one? I can't do this without your help.
Comment 2 Brian Harring (RETIRED) gentoo-dev 2011-05-30 02:02:46 UTC
Created attachment 275057 [details, diff]
adds pkgcore support

This is reliant on pkgcore 0.6.3, which will be released w/in this week (likely the next few days).
Comment 3 Ulrich Müller gentoo-dev 2011-06-26 21:22:05 UTC
@@ -137,6 +142,7 @@ get_repo_news_dir() {
 	case $(package_manager) in
 		portage) echo "$(portageq get_repo_path \
 			"${ROOT:-/}" "${repo}")/metadata/news" ;;
+		pkgcore) portageq pinspect get_repo_news_path "${repo}" ;;
 		paludis) run_paludis print-repository-metadata ${repo} \
 			--raw-name newsdir --format '%v\n' ;;
 	esac

This doesn't look right to me. I guess it should be "pinspect portageq"?
Comment 4 Brian Harring (RETIRED) gentoo-dev 2011-06-27 01:22:16 UTC
should be pinspect portageq, yep.

Whoops. :)
Comment 5 Ulrich Müller gentoo-dev 2011-07-16 22:32:54 UTC
This is included in eselect-1.2.16.
Comment 6 Ulrich Müller gentoo-dev 2016-12-04 05:30:30 UTC
(In reply to Brian Harring from comment #2)
> Created attachment 275057 [details, diff] [details, diff]
> adds pkgcore support
> 
> This is reliant on pkgcore 0.6.3, which will be released w/in this week
> (likely the next few days).

With pkgcore-0.9.4, this doesn't appear to work anymore. Especially:

+               pkgcore) pinspect portageq get_repositories ;;

$ pinspect portageq get_repositories
pinspect portageq: error: argument subcommand: invalid choice: 'get_repositories' (choose from 'best_version', 'envvar', 'envvar2', 'get_repo_news_path', 'get_repo_path', 'get_repos', 'has_version', 'mass_best_version', 'match')

+               pkgcore) pinspect portageq get_repo_news_path "${repo}" ;;

$ pinspect portageq get_repo_news_path gentoo
pinspect: error: Parsing failed: while loading portage config
unsupported operand type(s) for +=: 'NoneType' and 'str'
Comment 7 Ulrich Müller gentoo-dev 2016-12-04 06:09:10 UTC
Created attachment 455042 [details, diff]
Fix pkgcore support

Is attached patch correct?

I am not entirely sure about get_repo_news_path. pinspect(1) says that [root] is optional but apparently it isn't.

   pinspect portageq get_repo_news_path
   synopsis
       pinspect portageq get_repo_news_path [-h]  [--version]  [--debug]  [-q]
       [-v] [--color BOOLEAN] [--eapi ATOM_KLS] [--use USE] [root] repo_id
Comment 8 Ulrich Müller gentoo-dev 2016-12-04 13:04:12 UTC
Looks like this commit removed the get_repositories subcommand:
https://github.com/pkgcore/pkgcore/commit/b9b702fc49c4238af772e4a08d0b3e6272addb21

So eselect is broken since at least pkgcore version 0.9.

Must eselect still remain compatible with pkgcore-0.8*? The oldest version in the tree is 0.9.1.
Comment 9 Tim Harder gentoo-dev 2016-12-07 05:45:32 UTC
(In reply to Ulrich Müller from comment #8)
> Looks like this commit removed the get_repositories subcommand:
> https://github.com/pkgcore/pkgcore/commit/
> b9b702fc49c4238af772e4a08d0b3e6272addb21
> 
> So eselect is broken since at least pkgcore version 0.9.
> 
> Must eselect still remain compatible with pkgcore-0.8*? The oldest version
> in the tree is 0.9.1.

The patch looks fine. Feel free to drop support for pkgcore-0.8*.
Comment 10 Ulrich Müller gentoo-dev 2016-12-10 17:16:59 UTC
Fixed in eselect-1.4.8.

commit eb8e92c757d14ed3c1769d622a5588a5d47f3a3e
Author: Ulrich Müller <ulm@gentoo.org>
Date:   Sun Dec 4 07:04:34 2016 +0100

    Fix pkgcore support.
    
    * libs/package-manager.bash.in (get_repositories)
    (get_repo_news_dir): Fix pinspect calls, bug 304011.