* [PATCH 0/1] oe/process.py: remove it since it is unused and duplicated
@ 2012-05-24 15:55 Robert Yang
2012-05-24 15:55 ` [PATCH 1/1] " Robert Yang
2012-05-25 16:41 ` [PATCH 0/1] " Saul Wold
0 siblings, 2 replies; 3+ messages in thread
From: Robert Yang @ 2012-05-24 15:55 UTC (permalink / raw)
To: openembedded-core; +Cc: Zhenfeng.Zhao
The following changes since commit 6558abda67956e4fab1304b0cdf03c65f18fabd5:
qemu: disable vnc-jpeg compression (2012-05-24 08:53:57 +0100)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib robert/process
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=robert/process
Robert Yang (1):
oe/process.py: remove it since it is unused and duplicated
meta/lib/oe/process.py | 74 ------------------------------------------------
1 files changed, 0 insertions(+), 74 deletions(-)
delete mode 100644 meta/lib/oe/process.py
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/1] oe/process.py: remove it since it is unused and duplicated
2012-05-24 15:55 [PATCH 0/1] oe/process.py: remove it since it is unused and duplicated Robert Yang
@ 2012-05-24 15:55 ` Robert Yang
2012-05-25 16:41 ` [PATCH 0/1] " Saul Wold
1 sibling, 0 replies; 3+ messages in thread
From: Robert Yang @ 2012-05-24 15:55 UTC (permalink / raw)
To: openembedded-core; +Cc: Zhenfeng.Zhao
The meta/lib/oe/process.py is only used by oe_run and oe_popen in
meta/classes/utils.bbclass, and they will be removed, we have a better
one: bitbake/lib/bb/process.py, which can replace of it.
[YOCTO #2489]
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
meta/lib/oe/process.py | 74 ------------------------------------------------
1 files changed, 0 insertions(+), 74 deletions(-)
delete mode 100644 meta/lib/oe/process.py
diff --git a/meta/lib/oe/process.py b/meta/lib/oe/process.py
deleted file mode 100644
index 26c3e65..0000000
--- a/meta/lib/oe/process.py
+++ /dev/null
@@ -1,74 +0,0 @@
-import subprocess
-import signal
-
-def subprocess_setup():
- # Python installs a SIGPIPE handler by default. This is usually not what
- # non-Python subprocesses expect.
- signal.signal(signal.SIGPIPE, signal.SIG_DFL)
-
-class CmdError(RuntimeError):
- def __init__(self, command):
- self.command = command
-
- def __str__(self):
- if not isinstance(self.command, basestring):
- cmd = subprocess.list2cmdline(self.command)
- else:
- cmd = self.command
-
- return "Execution of '%s' failed" % cmd
-
-class NotFoundError(CmdError):
- def __str__(self):
- return CmdError.__str__(self) + ": command not found"
-
-class ExecutionError(CmdError):
- def __init__(self, command, exitcode, stdout = None, stderr = None):
- CmdError.__init__(self, command)
- self.exitcode = exitcode
- self.stdout = stdout
- self.stderr = stderr
-
- def __str__(self):
- message = ""
- if self.stderr:
- message += self.stderr
- if self.stdout:
- message += self.stdout
- if message:
- message = ":\n" + message
- return (CmdError.__str__(self) +
- " with exit code %s" % self.exitcode + message)
-
-class Popen(subprocess.Popen):
- defaults = {
- "close_fds": True,
- "preexec_fn": subprocess_setup,
- "stdout": subprocess.PIPE,
- "stderr": subprocess.STDOUT,
- "stdin": subprocess.PIPE,
- "shell": False,
- }
-
- def __init__(self, *args, **kwargs):
- options = dict(self.defaults)
- options.update(kwargs)
- subprocess.Popen.__init__(self, *args, **options)
-
-def run(cmd, input=None, **options):
- """Convenience function to run a command and return its output, raising an
- exception when the command fails"""
-
- if isinstance(cmd, basestring) and not "shell" in options:
- options["shell"] = True
- try:
- pipe = Popen(cmd, **options)
- except OSError, exc:
- if exc.errno == 2:
- raise NotFoundError(cmd)
- else:
- raise
- stdout, stderr = pipe.communicate(input)
- if pipe.returncode != 0:
- raise ExecutionError(cmd, pipe.returncode, stdout, stderr)
- return stdout
--
1.7.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 0/1] oe/process.py: remove it since it is unused and duplicated
2012-05-24 15:55 [PATCH 0/1] oe/process.py: remove it since it is unused and duplicated Robert Yang
2012-05-24 15:55 ` [PATCH 1/1] " Robert Yang
@ 2012-05-25 16:41 ` Saul Wold
1 sibling, 0 replies; 3+ messages in thread
From: Saul Wold @ 2012-05-25 16:41 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer; +Cc: Zhenfeng.Zhao
On 05/24/2012 08:55 AM, Robert Yang wrote:
> The following changes since commit 6558abda67956e4fab1304b0cdf03c65f18fabd5:
>
> qemu: disable vnc-jpeg compression (2012-05-24 08:53:57 +0100)
>
> are available in the git repository at:
> git://git.pokylinux.org/poky-contrib robert/process
> http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=robert/process
>
> Robert Yang (1):
> oe/process.py: remove it since it is unused and duplicated
>
> meta/lib/oe/process.py | 74 ------------------------------------------------
> 1 files changed, 0 insertions(+), 74 deletions(-)
> delete mode 100644 meta/lib/oe/process.py
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>
>
Merged into OE-Core
Thanks
Sau!
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-05-25 16:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-24 15:55 [PATCH 0/1] oe/process.py: remove it since it is unused and duplicated Robert Yang
2012-05-24 15:55 ` [PATCH 1/1] " Robert Yang
2012-05-25 16:41 ` [PATCH 0/1] " Saul Wold
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox