All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] replace os.system and os.popen with subbprocess module
@ 2012-05-14  8:07 Robert Yang
  2012-05-14  8:07 ` [PATCH 1/2] replace os.system with subprocess.call Robert Yang
  2012-05-14  8:07 ` [PATCH 2/2] replace os.popen with subprocess.Popen Robert Yang
  0 siblings, 2 replies; 17+ messages in thread
From: Robert Yang @ 2012-05-14  8:07 UTC (permalink / raw)
  To: bitbake-devel; +Cc: Zhenfeng.Zhao

Replace os.popen and os.system with subprocess.Popen and
subprocess.call, since the older functions would fail (more or less) if
the executed program cannot be found, this would cause potential errors
since we don't know whether the problem executed well or not.

For the performance issue, I've done the testing before the patches and
after with the oe-core layer (also the oe-core have applied the similar
patches):

# The sources are on local disk

1) Before applied these pacthes to bitbake and similar patches to oe-core:
$ time bitbake core-image-sato
real    177m50.723s
user    436m1.551s
sys     71m29.588s

2) After applied the pathes:
$ time bitbake core-image-sato
real    176m26.194s
user    436m7.931s
sys     71m1.994s

After applied these patches, the time has reduced 84 seconds, this is
very slight, I think that we can assume this is just a deviation, it
doesn't cause performance problems.

// Robert

The following changes since commit 12b4543ac9f54c0db0ee4a7ee546a71946a051f8:

  classes/rootfs_*: fix splitting package dependency strings (2012-05-13 20:09:56 +0100)

are available in the git repository at:
  git://git.pokylinux.org/poky-contrib robert/subprocess
  http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=robert/subprocess

Robert Yang (2):
  replace os.system with subprocess.call
  replace os.popen with subprocess.Popen

 bitbake/lib/bb/fetch2/perforce.py            |    9 +++++----
 bitbake/lib/bb/fetch2/svk.py                 |    3 ++-
 bitbake/lib/bb/shell.py                      |    6 +++---
 bitbake/lib/bb/ui/crumbs/builddetailspage.py |    3 ++-
 bitbake/lib/bb/ui/crumbs/hig.py              |    2 +-
 bitbake/lib/bb/ui/crumbs/imagedetailspage.py |    3 ++-
 bitbake/lib/bb/ui/ncurses.py                 |    4 ++--
 7 files changed, 17 insertions(+), 13 deletions(-)




^ permalink raw reply	[flat|nested] 17+ messages in thread
* [PATCH 0/2] V2 replace os.system and os.popen with subbprocess module
@ 2012-05-15  9:53 Robert Yang
  2012-05-15  9:53 ` [PATCH 2/2] replace os.popen with subprocess.Popen Robert Yang
  0 siblings, 1 reply; 17+ messages in thread
From: Robert Yang @ 2012-05-15  9:53 UTC (permalink / raw)
  To: bitbake-devel; +Cc: Zhenfeng.Zhao

* Change of V2:

  - Remove the 2>/dev/null since we dont' need it.
  - Use the wrapped Popen from bb.process, which is simpler than
    subprocess.Popen(....).

* Original message of V1:
Replace os.popen and os.system with subprocess.Popen and
subprocess.call, since the older functions would fail (more or less) if
the executed program cannot be found, this would cause potential errors
since we don't know whether the problem executed well or not.

For the performance issue, I've done the testing before the patches and
after with the oe-core layer (also the oe-core have applied the similar
patches):

# The sources are on local disk

1) Before applied these pacthes to bitbake and similar patches to oe-core:
$ time bitbake core-image-sato
real    177m50.723s
user    436m1.551s
sys     71m29.588s

2) After applied the pathes:
$ time bitbake core-image-sato
real    176m26.194s
user    436m7.931s
sys     71m1.994s

After applied these patches, the time has reduced 84 seconds, this is
very slight, I think that we can assume this is just a deviation, it
doesn't cause performance problems.

// Robert

The following changes since commit 12b4543ac9f54c0db0ee4a7ee546a71946a051f8:

  classes/rootfs_*: fix splitting package dependency strings (2012-05-13 20:09:56 +0100)

are available in the git repository at:
  git://git.pokylinux.org/poky-contrib robert/subprocess
  http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=robert/subprocess

Robert Yang (2):
  replace os.system with subprocess.call
  replace os.popen with subprocess.Popen

 bitbake/lib/bb/fetch2/perforce.py            |   10 ++++++----
 bitbake/lib/bb/fetch2/svk.py                 |    3 ++-
 bitbake/lib/bb/shell.py                      |    6 +++---
 bitbake/lib/bb/ui/crumbs/builddetailspage.py |    3 ++-
 bitbake/lib/bb/ui/crumbs/hig.py              |    6 +++---
 bitbake/lib/bb/ui/crumbs/imagedetailspage.py |    3 ++-
 bitbake/lib/bb/ui/ncurses.py                 |    4 ++--
 7 files changed, 20 insertions(+), 15 deletions(-)




^ permalink raw reply	[flat|nested] 17+ messages in thread
* [PATCH 0/2] V3 replace os.system and os.popen with subbprocess module
@ 2012-05-16  5:55 Robert Yang
  2012-05-16  5:55 ` [PATCH 2/2] replace os.popen with subprocess.Popen Robert Yang
  0 siblings, 1 reply; 17+ messages in thread
From: Robert Yang @ 2012-05-16  5:55 UTC (permalink / raw)
  To: bitbake-devel; +Cc: Zhenfeng.Zhao

* Changes of V3:
  Use bb.process.run() rather than bb.process.Popen() to replace os.popen()

* Changes of V2:

  - Remove the 2>/dev/null since we dont' need it.
  - Use the wrapped Popen from bb.process, which is simpler than
    subprocess.Popen(....).

* Original message of V1:
Replace os.popen and os.system with subprocess.Popen and
subprocess.call, since the older functions would fail (more or less) if
the executed program cannot be found, this would cause potential errors
since we don't know whether the problem executed well or not.

For the performance issue, I've done the testing before the patches and
after with the oe-core layer (also the oe-core have applied the similar
patches):

# The sources are on local disk

1) Before applied these pacthes to bitbake and similar patches to oe-core:
$ time bitbake core-image-sato
real    177m50.723s
user    436m1.551s
sys     71m29.588s

2) After applied the pathes:
$ time bitbake core-image-sato
real    176m26.194s
user    436m7.931s
sys     71m1.994s

After applied these patches, the time has reduced 84 seconds, this is
very slight, I think that we can assume this is just a deviation, it
doesn't cause performance problems.

// Robert



The following changes since commit f3ba3cb6af96aebf5167bb1565edf11cceb7897f:

  gdk-pixbuf: Fix lsb builds where dependency may be missing (2012-05-15 19:44:37 +0100)

are available in the git repository at:
  git://git.pokylinux.org/poky-contrib robert/subprocess
  http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=robert/subprocess

Robert Yang (2):
  replace os.system with subprocess.call
  replace os.popen with subprocess.Popen

 bitbake/lib/bb/fetch2/perforce.py            |    9 +++++----
 bitbake/lib/bb/fetch2/svk.py                 |    2 +-
 bitbake/lib/bb/shell.py                      |    6 +++---
 bitbake/lib/bb/ui/crumbs/builddetailspage.py |    3 ++-
 bitbake/lib/bb/ui/crumbs/hig.py              |    7 ++++---
 bitbake/lib/bb/ui/crumbs/imagedetailspage.py |    3 ++-
 bitbake/lib/bb/ui/ncurses.py                 |    4 ++--
 7 files changed, 19 insertions(+), 15 deletions(-)




^ permalink raw reply	[flat|nested] 17+ messages in thread
* [PATCH 0/2] V4 replace os.system and os.popen with subbprocess module
@ 2012-05-20 12:36 Robert Yang
  2012-05-20 12:36 ` [PATCH 2/2] replace os.popen with subprocess.Popen Robert Yang
  0 siblings, 1 reply; 17+ messages in thread
From: Robert Yang @ 2012-05-20 12:36 UTC (permalink / raw)
  To: bitbake-devel; +Cc: Zhenfeng.Zhao

* Changes of V4:
  Fix use readline() for the return value of bb.process.run(), the
  return value is already a string, we can't (or don't have to) use
  readline() for it, the string is what we need.

* Changes of V3:
  Use bb.process.run() rather than bb.process.Popen() to replace os.popen()

* Changes of V2:

  - Remove the 2>/dev/null since we dont' need it.
  - Use the wrapped Popen from bb.process, which is simpler than
    subprocess.Popen(....).

* Original message of V1:
Replace os.popen and os.system with subprocess.Popen and
subprocess.call, since the older functions would fail (more or less) if
the executed program cannot be found, this would cause potential errors
since we don't know whether the problem executed well or not.

For the performance issue, I've done the testing before the patches and
after with the oe-core layer (also the oe-core have applied the similar
patches):

# The sources are on local disk

1) Before applied these pacthes to bitbake and similar patches to oe-core:
$ time bitbake core-image-sato
real    177m50.723s
user    436m1.551s
sys     71m29.588s

2) After applied the pathes:
$ time bitbake core-image-sato
real    176m26.194s
user    436m7.931s
sys     71m1.994s

After applied these patches, the time has reduced 84 seconds, this is
very slight, I think that we can assume this is just a deviation, it
doesn't cause performance problems.

// Robert

The following changes since commit b4c8c74a45e386f99344cf9799eb5294ad6c9e3e:

  hob: update required pygtk to 2.22.0 and gtk+ to 2.20.0 (2012-05-20 09:24:26 +0100)

are available in the git repository at:
  git://git.pokylinux.org/poky-contrib robert/subprocess
  http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=robert/subprocess

Robert Yang (2):
  replace os.system with subprocess.call
  replace os.popen with subprocess.Popen

 bitbake/lib/bb/fetch2/perforce.py            |   14 ++++++++------
 bitbake/lib/bb/fetch2/svk.py                 |    4 ++--
 bitbake/lib/bb/shell.py                      |    6 +++---
 bitbake/lib/bb/ui/crumbs/builddetailspage.py |    5 +++--
 bitbake/lib/bb/ui/crumbs/hig.py              |    7 ++++---
 bitbake/lib/bb/ui/crumbs/imagedetailspage.py |    3 ++-
 bitbake/lib/bb/ui/ncurses.py                 |    4 ++--
 7 files changed, 24 insertions(+), 19 deletions(-)




^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2012-05-30  1:21 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-14  8:07 [PATCH 0/2] replace os.system and os.popen with subbprocess module Robert Yang
2012-05-14  8:07 ` [PATCH 1/2] replace os.system with subprocess.call Robert Yang
2012-05-14  8:07 ` [PATCH 2/2] replace os.popen with subprocess.Popen Robert Yang
2012-05-14 13:59   ` Chris Larson
2012-05-15  6:49     ` Robert Yang
2012-05-15  9:53 [PATCH 0/2] V2 replace os.system and os.popen with subbprocess module Robert Yang
2012-05-15  9:53 ` [PATCH 2/2] replace os.popen with subprocess.Popen Robert Yang
2012-05-15 14:43   ` Chris Larson
2012-05-16  1:29     ` Robert Yang
2012-05-16  5:55 [PATCH 0/2] V3 replace os.system and os.popen with subbprocess module Robert Yang
2012-05-16  5:55 ` [PATCH 2/2] replace os.popen with subprocess.Popen Robert Yang
2012-05-16  9:35   ` GOPIKRISHNAN S
2012-05-16 14:14   ` Chris Larson
2012-05-17  1:59     ` Robert Yang
2012-05-20 12:36 [PATCH 0/2] V4 replace os.system and os.popen with subbprocess module Robert Yang
2012-05-20 12:36 ` [PATCH 2/2] replace os.popen with subprocess.Popen Robert Yang
2012-05-29 14:58   ` Wang, Shane
2012-05-29 15:17     ` Wang, Shane
2012-05-30  1:02     ` Robert Yang
2012-05-30  1:10       ` Wang, Shane

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.