AUR AI Reviewer

Review Results

Version #2977 of phpstorm · commit 2faca711c520 · status Reviewed

Risk 0/5 · Safe PKGBUILD
Result #5700

Comment

The change is a narrow sorting fix in PKGBUILD: it switches version selection from plain reverse lexicographic sort to version-aware reverse sort (`sort -rV`) when deriving `_buildver` from already-downloaded PhpStorm archives. This does not introduce network access, privilege escalation, new sources, or packaging side effects. It only makes the chosen build artifact more likely to be the newest version when multiple files are present. No security concern identified in the diff hunk.

@@ -26,7 +26,7 @@ package_phpstorm() {
               'java-runtime: JRE - Required if phpstorm-jre is not installed'
               'gnome-keyring: save login/deployment credentials safely'
               'java-openjfx: rendering Markdown files')
-  _buildver="$(ls | grep -Eo 'PhpStorm-[[:digit:]]+\.[[:digit:]]{2,5}\.[[:digit:]]+' | sort -r | head -1 | sed 's#PhpStorm-##')"
+  _buildver="$(ls | grep -Eo 'PhpStorm-[[:digit:]]+\.[[:digit:]]{2,5}\.[[:digit:]]+' | sort -rV | head -1 | sed 's#PhpStorm-##')"
 
   install -dm755 "${pkgdir}"/opt/
   install -dm755 "${pkgdir}"/usr/bin/
Risk 0/5 · Safe PKGBUILD
Result #5701

Comment

The change is a minor sorting fix in PKGBUILD: `sort -r` was replaced with version-aware `sort -rV` when selecting the highest PhpStorm build directory. This only affects which already-downloaded source directory is chosen for packaging, and does not introduce new sources, commands, privilege changes, or install-time behavior. No security-relevant regression is apparent from this diff.

@@ -45,7 +45,7 @@ package_phpstorm() {
 package_phpstorm-jre() {
   pkgdesc='JBR (JetBrains Runtime) for PhpStorm - a patched JRE'
   url='https://github.com/JetBrains/JetBrainsRuntime'
-  _buildver="$(ls | grep -Eo 'PhpStorm-[[:digit:]]+\.[[:digit:]]{2,5}\.[[:digit:]]+' | sort -r | head -1 | sed 's#PhpStorm-##')"
+  _buildver="$(ls | grep -Eo 'PhpStorm-[[:digit:]]+\.[[:digit:]]{2,5}\.[[:digit:]]+' | sort -rV | head -1 | sed 's#PhpStorm-##')"
 
   install -d -m 755 "${pkgdir}"/opt/${pkgbase}
   cp -a "${srcdir}"/PhpStorm-${_buildver:?_buildver unset}/jbr "${pkgdir}"/opt/${pkgbase}