signal.signal(signal.SIGINT, exithandler)
signal.signal(signal.SIGTERM, exithandler)
+ # Quiet killing of subprocesses by SIGPIPE (see bug #309001).
+ signal.signal(signal.SIGPIPE, signal.SIG_DFL)
except KeyboardInterrupt:
sys.exit(1)
_unpack_tar() {
if [ "${y}" == "tar" ]; then
- $1 -dc "$srcdir$x" | tar xof -
- assert "$myfail"
+ $1 -dc "$srcdir$x" | tar xof - || die "$myfail"
else
$1 -dc "${srcdir}${x}" > ${x%.*} || die "$myfail"
fi
tar xozf "$srcdir$x" || die "$myfail"
;;
tbz|tbz2)
- bzip2 -dc "$srcdir$x" | tar xof -
- assert "$myfail"
+ bzip2 -dc "$srcdir$x" | tar xof - || die "$myfail"
;;
ZIP|zip|jar)
unzip -qo "${srcdir}${x}" || die "$myfail"
signal.signal(signal.SIGINT, exithandler)
signal.signal(signal.SIGTERM, exithandler)
+ # Quiet killing of subprocesses by SIGPIPE (see bug #309001).
signal.signal(signal.SIGPIPE, signal.SIG_DFL)
except KeyboardInterrupt:
if prov_cp != myprovide:
stats["virtual.versioned"]+=1
fails["virtual.versioned"].append(x+"/"+y+".ebuild: "+myprovide)
- prov_pkg = portage.cpv_getkey(
- portage.best(portdb.xmatch("match-all", prov_cp)))
- if prov_cp == prov_pkg:
+ if portdb.cp_list(prov_cp):
stats["virtual.exists"]+=1
fails["virtual.exists"].append(x+"/"+y+".ebuild: "+prov_cp)
def _start(self):
self.args = [self._shell_binary, "-c",
- ("bzip2 -dqc -- %s | tar -xp -C %s -f - ; " + \
- "p=(${PIPESTATUS[@]}) ; " + \
- "if [ ${p[0]} != 0 ] ; then " + \
- "echo bzip2 failed with status ${p[0]} ; exit ${p[0]} ; fi ; " + \
- "if [ ${p[1]} != 0 ] ; then " + \
- "echo tar failed with status ${p[1]} ; exit ${p[1]} ; fi ; " + \
- "exit 0 ;") % \
+ ("bzip2 -dqc -- %s | tar -xp -C %s -f -") % \
(portage._shell_quote(self.pkg_path),
portage._shell_quote(self.image_dir))]
myargs = [opt_name]
myargs.extend(mycommand[1:])
+ # Quiet killing of subprocesses by SIGPIPE (see bug #309001).
+ signal.signal(signal.SIGPIPE, signal.SIG_DFL)
+
# Set up the command's pipes.
my_fds = {}
# To protect from cases where direct assignment could