[packages/composer] disable memory limit for update command

glen glen at pld-linux.org
Tue Aug 5 04:00:07 CEST 2014


commit 048c23579393b63a4ad2069e5028a0a7537c0203
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Tue Aug 5 04:59:10 2014 +0300

    disable memory limit for update command
    
    https://github.com/composer/composer/issues/1898

 composer.spec             |  4 +++-
 update-memory-limit.patch | 17 +++++++++++++++++
 2 files changed, 20 insertions(+), 1 deletion(-)
---
diff --git a/composer.spec b/composer.spec
index cc783e2..5440b28 100644
--- a/composer.spec
+++ b/composer.spec
@@ -7,7 +7,7 @@
 %define		php_min_version 5.3.4
 %define		subver	alpha8
 %define		githash	ac497fe
-%define		rel		5
+%define		rel		6
 %include	/usr/lib/rpm/macros.php
 Summary:	Dependency Manager for PHP
 Name:		composer
@@ -27,6 +27,7 @@ Source2:	https://raw.githubusercontent.com/iArren/%{name}-bash-completion/86a812
 Patch0:		nogit.patch
 Patch1:		no-vendors.patch
 Patch2:		autoload-config.patch
+Patch3:		update-memory-limit.patch
 URL:		http://www.getcomposer.org/
 BuildRequires:	%{php_name}-ctype
 BuildRequires:	%{php_name}-hash
@@ -99,6 +100,7 @@ Pakiet ten dostarcza bashowe uzupełnianie nazw dla Composera.
 mv composer-*/* .
 %patch0 -p1
 %{!?with_bootstrap:%patch1 -p1}
+%patch3 -p1
 
 mv composer.lock{,.disabled}
 %{__sed} -i -e '1s,^#!.*env php,#!%{__php},' bin/*
diff --git a/update-memory-limit.patch b/update-memory-limit.patch
new file mode 100644
index 0000000..b01bc85
--- /dev/null
+++ b/update-memory-limit.patch
@@ -0,0 +1,17 @@
+update command is very memory hungry
+and there's no good solution for that
+as the memory usage is unexpected, just disable it
+
+https://github.com/composer/composer/issues/1898
+
+--- composer-1.0.0-0.alpha8.5.ac497fe/src/Composer/Command/UpdateCommand.php~	2014-06-10 17:13:12.000000000 +0300
++++ composer-1.0.0-0.alpha8.5.ac497fe/src/Composer/Command/UpdateCommand.php	2014-08-05 04:55:27.855176641 +0300
+@@ -65,6 +65,8 @@
+ 
+     protected function execute(InputInterface $input, OutputInterface $output)
+     {
++        ini_set('memory_limit', -1);
++
+         if ($input->getOption('no-custom-installers')) {
+             $output->writeln('<warning>You are using the deprecated option "no-custom-installers". Use "no-plugins" instead.</warning>');
+             $input->setOption('no-plugins', true);
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/composer.git/commitdiff/048c23579393b63a4ad2069e5028a0a7537c0203



More information about the pld-cvs-commit mailing list