summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorLukas Fleischer <archlinux@cryptocrack.de>2014-01-17 11:22:10 +0100
committerLukas Fleischer <archlinux@cryptocrack.de>2014-01-17 11:35:04 +0100
commitb7ea144dfb52966cc50b2ffc19d8dc9d978892e5 (patch)
treed9c8c53214f601e950473b6e6494eefc4c812739 /web
parentddbe1d1b1ea5f4f0735b18d87cd76d8e72909946 (diff)
downloadaurweb-b7ea144dfb52966cc50b2ffc19d8dc9d978892e5.tar.xz
Add a warning for packages without .AURINFO
Display a deprecation warning when a package without meta data is submitted. The user can still decide to ignore that warning by resubmitting the package but doing so is not recommended. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Diffstat (limited to 'web')
-rw-r--r--web/html/pkgsubmit.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/web/html/pkgsubmit.php b/web/html/pkgsubmit.php
index 5d4b917..9dba945 100644
--- a/web/html/pkgsubmit.php
+++ b/web/html/pkgsubmit.php
@@ -24,6 +24,7 @@ if ($uid):
# Track upload errors
$error = "";
+ $ignore_missing_aurinfo = 0;
if (isset($_REQUEST['pkgsubmit'])) {
@@ -116,6 +117,11 @@ if ($uid):
if (!$error && empty($pkgbuild_raw)) {
$error = __("Error trying to unpack upload - PKGBUILD does not exist.");
}
+
+ if (!$error && empty($srcinfo_raw) && (!isset($_POST['ignore_missing_aurinfo']) || $_POST['ignore_missing_aurinfo'] != 1)) {
+ $ignore_missing_aurinfo = 1;
+ $error = __("The source package does not contain any meta data. Please use `mkaurball` to create AUR source packages. Support for source packages without .AURINFO entries will be removed in an upcoming release! You can resubmit the package if you want to proceed anyway.");
+ }
}
# if no error, get list of directory contents and process PKGBUILD
@@ -492,6 +498,7 @@ html_header("Submit");
<fieldset>
<div>
<input type="hidden" name="pkgsubmit" value="1" />
+ <input type="hidden" name="ignore_missing_aurinfo" value="<?= $ignore_missing_aurinfo ?>" />
<input type="hidden" name="token" value="<?= htmlspecialchars($_COOKIE['AURSID']) ?>" />
</div>
<p>