Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
FS#43896 - [jdk7-openjdk] 7.u75_2.5.4-1 Usage of "sudo" in install script
Attached to Project:
Arch Linux
Opened by Anton S (fluffylime) - Friday, 20 February 2015, 15:48 GMT
Last edited by Guillaume ALAUX (galaux) - Sunday, 01 March 2015, 16:40 GMT
Opened by Anton S (fluffylime) - Friday, 20 February 2015, 15:48 GMT
Last edited by Guillaume ALAUX (galaux) - Sunday, 01 March 2015, 16:40 GMT
|
DetailsDescription:
While removing package jdk7-openjdk I noticed that a error was produced at post_remove stage. Inspecting the install script (it's located in split-package java7-openjdk) revealed the root of the error - sudo was used to perform some actions (copy-paste error, I guess). Additional info: * package version(s) => 7.u75_2.5.4-1 Steps to reproduce: 1. login as root into an arch machine/container without sudo 2. pacman -Sy jdk7-openjdk 3. pacman -Rsn jdk7-openjdk Here are relevant pacman output and part of the jdk7-openjdk.install script: === pacman -Rsn jdk7-openjdk === checking dependencies... Packages (13) java-environment-common-2-2 java-runtime-common-2-2 jre7-openjdk-7.u75_2.5.4-1 jre7-openjdk-headless-7.u75_2.5.4-1 lcms2-2.6-1 libcups-2.0.2-1 libjpeg-turbo-1.4.0-1 libpng-1.6.16-1 libtiff-4.0.3-5 nspr-4.10.8-1 nss-3.17.4-1 sqlite-3.8.8.2-1 jdk7-openjdk-7.u75_2.5.4-1 Total Removed Size: 110.43 MiB :: Do you want to remove these packages? [Y/n] /tmp/alpm_WUQW8A/.INSTALL: line 45: sudo: command not found /tmp/alpm_WUQW8A/.INSTALL: line 47: sudo: command not found error: command failed to execute correctly ( 1/13) removing jdk7-openjdk [########################################################] 100% === cut === === tail -n 8 b/java7-openjdk/jdk7-openjdk.install === pre_remove() { if [ "x$(fix_default)" = "x${THIS_JDK}" ]; then /usr/bin/archlinux-java unset if [ -x /usr/lib/jvm/${THIS_JDK}/jre/bin/java ]; then /usr/bin/archlinux-java set ${THIS_JDK}/jre fi fi } === end === |
This task depends upon
Closed by Guillaume ALAUX (galaux)
Sunday, 01 March 2015, 16:40 GMT
Reason for closing: Fixed
Additional comments about closing: Fixed in upcoming version of packages for OpenJDK7 and 8
Sunday, 01 March 2015, 16:40 GMT
Reason for closing: Fixed
Additional comments about closing: Fixed in upcoming version of packages for OpenJDK7 and 8
=== tail -n 8 a/java7-openjdk/jdk7-openjdk.install ===
pre_remove() {
if [ "x$(fix_default)" = "x${THIS_JDK}" ]; then
sudo /usr/bin/archlinux-java unset
if [ -x /usr/lib/jvm/${THIS_JDK}/jre/bin/java ]; then
sudo /usr/bin/archlinux-java set ${THIS_JDK}/jre
fi
fi
}
=== end ===
I've attached a patch that fixes this error.
Thanks for this.