aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Harder <radhermit@gmail.com>2018-01-01 05:30:38 -0500
committerTim Harder <radhermit@gmail.com>2018-03-24 13:23:45 -0400
commita0c89f8d0c7ecdd79481ddbb33e9574e12c7f936 (patch)
tree2df3f9df76b00a2a6e6b934419aec6fed8bebeb2
parentebd/helpers/common/dohtml: rewrite into a python ebd IPC method (diff)
downloadpkgcore-ipc.tar.gz
pkgcore-ipc.tar.bz2
pkgcore-ipc.zip
ebd: move all file compression to the python sideipc
-rw-r--r--ebd/eapi/common.lib9
-rwxr-xr-xebd/helpers/common/doinfo1
-rw-r--r--src/pkgcore/ebuild/ebd.py3
-rw-r--r--src/pkgcore/ebuild/ebd_ipc.py11
4 files changed, 22 insertions, 2 deletions
diff --git a/ebd/eapi/common.lib b/ebd/eapi/common.lib
index 18e427a7..327d61f1 100644
--- a/ebd/eapi/common.lib
+++ b/ebd/eapi/common.lib
@@ -386,6 +386,15 @@ __phase_pre_src_install() {
__phase_pre_phase
}
+__phase_post_src_install() {
+ # trigger python side to handle file compression
+ __ebd_write_line 'compress numargs=2'
+ __IFS_push $'\a'
+ __ebd_write_line "targets=${PKGCORE_DOCOMPRESS[*]}"
+ __ebd_write_line "skip=${PKGCORE_DOCOMPRESS_SKIP[*]}"
+ __IFS_pop
+}
+
unpack() {
local file file_match filename myfail srcdir taropts tar_subdir
taropts='--no-same-owner'
diff --git a/ebd/helpers/common/doinfo b/ebd/helpers/common/doinfo
index 7e3ca181..156cba12 100755
--- a/ebd/helpers/common/doinfo
+++ b/ebd/helpers/common/doinfo
@@ -5,4 +5,3 @@
check_args 1 -
check_command install -m0644 -D -t "${ED}usr/share/info" -- "$@"
-check_command "${PORTAGE_COMPRESS}" "${PORTAGE_COMPRESS_FLAGS}" -f "${ED}usr/share/info/${x##*/}"
diff --git a/src/pkgcore/ebuild/ebd.py b/src/pkgcore/ebuild/ebd.py
index 1507f98a..0cf6f029 100644
--- a/src/pkgcore/ebuild/ebd.py
+++ b/src/pkgcore/ebuild/ebd.py
@@ -30,7 +30,7 @@ from snakeoil.process.spawn import (
spawn_bash, spawn, is_sandbox_capable, is_userpriv_capable, spawn_get_output)
from pkgcore.ebuild import ebuild_built, const
-from pkgcore.ebuild.ebd_ipc import Doins, Dodoc, Dohtml
+from pkgcore.ebuild.ebd_ipc import Doins, Dodoc, Dohtml, Compress
from pkgcore.ebuild.processor import (
request_ebuild_processor, release_ebuild_processor,
expected_ebuild_env, chuck_UnhandledCommand, inherit_handler)
@@ -800,6 +800,7 @@ class buildable(ebd, setup_mixin, format.build):
'dohtml': Dohtml(self),
'doins': Doins(self),
'dodoc': Dodoc(self),
+ 'compress': Compress(self, async=True),
}
# TODO: replace print() usage with observer
diff --git a/src/pkgcore/ebuild/ebd_ipc.py b/src/pkgcore/ebuild/ebd_ipc.py
index 8978615c..b24ee178 100644
--- a/src/pkgcore/ebuild/ebd_ipc.py
+++ b/src/pkgcore/ebuild/ebd_ipc.py
@@ -153,3 +153,14 @@ class Dohtml(Doins):
def run(self):
return 0
+
+
+class Compress(IpcCommand):
+ """Compress files tagged on the bash side."""
+
+ def parse_args(self, targets='', skip=''):
+ self.targets = set(x for x in targets.split('\x07') if x)
+ self.skip = set(x for x in skip.split('\x07') if x)
+
+ def run(self):
+ return 0