On Fri, 02 Nov 2012 12:08:19 -0400
Ian Stakenvicius <a...@gentoo.org> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
> 
> On 02/11/12 05:29 AM, Michał Górny wrote:
> > On Fri, 02 Nov 2012 10:22:44 +0100 Rémi Cardona <r...@gentoo.org>
> > wrote:
> > 
> >> Le jeudi 01 novembre 2012 à 23:30 +0100, Michał Górny a écrit :
> >>> Do you have any ideas how to solve that kind of stalemate?
> >> 
> >> How about a carefully crafted news item inviting users to enable
> >> the latest python version and to emerge -C argparse afterwards?
> > 
> > Well, I think that solves only the issue when users have argparse 
> > in their @world. If something still depends on it on their system,
> > it will be pulled in back with the REQUIRED_USE issue.
> > 
> > The news item is probably basically the same as installing with 
> > warnings, except that the latter would show only to affected
> > users, I guess.
> > 
> 
> 
> I wonder if maybe we should skip the REQUIRED_USE definition for such
> things..
> 
> I'm also wondering if maybe the argparse ebuild itself for a while
> should do a no-op install against the other pythons and just QA-Warn,
> asking the user to submit a bug with equery d argparse output

How about the following pkg_pretend()?

pkg_pretend() {
    local x
    for x in ${PYTHON_COMPAT_REAL[@]}; do
        if use python_targets_${x}; then
            return
        fi
    done

    ewarn 'You have installed this version of argparse only for Python'
    ewarn 'implementations which provide the argparse module already.'
    ewarn 'Most likely, this means that something in your system depends on'
    ewarn 'dev-python/argparse instead of virtual/python-argparse.'
    ewarn
    ewarn 'Please try running the following command or an equivalent one:'
    ewarn
    ewarn ' emerge --verbose --depclean dev-python/argparse'
    ewarn
    ewarn 'If your package manager refuses to uninstall the package due to'
    ewarn 'unsatisfied dependencies, please first try re-installing the listed'
    ewarn 'packages and running --depclean again. If that does not help, please'
    ewarn 'report a bug against the package requesting its maintainer to fix'
    ewarn 'the dependency on argparse to use virtual/argparse.'
}

-- 
Best regards,
Michał Górny

Attachment: signature.asc
Description: PGP signature

Reply via email to