Display a special error message if the package is identified as split
package.

Currently, the AUR displays a very vague error message when a split
package is submitted ("Invalid name: only lowercase letters are
allowed"). This often caused confusion among package submitters, see
FS#22834 and FS#32450.

Signed-off-by: Lukas Fleischer <[email protected]>
---
 web/html/pkgsubmit.php | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/web/html/pkgsubmit.php b/web/html/pkgsubmit.php
index 885c44f..5dd58af 100644
--- a/web/html/pkgsubmit.php
+++ b/web/html/pkgsubmit.php
@@ -269,6 +269,10 @@ if ($uid):
                }
 
                # Now we've parsed the pkgbuild, let's move it to where it 
belongs
+               if (!$error && $pkg_name[0] == '(') {
+                       $error = __("Error - The AUR does not support split 
packages!");
+               }
+
                if (!$error) {
                        $pkg_name = str_replace("'", "", 
$new_pkgbuild['pkgname']);
                        $pkg_name = escapeshellarg($pkg_name);
-- 
1.8.0

Reply via email to