Artur R. Czechowski
Tue, 09 Feb 2010 11:07:29 -0800
tags 553446 +patch
block 553446 by 569054
thanks
Hello,
By default pear downloads only packages in state beta. Following patch
adds an option --state to dh-make-pear. This option allows user to select
which state are OK for download and it defaults to stable. However, to make
this feature helpful also error message shall be displayed (plase look
into 569054), so user knows he needs to undertake any special action.
Regards
Artur
--
Promotor polecił mi, żebym przy opisie wzorów podtrzymywania swojego
statusu przez adminów korzystała z książki opisującej analogiczne
procesy... w więzieniu i wśród młodocianych przestępców. :)
/Socjonetka/
diff -Naru dh-make-php-0.2.15-buggy/dh-make-pear dh-make-php-0.2.15/dh-make-pear
--- dh-make-php-0.2.15-buggy/dh-make-pear 2010-02-09 18:00:38.119805755 +0100
+++ dh-make-php-0.2.15/dh-make-pear 2010-02-09 19:57:39.599809121 +0100
@@ -22,6 +22,7 @@
DEBMAINTAINER=
DEPENDS=
DEPARCH=all
+PREFSTATE=stable
. ${PREFIX}/share/dh-make-php/dh-make-php.lib
@@ -41,6 +42,7 @@
--version | -v show version of program
--maintainer maintainer of the debian package
--arch set architecture (defaults to 'all')
+ --state set preferred_state for pear download (defaults to 'stable')
--depends set more depends aside php
--prefix set prefix for package name (default is '${DEBPACKAGEPREFIX}')
--templatedir set alternative directory for templates
@@ -72,6 +74,9 @@
--arch) # set architecture of debian package
DEBARCH="$2"; shift
;;
+ --state) # set architecture of debian package
+ PREFSTATE="$2"; shift
+ ;;
--depends) # set extra depends for debian package
DEPENDS=", $2"; shift
;;
@@ -96,7 +101,7 @@
if [ -f ${PEARPACKAGENAME} ]; then
tar xzf ${PEARPACKAGENAME}
else
- if TEMPMSG=$(/usr/bin/pear download ${PEARPACKAGENAME} 2> /dev/null); then
+ if TEMPMSG=$(/usr/bin/pear -D preferred_state=${PREFSTATE} download ${PEARPACKAGENAME} 2> /dev/null); then
echo ${TEMPMSG}
PEARPACKAGENAME=$(echo ${TEMPMSG} | awk -F ' ' '{print $2'})
tar xzf ${PEARPACKAGENAME}