mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Jon Ringle <jon@ringle.org>
To: "ptxdist@pengutronix.de" <ptxdist@pengutronix.de>
Subject: Re: [ptxdist] [PATCH] install_dir: Allow one to specify an alternate root dir
Date: Mon, 29 Sep 2014 08:25:38 -0400	[thread overview]
Message-ID: <CAMwGMjyST5741Q=BhhV5wC_ZxQbLQ9nF+j_62XpYjk8AVum1Ug@mail.gmail.com> (raw)
In-Reply-To: <20140929094228.GC15758@pengutronix.de>


[-- Attachment #1.1: Type: text/plain, Size: 2117 bytes --]

On Mon, Sep 29, 2014 at 5:42 AM, Michael Olbrich <m.olbrich@pengutronix.de>
wrote:

> On Fri, Sep 26, 2014 at 05:46:51PM -0400, jon@ringle.org wrote:
> > From: Jon Ringle <jringle@gridpoint.com>
> >
> > This is useful if you install a package to /opt and libs are in /opt/lib:
> >     $(call install_lib, foo, 0, 0, 0644, libfoo, opt/)
>
> Is '/opt' your actual use-case or just an example? I wouldn't mind adding
> /opt to the default list.
>

It is just an example. My actual use-case looks like this:

@$(foreach lib, $(GPEC_LIBS), \
$(call install_lib, gpec, 0, 0, 0644, $(lib), opt/gpec/live/);)

where the list of libs in $(GPEC_LIBS) is installed to /opt/gpec/live/lib/


> If not:
>
> > Signed-off-by: Jon Ringle <jringle@gridpoint.com>
> > ---
> >  rules/post/install.make           | 4 +++-
> >  scripts/lib/ptxd_make_xpkg_pkg.sh | 4 +++-
> >  2 files changed, 6 insertions(+), 2 deletions(-)
> >
> > diff --git a/rules/post/install.make b/rules/post/install.make
> > index d57e5dd..2ff9f40 100644
> [...]
> > diff --git a/scripts/lib/ptxd_make_xpkg_pkg.sh
> b/scripts/lib/ptxd_make_xpkg_pkg.sh
> > index 86196a2..501d1fd 100644
> > --- a/scripts/lib/ptxd_make_xpkg_pkg.sh
> > +++ b/scripts/lib/ptxd_make_xpkg_pkg.sh
> > @@ -744,9 +744,11 @@ export -f ptxd_install_shared
> >  ptxd_install_lib() {
> >      local lib_dir=$(ptxd_get_lib_dir)
> >      local lib="$1"
> > +    local root_dir="$2"
> > +    shift
> >      shift
>
>     local root_dir="${2%/}/"
>     shift 2
>
> >
> > -    local file="$(for dir in "${pkg_pkg_dir}/"{,usr/}${lib_dir}; do
> > +    local file="$(for dir in
> "${pkg_pkg_dir}/"${root_dir}{,usr/}${lib_dir}; do
>
>     local file="$(for dir in
> "${pkg_pkg_dir}/"${root_dir#/}{,usr/}${lib_dir}; do
>

With this, is seems that the trailing / after ${pkg_pkg_dir} could be
removed...


>
> So the argument for install_lib can be absolute, and the trailing / is
> optional. Maybe even enforce an absolute path for root_dir.
> And use root_dir instead of '{,usr/}' and not before it.
>

If the '{,/usr}' is removed, then won't that break searching for libs that
might be in /usr/lib/ ?

[-- Attachment #1.2: Type: text/html, Size: 3666 bytes --]

[-- Attachment #2: Type: text/plain, Size: 48 bytes --]

-- 
ptxdist mailing list
ptxdist@pengutronix.de

  reply	other threads:[~2014-09-29 12:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-26 21:46 jon
2014-09-27  9:08 ` Guillermo Rodriguez Garcia
2014-09-27 21:14   ` Jon Ringle
2014-09-29  9:42 ` Michael Olbrich
2014-09-29 12:25   ` Jon Ringle [this message]
2014-09-30  7:53     ` Michael Olbrich
2014-10-01  5:09       ` Jon Ringle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAMwGMjyST5741Q=BhhV5wC_ZxQbLQ9nF+j_62XpYjk8AVum1Ug@mail.gmail.com' \
    --to=jon@ringle.org \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox