Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 228063 Details for
Bug 264258
Support of custom compressor (or at least support pigz/pbzip2)
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
custom-bzip-command
0001-Bug-264258-Allow-for-a-custom-bzip-command.patch (text/plain), 6.22 KB, created by
Jeremy Olexa (darkside) (RETIRED)
on 2010-04-16 19:42:28 UTC
(
hide
)
Description:
custom-bzip-command
Filename:
MIME Type:
Creator:
Jeremy Olexa (darkside) (RETIRED)
Created:
2010-04-16 19:42:28 UTC
Size:
6.22 KB
patch
obsolete
>From e4c50e08c5542e0418c6bbe3cd3eb6c431206075 Mon Sep 17 00:00:00 2001 >From: Jeremy Olexa <darkside@gentoo.org> >Date: Fri, 16 Apr 2010 19:35:30 +0000 >Subject: [PATCH] [Bug 264258] Allow for a custom bzip command > >This patch adds a PORTAGE_BZIP_COMMAND variable that when set is used >for unpacking distfiles and generating binary packages. Defaults to >bzip2. Note, only drop-in replacements will work. >--- > bin/ebuild.sh | 8 ++++---- > bin/misc-functions.sh | 2 +- > cnf/make.globals | 3 +++ > man/make.conf.5 | 6 +++++- > pym/_emerge/BinpkgExtractorAsync.py | 9 +++++---- > pym/portage/package/ebuild/doebuild.py | 6 ++++-- > 6 files changed, 22 insertions(+), 12 deletions(-) > >diff --git a/bin/ebuild.sh b/bin/ebuild.sh >index 57ceb28..77b4383 100755 >--- a/bin/ebuild.sh >+++ b/bin/ebuild.sh >@@ -359,7 +359,7 @@ unpack() { > tar xozf "$srcdir$x" || die "$myfail" > ;; > tbz|tbz2) >- bzip2 -dc "$srcdir$x" | tar xof - >+ ${PORTAGE_BZIP_COMMAND} -dc "$srcdir$x" | tar xof - > assert "$myfail" > ;; > ZIP|zip|jar) >@@ -369,7 +369,7 @@ unpack() { > _unpack_tar gzip > ;; > bz2|bz) >- _unpack_tar bzip2 >+ _unpack_tar ${PORTAGE_BZIP_COMMAND} > ;; > 7Z|7z) > local my_output >@@ -1091,7 +1091,7 @@ dyn_install() { > save_ebuild_env --exclude-init-phases | filter_readonly_variables \ > --filter-path --filter-sandbox --allow-extra-vars > environment > >- bzip2 -f9 environment >+ ${PORTAGE_BZIP_COMMAND} -f9 environment > > cp "${EBUILD}" "${PF}.ebuild" > [ -n "${PORTAGE_REPO_NAME}" ] && echo "${PORTAGE_REPO_NAME}" > repository >@@ -2026,7 +2026,7 @@ ebuild_main() { > save_ebuild_env --exclude-init-phases | \ > filter_readonly_variables --filter-path \ > --filter-sandbox --allow-extra-vars \ >- | bzip2 -c -f9 > "$PORTAGE_UPDATE_ENV" >+ | ${PORTAGE_BZIP_COMMAND} -c -f9 > "$PORTAGE_UPDATE_ENV" > fi > ;; > unpack|prepare|configure|compile|test|clean|install) >diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh >index 2fd0491..06bcc42 100755 >--- a/bin/misc-functions.sh >+++ b/bin/misc-functions.sh >@@ -716,7 +716,7 @@ dyn_package() { > PORTAGE_BINPKG_TMPFILE="${PKGDIR}/${CATEGORY}/${PF}.tbz2" > mkdir -p "${PORTAGE_BINPKG_TMPFILE%/*}" || die "mkdir failed" > tar $tar_options -cf - $PORTAGE_BINPKG_TAR_OPTS -C "${D}" . | \ >- bzip2 -cf > "$PORTAGE_BINPKG_TMPFILE" >+ ${PORTAGE_BZIP_COMMAND} -cf > "$PORTAGE_BINPKG_TMPFILE" > assert "failed to pack binary package: '$PORTAGE_BINPKG_TMPFILE'" > EPYTHON= PYTHONPATH=${PORTAGE_PYM_PATH}${PYTHONPATH:+:}${PYTHONPATH} \ > "$PORTAGE_BIN_PATH"/xpak-helper.py recompose \ >diff --git a/cnf/make.globals b/cnf/make.globals >index a809ae4..2b71d66 100644 >--- a/cnf/make.globals >+++ b/cnf/make.globals >@@ -108,6 +108,9 @@ PORTAGE_ELOG_MAILURI="root" > PORTAGE_ELOG_MAILSUBJECT="[portage] ebuild log for \${PACKAGE} on \${HOST}" > PORTAGE_ELOG_MAILFROM="portage@localhost" > >+# Default bzip command >+PORTAGE_BZIP_COMMAND="bzip2" >+ > # ***************************** > # ** DO NOT EDIT THIS FILE ** > # *************************************************** >diff --git a/man/make.conf.5 b/man/make.conf.5 >index 68b163d..03751e8 100644 >--- a/man/make.conf.5 >+++ b/man/make.conf.5 >@@ -1,4 +1,4 @@ >-.TH "MAKE.CONF" "5" "Aug 2008" "Portage 2.2" "Portage" >+.TH "MAKE.CONF" "5" "April 2010" "Portage 2.2" "Portage" > .SH "NAME" > make.conf \- custom settings for Portage > .SH "SYNOPSIS" >@@ -548,6 +548,10 @@ setting as the base URI. > This variable contains options to be passed to the tar command for creation > of binary packages. > .TP >+\fBPORTAGE_BZIP_COMMAND\fR = \fI"bzip2"\fR >+This variable contains the command of the bzip2 compatible application that >+portage should use. This is used to unpack distfiles and create binary packages. >+.TP > \fBPORTAGE_COMPRESS\fR = \fI"bzip2"\fR > This variable contains the command used to compress documentation during the > install phase. >diff --git a/pym/_emerge/BinpkgExtractorAsync.py b/pym/_emerge/BinpkgExtractorAsync.py >index a4941fc..f6e003e 100644 >--- a/pym/_emerge/BinpkgExtractorAsync.py >+++ b/pym/_emerge/BinpkgExtractorAsync.py >@@ -1,4 +1,4 @@ >-# Copyright 1999-2009 Gentoo Foundation >+# Copyright 1999-2010 Gentoo Foundation > # Distributed under the terms of the GNU General Public License v2 > > from _emerge.SpawnProcess import SpawnProcess >@@ -12,11 +12,12 @@ class BinpkgExtractorAsync(SpawnProcess): > _shell_binary = portage.const.BASH_BINARY > > def _start(self): >- self.args = [self._shell_binary, "-c", >- ("bzip2 -dqc -- %s | tar -xp -C %s -f - ; " + \ >+ bzip_command = portage.settings["PORTAGE_BZIP_COMMAND"] >+ self.args = [self._shell_binary, "-c ", >+ (bzip_command + " -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 ; " + \ >+ "echo " + bzip_command + " 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 ;") % \ >diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py >index 9cf16cf..4432de7 100644 >--- a/pym/portage/package/ebuild/doebuild.py >+++ b/pym/portage/package/ebuild/doebuild.py >@@ -31,7 +31,8 @@ portage.proxy.lazyimport.lazyimport(globals(), > from portage import auxdbkeys, bsd_chflags, dep_check, \ > eapi_is_supported, merge, os, selinux, StringIO, \ > unmerge, _encodings, _parse_eapi_ebuild_head, _os_merge, \ >- _shell_quote, _split_ebuild_name_glep55, _unicode_decode, _unicode_encode >+ _shell_quote, _split_ebuild_name_glep55, _unicode_decode, _unicode_encode, \ >+ settings > from portage.const import EBUILD_SH_ENV_FILE, EBUILD_SH_BINARY, \ > INVALID_ENV_FILE, MISC_SH_BINARY > from portage.data import portage_gid, portage_uid, secpass, \ >@@ -685,9 +686,10 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0, > os.path.dirname(myebuild), "environment.bz2") > if not os.path.isfile(saved_env): > saved_env = None >+ bzip_command = settings["PORTAGE_BZIP_COMMAND"] > if saved_env: > retval = os.system( >- "bzip2 -dc %s > %s" % \ >+ bzip_command + " -dc %s > %s" % \ > (_shell_quote(saved_env), > _shell_quote(env_file))) > try: >-- >1.6.4.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 264258
: 228063