[aur-dev] [PATCH] Allow pkgsubmit to accept any tar* file

eliott eliott at cactuswax.net
Sun Jan 13 21:59:07 EST 2008


for whatever reason, I cannot apply patches like this.
The inline fails every time with hunks not applying.

Attached patches (even the exact same ones) work flawlessly.
It could be the specific version of git i am using, but that doesn't
seem to be the problem. I blame gmail currently.

error: patch failed: web/html/pkgsubmit.php:121
error: web/html/pkgsubmit.php: patch does not apply
Patch failed at 0001.

On 1/13/08, Dan McGee <dan at archlinux.org> wrote:
> Instead of restricting to gz and bz2, allow just plain tar and any other
> format tar can understand to be uploaded. I make the mistake all the time of
> forgetting to pass -z to tar when making something to upload, and there is
> no real reason to exclude plain tar files.
>
> Signed-off-by: Dan McGee <dan at archlinux.org>
> ---
>  web/html/pkgsubmit.php |    9 ++-------
>  1 files changed, 2 insertions(+), 7 deletions(-)
>
> diff --git a/web/html/pkgsubmit.php b/web/html/pkgsubmit.php
> index 6e754bf..44b5070 100644
> --- a/web/html/pkgsubmit.php
> +++ b/web/html/pkgsubmit.php
> @@ -121,14 +121,9 @@ if ($_COOKIE["AURSID"]) {
>                                         $error = __("Could not change directory to %s.",
>                                                         array(INCOMING_DIR.$pkg_name));
>                                 } else {
> -                                       # try .gz first
> +                                       # try using general tar. it should take .gz, .bz2, and plain .tar
>                                         #
> -                                       exec("/bin/sh -c 'tar xzf ".$upload_file."'", $trash, $retval);
> -                                       if (!$retval) {
> -                                               # now try .bz2 format
> -                                               #
> -                                               exec("/bin/sh -c 'tar xjf ".$upload_file."'", $trash, $retval);
> -                                       }
> +                                       exec("/bin/sh -c 'tar xf ".$upload_file."'", $trash, $retval);
>                                         if (!$retval) {
>                                                 $error = __("Unknown file format for uploaded file.");
>                                         }
> --
> 1.5.4.rc3
>
>
>




More information about the aur-dev mailing list