All of lore.kernel.org
 help / color / mirror / Atom feed
From: JC <jc@vtkloud.com>
To: "yocto@yoctoproject.org" <yocto@yoctoproject.org>
Subject: adding specific config files
Date: Wed, 04 Sep 2013 20:58:47 +0200	[thread overview]
Message-ID: <522782E7.8080509@vtkloud.com> (raw)

Hi,

In my project, we have our own rpm repository and we use smartpm on the 
target.
In order to have the target setup with the repo out of the box, we of 
course have added "package-management" in IMAGE_FEATURES. Now I'd like 
the target to have our repo address already configured.

The best way I found was to create a recipe in my overlay and hacking 
the system a little bit this way :
do_install() {
    if 
${@base_contains('IMAGE_FEATURES','package-management','true','false',d)}; 
then
         install -d ${D}/${sysconfdir}
         install -m 644 ${WORKDIR}/config.in ${D}/var/lib/smart/config
    fi
}

where "config.in" is a simple copy of the non-human readable version of 
smartpm config file, generated manually on the target.

I was wondering if there would be a better way such as do not test in 
the do_install, but rather make the recipe dependent on the 
"package-management" image feature ? (so that do_install wouldn't even 
be considered if the option is not set), or any other smarter idea.

Thanks a lot,

Regards
Jay



             reply	other threads:[~2013-09-04 18:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-04 18:58 JC [this message]
2013-09-04 19:58 ` adding specific config files JC
2013-09-04 20:10   ` JC
2013-09-05  9:32     ` Paul Eggleton
2013-09-05  9:45       ` JC
2013-09-05 10:00         ` Paul Eggleton
2013-09-05 10:05           ` JC
2013-09-05 13:09           ` (solved) " JC

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=522782E7.8080509@vtkloud.com \
    --to=jc@vtkloud.com \
    --cc=yocto@yoctoproject.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.