mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: "FLOC'H Tanguy" <t.floch@sofrel.com>
To: "ptxdist@pengutronix.de" <ptxdist@pengutronix.de>
Subject: Re: [ptxdist] ptxdist newpackages templates
Date: Wed, 12 Jun 2013 09:31:46 +0000	[thread overview]
Message-ID: <569BA28A76BB454CB22FBA1907D7E9E3B88409B6@SOF-EXCHANGE.sofrel.local> (raw)
In-Reply-To: <20130611130805.GF7381@pengutronix.de>

Hi,

Thank you very much for your answer, and the quick fix!
Everything is working just fine now.

Cheers,
Tanguy Floc'h

-----Message d'origine-----
De : ptxdist-bounces@pengutronix.de [mailto:ptxdist-bounces@pengutronix.de] De la part de Michael Olbrich
Envoyé : mardi 11 juin 2013 15:08
À : ptxdist@pengutronix.de
Objet : Re: [ptxdist] ptxdist newpackages templates

Hi,

On Tue, Jun 11, 2013 at 09:26:39AM +0000, FLOC'H Tanguy wrote:
> I would like to be able to create "custom new packages", using the 
> command "ptxdist newpackage", and a custom template.
> 
> I'm using the following method:
> - Create one folder ptxdist-project/rules/templates for my custom 
> template, based on /usr/lib/ptxdist-2013.05.0/rules/templates
> - Copy /usr/lib/ptxdist-2013.05.0/scripts/lib/ptxd_lib_template.sh to 
> ptxdist-project/scripts/lib/ptxd_lib_template.sh
> - Edit ptxdist-project/scripts/lib/ptxd_lib_template.sh, to consider my custom template.
> 
> It doesn't work:
> ptxdist-project/scripts/lib/ptxd_lib_template.sh doesn't seem to be taken into account.
> 
> So my questions:
> - What is wrong is my method?

You did nothing wrong. There is a bug in PTXdist that prevents this from working. I've committed a fix for this.

> - Is this a better way to add custom templates, instead of copying + editing
>   ptxd_lib_template.sh?

You don't need to copy ptxd_lib_template.sh. Just adding your template is
enough:
------- scripts/lib/ptxd_lib_template.sh----------------
ptxd_template_new_foo() {
    [...]
    ptxd_template_write_rules
}
export -f ptxd_template_new_foo
ptxd_template_help_list[${#ptxd_template_help_list[@]}]="foo"
ptxd_template_help_list[${#ptxd_template_help_list[@]}]="create package to install foo"
----------------------------------------------------------

Michael

-- 
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

-- 
ptxdist mailing list
ptxdist@pengutronix.de

  reply	other threads:[~2013-06-12  9:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-11  9:26 FLOC'H Tanguy
2013-06-11 13:08 ` Michael Olbrich
2013-06-12  9:31   ` FLOC'H Tanguy [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-06-11  9:23 FLOC'H Tanguy

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=569BA28A76BB454CB22FBA1907D7E9E3B88409B6@SOF-EXCHANGE.sofrel.local \
    --to=t.floch@sofrel.com \
    --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