mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Michael Olbrich <m.olbrich@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: Re: [ptxdist] [PATCH v2] install_dir: Allow one to specify an alternate root dir
Date: Tue, 30 Sep 2014 10:04:13 +0200	[thread overview]
Message-ID: <20140930080413.GD24288@pengutronix.de> (raw)
In-Reply-To: <1411995493-10273-1-git-send-email-jon@ringle.org>

On Mon, Sep 29, 2014 at 08:58:13AM -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)

I didn't see this one, when I replied to your other mail. I think the
absolute path should be enforced. And see my other comments about replacing
the ',/usr' with the root_dir.

Michael

> Signed-off-by: Jon Ringle <jringle@gridpoint.com>
> ---
>  rules/post/install.make           | 4 +++-
>  scripts/lib/ptxd_make_xpkg_pkg.sh | 5 +++--
>  2 files changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/rules/post/install.make b/rules/post/install.make
> index d57e5dd..2ff9f40 100644
> --- a/rules/post/install.make
> +++ b/rules/post/install.make
> @@ -231,6 +231,7 @@ install_package =		\
>  # $3: GID
>  # $4: permissions (octal)
>  # $5: library name without suffix.
> +# $6: optional root dir
>  #
>  install_lib =			\
>  	XPKG=$(subst _,-,$(strip $(1)));	\
> @@ -238,8 +239,9 @@ install_lib =			\
>  	GRP="$(strip $(3))";	\
>  	PER="$(strip $(4))";	\
>  	LIB=$(strip $(5));	\
> +	DST=$(strip $(6)); \
>  	$(call install_check, install_lib);	\
> -	echo "ptxd_install_lib '$$LIB' '$$OWN' '$$GRP' '$$PER'" >> "$(STATEDIR)/$$XPKG.cmds"
> +	echo "ptxd_install_lib '$$LIB' '$$DST' '$$OWN' '$$GRP' '$$PER'" >> "$(STATEDIR)/$$XPKG.cmds"
>  
>  #
>  # install_replace
> diff --git a/scripts/lib/ptxd_make_xpkg_pkg.sh b/scripts/lib/ptxd_make_xpkg_pkg.sh
> index 86196a2..393ea1b 100644
> --- a/scripts/lib/ptxd_make_xpkg_pkg.sh
> +++ b/scripts/lib/ptxd_make_xpkg_pkg.sh
> @@ -744,9 +744,10 @@ export -f ptxd_install_shared
>  ptxd_install_lib() {
>      local lib_dir=$(ptxd_get_lib_dir)
>      local lib="$1"
> -    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
>  	    find "${dir}" -type f -path "${dir}/${lib}.so*"; done 2>/dev/null)"
>  
>      if [ ! -f "${file}" ]; then
> -- 
> 1.8.5.4
> 
> 
> -- 
> ptxdist mailing list
> ptxdist@pengutronix.de
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

      reply	other threads:[~2014-09-30  8:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-29 12:58 jon
2014-09-30  8:04 ` Michael Olbrich [this message]

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=20140930080413.GD24288@pengutronix.de \
    --to=m.olbrich@pengutronix.de \
    --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