Package Details: xiaomi-adb-fastboot-tools 6.9.1-1

Git Clone URL: https://aur.archlinux.org/xiaomi-adb-fastboot-tools.git (read-only, click to copy)
Package Base: xiaomi-adb-fastboot-tools
Description: Simple tool for managing Xiaomi devices on desktop using ADB and Fastboot
Upstream URL: https://szaki.github.io/XiaomiADBFastbootTools/
Licenses: MIT
Submitter: pfm
Maintainer: pfm
Last Packager: pfm
Votes: 1
Popularity: 0.28
First Submitted: 2019-11-15 22:17
Last Updated: 2020-03-21 12:55

Latest Comments

neitsab commented on 2020-04-05 22:25

Hi there! Using pacaur to install the package today, I got an error during prepare() because gendesk was required, but it isn't installed before a bit later in the process. That made me realize that makedepends are only guaranteed to be present during the build() step and not during prepare()...

So what I did was to edit the PKGBUILD to move the gendesk step within build(), before cd "$srcdir/$_pkgname-$pkgver" to avoid an error later during package(), and getting rid of the entire prepare() stage. I could then proceed to building, but there I got the following error:

FAILURE: Build failed with an exception.

* What went wrong:
java.lang.UnsupportedClassVersionError: org/openjfx/gradle/JavaFXPlugin has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 54.0
> org/openjfx/gradle/JavaFXPlugin has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 54.0

This is because I had jre10-openjdk already installed and selected as the default java environment due to an old application I had never removed, so I had to run archlinux-java set java-13-openjdk (which is the one I had selected among the different providers offered) for the gradle build to succeed.

To summarize, I think the PKGBUILD should be modified to place the gendesk operation at the beginning of build() and making sure that a java environment ≥ 11 is indeed set using archlinux-java, otherwise the installation will fail.

About this second point, I was thinking maybe we can extract the set java env during prepare(), store it in a var then set it to ≥ 11 using the aforementioned command, and then restore it at the end so as not to mess the user environment? Or maybe just pause and echo something for the user to manually do it before building... The Arch packaging guidelines for Java don't touch upon that subject, and it is the first time I face it so I'm a bit at a loss about how to come at it ¯\(ツ)/¯ Another way would be to just pin a comment here saying "before building make sure your Java env is set to something ≥ 11", but that's not ideal either...

Btw, for some reasons using java-runtime>=11 in makedepends doesn't restrict the version of Java as expected: I was offered to install JDK 7, 8 and 10 besides 11 and current, as can be seen on this very page. Any idea how to fix that?

All the best.