From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from pigeon.gentoo.org ([69.77.167.62] helo=lists.gentoo.org)
	by finch.gentoo.org with esmtp (Exim 4.60)
	(envelope-from <gentoo-user+bounces-85674-garchives=archives.gentoo.org@lists.gentoo.org>)
	id 1KvKvW-0004pC-GO
	for garchives@archives.gentoo.org; Wed, 29 Oct 2008 23:58:14 +0000
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 9818AE030C;
	Wed, 29 Oct 2008 23:58:12 +0000 (UTC)
Received: from mail-gx0-f11.google.com (mail-gx0-f11.google.com [209.85.217.11])
	by pigeon.gentoo.org (Postfix) with ESMTP id 514B0E030C
	for <gentoo-user@lists.gentoo.org>; Wed, 29 Oct 2008 23:58:12 +0000 (UTC)
Received: by gxk4 with SMTP id 4so6667gxk.10
        for <gentoo-user@lists.gentoo.org>; Wed, 29 Oct 2008 16:58:10 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=gamma;
        h=domainkey-signature:received:received:message-id:date:from:to
         :subject:in-reply-to:mime-version:content-type:references;
        bh=F/sXRRJhihF1Bxio9wzMEFM5e1vttfJ/dn73pmoDvfM=;
        b=lQR+zTi63L8tOEfuaNA2USofSvqSakqoZY5DmOcYjJ0y1pde+iDxgSmTxxA1YRUV9C
         MHDZiDRsLYrgPsUZR1jxilXdrEp20OYK0z0TivEfo46LyykLC6wvCgrhOh/WFzFf8X0y
         ge0N0PKjEgpQRHF6s+wu7ZRKLCYGRmlM2X6QM=
DomainKey-Signature: a=rsa-sha1; c=nofws;
        d=gmail.com; s=gamma;
        h=message-id:date:from:to:subject:in-reply-to:mime-version
         :content-type:references;
        b=DM5p3Hgg/YjPhbxxcGti7HZzuZXTbhtzDApzltYFg6ofJi41bv1gdX+PPWJj7T6DOW
         vERWKrrQENedTufYS/X1VOtw1xNGqCHIV5ghyxz8WUTR5i5JEQqJffm5GUtpOhxIaUSP
         Tzbm9f3Msf7GMgY8+s/kiwsGlsE4OY9Idj7iU=
Received: by 10.151.113.11 with SMTP id q11mr9031131ybm.82.1225324652493;
        Wed, 29 Oct 2008 16:57:32 -0700 (PDT)
Received: by 10.150.198.18 with HTTP; Wed, 29 Oct 2008 16:57:32 -0700 (PDT)
Message-ID: <350fc7cf0810291657t20e74d6ag70b05bf8e23973ba@mail.gmail.com>
Date: Wed, 29 Oct 2008 16:57:32 -0700
From: "Andrey Falko" <ma3oxuct@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] A question about emerge --info
In-Reply-To: <e38d12ff0810291651y245cba2k89b9cb2b8ee39dd9@mail.gmail.com>
Precedence: bulk
List-Post: <mailto:gentoo-user@lists.gentoo.org>
List-Help: <mailto:gentoo-user+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-user+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-user+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-user.gentoo.org>
X-BeenThere: gentoo-user@lists.gentoo.org
Reply-to: gentoo-user@lists.gentoo.org
MIME-Version: 1.0
Content-Type: multipart/alternative; 
	boundary="----=_Part_53870_980454.1225324652474"
References: <58965d8a0810291553x50e4068ehc58834dfdbce285b@mail.gmail.com>
	 <350fc7cf0810291609v335f4909nbcd90ab7d368cb5d@mail.gmail.com>
	 <e38d12ff0810291613t6205b80em1294991c930ce1cf@mail.gmail.com>
	 <350fc7cf0810291623j5fb5608rf311cd0d2a371d2a@mail.gmail.com>
	 <e38d12ff0810291632gde628e5p5edadfc87f2704a8@mail.gmail.com>
	 <e38d12ff0810291641t7bb26b6fo1ea6ecc2aa4ef19c@mail.gmail.com>
	 <e38d12ff0810291651y245cba2k89b9cb2b8ee39dd9@mail.gmail.com>
X-Archives-Salt: ea954bdc-574d-4166-87b1-d8862c722e03
X-Archives-Hash: c4cea56b934f2633d488f254b6eadf14

------=_Part_53870_980454.1225324652474
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

On Wed, Oct 29, 2008 at 4:51 PM, Andrey Vul <andrey.vul@gmail.com> wrote:

> Found the code, and it's actually part of python (as of 2.4).
> Gentoo sets aliased to 1 when printing the system uname.
> /usr/lib/python2.{4,5,6}/platform.py:
>
> def _platform(*args):
>
>    """ Helper to format the platform string in a filename
>        compatible format e.g. "system-version-machine".
>    """
>    # Format the platform string
>    platform = string.join(
>        map(string.strip,
>            filter(len,args)),
>        '-')
>
>    # Cleanup some possible filename obstacles...
>    replace = string.replace
>    platform = replace(platform,' ','_')
>    platform = replace(platform,'/','-')
>    platform = replace(platform,'\\','-')
>    platform = replace(platform,':','-')
>    platform = replace(platform,';','-')
>    platform = replace(platform,'"','-')
>    platform = replace(platform,'(','-')
>    platform = replace(platform,')','-')
>
>    # No need to report 'unknown' information...
>    platform = replace(platform,'unknown','')
>
>    # Fold '--'s and remove trailing '-'
>    while 1:
>        cleaned = replace(platform,'--','-')
>        if cleaned == platform:
>            break
>        platform = cleaned
>    while platform[-1] == '-':
>        platform = platform[:-1]
>
>    return platform
>
> def platform(aliased=0, terse=0):
>
>    """ Returns a single string identifying the underlying platform
>        with as much useful information as possible (but no more :).
>
>        The output is intended to be human readable rather than
>        machine parseable. It may look different on different
>        platforms and this is intended.
>
>        If "aliased" is true, the function will use aliases for
>        various platforms that report system names which differ from
>        their common names, e.g. SunOS will be reported as
>        Solaris. The system_alias() function is used to implement
>        this.
>
>        Setting terse to true causes the function to return only the
>        absolute minimum information needed to identify the platform.
>
>    """
>    result = _platform_cache.get((aliased, terse), None)
>    if result is not None:
>        return result
>
>    # Get uname information and then apply platform specific cosmetics
>    # to it...
>    system,node,release,version,machine,processor = uname()
>    if machine == processor:
>        processor = ''
>    if aliased:
>        system,release,version = system_alias(system,release,version)
>
>    if system == 'Windows':
>        # MS platforms
>        rel,vers,csd,ptype = win32_ver(version)
>        if terse:
>            platform = _platform(system,release)
>        else:
>            platform = _platform(system,release,version,csd)
>
>    elif system in ('Linux',):
>        # Linux based systems
>        distname,distversion,distid = dist('')
>        if distname and not terse:
>            platform = _platform(system,release,machine,processor,
>                                 'with',
>                                 distname,distversion,distid)
>        else:
>            # If the distribution name is unknown check for libc vs. glibc
>            libcname,libcversion = libc_ver(sys.executable)
>            platform = _platform(system,release,machine,processor,
>                                 'with',
>                                 libcname+libcversion)
>    elif system == 'Java':
>        # Java platforms
>        r,v,vminfo,(os_name,os_version,os_arch) = java_ver()
>        if terse:
>            platform = _platform(system,release,version)
>        else:
>            platform = _platform(system,release,version,
>                                 'on',
>                                 os_name,os_version,os_arch)
>
>    elif system == 'MacOS':
>        # MacOS platforms
>        if terse:
>            platform = _platform(system,release)
>        else:
>            platform = _platform(system,release,machine)
>
>    else:
>        # Generic handler
>        if terse:
>            platform = _platform(system,release)
>        else:
>            bits,linkage = architecture(sys.executable)
>            platform =
> _platform(system,release,machine,processor,bits,linkage)
>
>    _platform_cache[(aliased, terse)] = platform
>    return platform
>
>
> Proof: run /usr/lib/python2.{4,5,6}/platform.py
> aliased and terse have no effect wrt output
> (kernel_version-with-libc_version)
> --
> Andrey Vul
>
> A: Because it messes up the order in which people normally read text.
> Q: Why is top-posting such a bad thing?
> A: Top-posting.
> Q: What is the most annoying thing in e-mail?
>
>
Good digging around :). So this is a python bug then? Or does portage need
to be update for some change that went into python? Actually, is this really
even a bug...its just a minor cosmetic problem really.

------=_Part_53870_980454.1225324652474
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

<br><br><div class="gmail_quote">On Wed, Oct 29, 2008 at 4:51 PM, Andrey Vul <span dir="ltr">&lt;<a href="mailto:andrey.vul@gmail.com">andrey.vul@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Found the code, and it&#39;s actually part of python (as of 2.4).<br>
Gentoo sets aliased to 1 when printing the system uname.<br>
/usr/lib/python2.{4,5,6}/platform.py:<br>
<br>
def _platform(*args):<br>
<br>
 &nbsp; &nbsp;&quot;&quot;&quot; Helper to format the platform string in a filename<br>
 &nbsp; &nbsp; &nbsp; &nbsp;compatible format e.g. &quot;system-version-machine&quot;.<br>
 &nbsp; &nbsp;&quot;&quot;&quot;<br>
 &nbsp; &nbsp;# Format the platform string<br>
 &nbsp; &nbsp;platform = string.join(<br>
 &nbsp; &nbsp; &nbsp; &nbsp;map(string.strip,<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;filter(len,args)),<br>
 &nbsp; &nbsp; &nbsp; &nbsp;&#39;-&#39;)<br>
<br>
 &nbsp; &nbsp;# Cleanup some possible filename obstacles...<br>
 &nbsp; &nbsp;replace = string.replace<br>
 &nbsp; &nbsp;platform = replace(platform,&#39; &#39;,&#39;_&#39;)<br>
 &nbsp; &nbsp;platform = replace(platform,&#39;/&#39;,&#39;-&#39;)<br>
 &nbsp; &nbsp;platform = replace(platform,&#39;\\&#39;,&#39;-&#39;)<br>
 &nbsp; &nbsp;platform = replace(platform,&#39;:&#39;,&#39;-&#39;)<br>
 &nbsp; &nbsp;platform = replace(platform,&#39;;&#39;,&#39;-&#39;)<br>
 &nbsp; &nbsp;platform = replace(platform,&#39;&quot;&#39;,&#39;-&#39;)<br>
 &nbsp; &nbsp;platform = replace(platform,&#39;(&#39;,&#39;-&#39;)<br>
 &nbsp; &nbsp;platform = replace(platform,&#39;)&#39;,&#39;-&#39;)<br>
<br>
 &nbsp; &nbsp;# No need to report &#39;unknown&#39; information...<br>
 &nbsp; &nbsp;platform = replace(platform,&#39;unknown&#39;,&#39;&#39;)<br>
<br>
 &nbsp; &nbsp;# Fold &#39;--&#39;s and remove trailing &#39;-&#39;<br>
 &nbsp; &nbsp;while 1:<br>
 &nbsp; &nbsp; &nbsp; &nbsp;cleaned = replace(platform,&#39;--&#39;,&#39;-&#39;)<br>
 &nbsp; &nbsp; &nbsp; &nbsp;if cleaned == platform:<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;break<br>
 &nbsp; &nbsp; &nbsp; &nbsp;platform = cleaned<br>
 &nbsp; &nbsp;while platform[-1] == &#39;-&#39;:<br>
 &nbsp; &nbsp; &nbsp; &nbsp;platform = platform[:-1]<br>
<br>
 &nbsp; &nbsp;return platform<br>
<br>
def platform(aliased=0, terse=0):<br>
<br>
 &nbsp; &nbsp;&quot;&quot;&quot; Returns a single string identifying the underlying platform<br>
 &nbsp; &nbsp; &nbsp; &nbsp;with as much useful information as possible (but no more :).<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp;The output is intended to be human readable rather than<br>
 &nbsp; &nbsp; &nbsp; &nbsp;machine parseable. It may look different on different<br>
 &nbsp; &nbsp; &nbsp; &nbsp;platforms and this is intended.<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp;If &quot;aliased&quot; is true, the function will use aliases for<br>
 &nbsp; &nbsp; &nbsp; &nbsp;various platforms that report system names which differ from<br>
 &nbsp; &nbsp; &nbsp; &nbsp;their common names, e.g. SunOS will be reported as<br>
 &nbsp; &nbsp; &nbsp; &nbsp;Solaris. The system_alias() function is used to implement<br>
 &nbsp; &nbsp; &nbsp; &nbsp;this.<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp;Setting terse to true causes the function to return only the<br>
 &nbsp; &nbsp; &nbsp; &nbsp;absolute minimum information needed to identify the platform.<br>
<br>
 &nbsp; &nbsp;&quot;&quot;&quot;<br>
 &nbsp; &nbsp;result = _platform_cache.get((aliased, terse), None)<br>
 &nbsp; &nbsp;if result is not None:<br>
 &nbsp; &nbsp; &nbsp; &nbsp;return result<br>
<br>
 &nbsp; &nbsp;# Get uname information and then apply platform specific cosmetics<br>
 &nbsp; &nbsp;# to it...<br>
 &nbsp; &nbsp;system,node,release,version,machine,processor = uname()<br>
 &nbsp; &nbsp;if machine == processor:<br>
 &nbsp; &nbsp; &nbsp; &nbsp;processor = &#39;&#39;<br>
 &nbsp; &nbsp;if aliased:<br>
 &nbsp; &nbsp; &nbsp; &nbsp;system,release,version = system_alias(system,release,version)<br>
<br>
 &nbsp; &nbsp;if system == &#39;Windows&#39;:<br>
 &nbsp; &nbsp; &nbsp; &nbsp;# MS platforms<br>
 &nbsp; &nbsp; &nbsp; &nbsp;rel,vers,csd,ptype = win32_ver(version)<br>
 &nbsp; &nbsp; &nbsp; &nbsp;if terse:<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;platform = _platform(system,release)<br>
 &nbsp; &nbsp; &nbsp; &nbsp;else:<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;platform = _platform(system,release,version,csd)<br>
<br>
 &nbsp; &nbsp;elif system in (&#39;Linux&#39;,):<br>
 &nbsp; &nbsp; &nbsp; &nbsp;# Linux based systems<br>
 &nbsp; &nbsp; &nbsp; &nbsp;distname,distversion,distid = dist(&#39;&#39;)<br>
 &nbsp; &nbsp; &nbsp; &nbsp;if distname and not terse:<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;platform = _platform(system,release,machine,processor,<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#39;with&#39;,<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; distname,distversion,distid)<br>
 &nbsp; &nbsp; &nbsp; &nbsp;else:<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;# If the distribution name is unknown check for libc vs. glibc<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;libcname,libcversion = libc_ver(sys.executable)<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;platform = _platform(system,release,machine,processor,<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#39;with&#39;,<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; libcname+libcversion)<br>
 &nbsp; &nbsp;elif system == &#39;Java&#39;:<br>
 &nbsp; &nbsp; &nbsp; &nbsp;# Java platforms<br>
 &nbsp; &nbsp; &nbsp; &nbsp;r,v,vminfo,(os_name,os_version,os_arch) = java_ver()<br>
 &nbsp; &nbsp; &nbsp; &nbsp;if terse:<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;platform = _platform(system,release,version)<br>
 &nbsp; &nbsp; &nbsp; &nbsp;else:<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;platform = _platform(system,release,version,<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#39;on&#39;,<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; os_name,os_version,os_arch)<br>
<br>
 &nbsp; &nbsp;elif system == &#39;MacOS&#39;:<br>
 &nbsp; &nbsp; &nbsp; &nbsp;# MacOS platforms<br>
 &nbsp; &nbsp; &nbsp; &nbsp;if terse:<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;platform = _platform(system,release)<br>
 &nbsp; &nbsp; &nbsp; &nbsp;else:<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;platform = _platform(system,release,machine)<br>
<br>
 &nbsp; &nbsp;else:<br>
 &nbsp; &nbsp; &nbsp; &nbsp;# Generic handler<br>
 &nbsp; &nbsp; &nbsp; &nbsp;if terse:<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;platform = _platform(system,release)<br>
 &nbsp; &nbsp; &nbsp; &nbsp;else:<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;bits,linkage = architecture(sys.executable)<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;platform = _platform(system,release,machine,processor,bits,linkage)<br>
<br>
 &nbsp; &nbsp;_platform_cache[(aliased, terse)] = platform<br>
 &nbsp; &nbsp;return platform<br>
<br>
<br>
Proof: run /usr/lib/python2.{4,5,6}/platform.py<br>
aliased and terse have no effect wrt output (kernel_version-with-libc_version)<br>
<div><div></div><div class="Wj3C7c">--<br>
Andrey Vul<br>
<br>
A: Because it messes up the order in which people normally read text.<br>
Q: Why is top-posting such a bad thing?<br>
A: Top-posting.<br>
Q: What is the most annoying thing in e-mail?<br>
<br>
</div></div></blockquote></div><br>Good digging around :). So this is a python bug then? Or does portage need to be update for some change that went into python? Actually, is this really even a bug...its just a minor cosmetic problem really.<br>

------=_Part_53870_980454.1225324652474--