Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 1 Sep 2012 16:48:28 +0200
From:      Alexander Leidinger <Alexander@Leidinger.net>
To:        Alexander Leidinger <Alexander@Leidinger.net>
Cc:        ports@freebsd.org, gcooper@freebsd.org, Eitan Adler <eadler@freebsd.org>, portmgr@freebsd.org
Subject:   Re: Regression in PREFIX handling in packages
Message-ID:  <20120901164828.00007be1@unknown>
In-Reply-To: <20120829220246.00005c76@unknown>
References:  <20120826225435.00005a10@unknown> <20120829211753.0000399e@unknown> <CAF6rxgmyO_4tnfOfRNZU_qkc0aMuojEjbj52H%2B_BfRD4Jdxp-w@mail.gmail.com> <20120829214831.000050c8@unknown> <20120829220246.00005c76@unknown>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 29 Aug 2012 22:02:46 +0200 Alexander Leidinger
<Alexander@Leidinger.net> wrote:

> And this one is tested (copy&paste, may have lost tabs and add
> linebreaks from my mailer):
> ---snip---
> # svn diff
> Index: perform.c
> ===================================================================
> --- perform.c   (revision 239708)
> +++ perform.c   (working copy)
> @@ -215,10 +215,15 @@
> 
>      /* Prefix should add an @cwd to the packing list */
>      if (Prefix) {
> -        char resolved_prefix[PATH_MAX];
> -        if (realpath(Prefix, resolved_prefix) == NULL)
> -           err(EXIT_FAILURE, "couldn't resolve path for prefix: %s",
>      Prefix);
> -       add_plist_top(&plist, PLIST_CWD, resolved_prefix);
> +       if (Prefix[0] != '/') {
> +               char resolved_prefix[PATH_MAX];
> +               if (realpath(Prefix, resolved_prefix) == NULL)
> +                       err(EXIT_FAILURE,
> +                           "couldn't resolve path for prefix: %s",
>      Prefix);
> +               add_plist_top(&plist, PLIST_CWD, resolved_prefix);
> +       } else {
> +               add_plist_top(&plist, PLIST_CWD, Prefix);
> +       }
>      }
> 
>      /* Add the origin if asked, at the top */
> ---snip---

Can I go ahead and commit this?

Bye,
Alexander.

-- 
http://www.Leidinger.net    Alexander @ Leidinger.net: PGP ID = B0063FE7
http://www.FreeBSD.org       netchild @ FreeBSD.org  : PGP ID = 72077137



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120901164828.00007be1>