All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
To: Khem Raj <raj.khem@gmail.com>
Cc: Patches and discussions about the oe-core layer
	<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH 3/6] ksize.py: Python 3 fixes
Date: Wed, 4 Jan 2017 16:18:45 -0600	[thread overview]
Message-ID: <3bafb872-955d-88a1-a627-243c8fe40fa3@linux.intel.com> (raw)
In-Reply-To: <2122f031-db47-1dc5-7080-1271e6fc1527@linux.intel.com>

Hey Khem,

Ok, now I'm actually awake when reading this, are you saying these 
changes should go in the same patch as the one for ksum.py?


On 01/04/2017 12:21 PM, Alejandro Hernandez wrote:
> Hey Khem,
>
>
> Its an old script fro Tom, but as far as I remember it worked fine on 
> python3, although thanks for checking and sending the patch!
>
> Cheers
>
> Alejandro
>
>
> On 01/04/2017 12:39 AM, Khem Raj wrote:
>> On Tue, Jan 3, 2017 at 2:30 PM, Alejandro Hernandez
>> <alejandro.hernandez@linux.intel.com> wrote:
>>> From: Tom Zanussi <tom.zanussi@linux.intel.com>
>>>
>>> String errors and partial __cmp__ fix.
>> may be fold it into previous patch.
>>
>>> Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
>>> ---
>>>   scripts/tiny/ksize.py | 17 ++++++++++++-----
>>>   1 file changed, 12 insertions(+), 5 deletions(-)
>>>
>>> diff --git a/scripts/tiny/ksize.py b/scripts/tiny/ksize.py
>>> index b9d2b19..ea1ca7f 100755
>>> --- a/scripts/tiny/ksize.py
>>> +++ b/scripts/tiny/ksize.py
>>> @@ -41,7 +41,7 @@ def usage():
>>>   class Sizes:
>>>       def __init__(self, glob):
>>>           self.title = glob
>>> -        p = Popen("size -t " + glob, shell=True, stdout=PIPE, 
>>> stderr=PIPE)
>>> +        p = Popen("size -t " + str(glob), shell=True, stdout=PIPE, 
>>> stderr=PIPE)
>>>           output = p.communicate()[0].splitlines()
>>>           if len(output) > 2:
>>>               sizes = output[-1].split()[0:4]
>>> @@ -62,18 +62,18 @@ class Report:
>>>           r = Report(filename, title)
>>>           path = os.path.dirname(filename)
>>>
>>> -        p = Popen("ls " + path + "/*.o | grep -v built-in.o",
>>> +        p = Popen("ls " + str(path) + "/*.o | grep -v built-in.o",
>>>                     shell=True, stdout=PIPE, stderr=PIPE)
>>>           glob = ' '.join(p.communicate()[0].splitlines())
>>> -        oreport = Report(glob, path + "/*.o")
>>> -        oreport.sizes.title = path + "/*.o"
>>> +        oreport = Report(glob, str(path) + "/*.o")
>>> +        oreport.sizes.title = str(path) + "/*.o"
>>>           r.parts.append(oreport)
>>>
>>>           if subglob:
>>>               p = Popen("ls " + subglob, shell=True, stdout=PIPE, 
>>> stderr=PIPE)
>>>               for f in p.communicate()[0].splitlines():
>>>                   path = os.path.dirname(f)
>>> -                r.parts.append(Report.create(f, path, path + 
>>> "/*/built-in.o"))
>>> +                r.parts.append(Report.create(f, path, str(path) + 
>>> "/*/built-in.o"))
>>>               r.parts.sort(reverse=True)
>>>
>>>           for b in r.parts:
>>> @@ -116,6 +116,13 @@ class Report:
>>>                  self.deltas["data"], self.deltas["bss"]))
>>>           print("\n")
>>>
>>> +    def __lt__(this, that):
>>> +        if that is None:
>>> +            return 1
>>> +        if not isinstance(that, Report):
>>> +            raise TypeError
>>> +        return this.sizes.total < that.sizes.total
>>> +
>>>       def __cmp__(this, that):
>>>           if that is None:
>>>               return 1
>>> -- 
>>> 2.6.6
>>>
>>> -- 
>>> _______________________________________________
>>> Openembedded-core mailing list
>>> Openembedded-core@lists.openembedded.org
>>> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>



  reply	other threads:[~2017-01-04 22:18 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-03 22:30 [PATCH 0/6] poky-tiny improvements Alejandro Hernandez
2017-01-03 22:30 ` [PATCH 1/6] image-live-artifacts: Add support for creating image artifacts only Alejandro Hernandez
2017-01-03 22:41   ` Richard Purdie
2017-01-03 22:30 ` [PATCH 2/6] core-image-tiny-initramfs: Add and image " Alejandro Hernandez
2017-01-04 18:29   ` Leonardo Sandoval
2017-01-03 22:30 ` [PATCH 3/6] ksize.py: Python 3 fixes Alejandro Hernandez
2017-01-04  6:39   ` Khem Raj
2017-01-04 18:21     ` Alejandro Hernandez
2017-01-04 22:18       ` Alejandro Hernandez [this message]
2017-01-04 23:52         ` Khem Raj
2017-01-03 22:30 ` [PATCH 4/6] scripts/tiny/ksum.py: New tool Alejandro Hernandez
2017-01-04  6:38   ` Khem Raj
2017-01-03 22:30 ` [PATCH 5/6] bootimg-efi: Look for image artifacts in a common location Alejandro Hernandez
2017-01-03 22:30 ` [PATCH 6/6] core-image-tiny-initramfs: Fix error message shown after a successful initrd boot Alejandro Hernandez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3bafb872-955d-88a1-a627-243c8fe40fa3@linux.intel.com \
    --to=alejandro.hernandez@linux.intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=raj.khem@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.