[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#686568: unblock: debpear/0.3



Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock

When given the parameter -i, with something like this:

debpear -i <PKG-Name>

debpear is supposed to download the PEAR package named PKG-Name, then build a
Debian package called php-pkg-name out of it, then if the build is successful,
install it.

As I wanted to handle the case where a *user* would use debpear, I wrote this:

if [ "${DO_INSTALL}" = "yes" ] ; then
	if ! [ `whoami` = "root" ] ; then
		sudo dpkg -i ${DEB_PKG_RESULT}
	fi
fi

but I forgot to handle the case where the user would be root. So, version 0.3
fixes this by adding:

+	else
+		dpkg -i ${DEB_PKG_RESULT}

(eg: without the sudo)

Please unblock debpear/0.3 to fix this problem.

Cheers,

Thomas Goirand (zigo)
diff --git a/debian/changelog b/debian/changelog
index 32f3c4e..14a7ba5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+debpear (0.3) unstable; urgency=low
+
+  * Fixed the -i option when run as root.
+
+ -- Thomas Goirand <zigo@debian.org>  Mon, 03 Sep 2012 08:25:44 +0000
+
 debpear (0.2) unstable; urgency=low
 
   * Removed the -p parameter, so that we can just call like this:
diff --git a/debpear b/debpear
index c7c61aa..f07f23e 100755
--- a/debpear
+++ b/debpear
@@ -251,5 +251,7 @@ cd ..
 if [ "${DO_INSTALL}" = "yes" ] ; then
 	if ! [ `whoami` = "root" ] ; then
 		sudo dpkg -i ${DEB_PKG_RESULT}
+	else
+		dpkg -i ${DEB_PKG_RESULT}
 	fi
 fi

Reply to: