From mboxrd@z Thu Jan  1 00:00:00 1970
Return-path: <ptxdist-bounces@pengutronix.de>
Received: from smtp-out04.msg.oleane.net ([62.161.7.2])
	by metis.ext.pengutronix.de with esmtp (Exim 4.72)
	(envelope-from <t.floch@sofrel.com>) id 1UmhPB-0007BZ-PA
	for ptxdist@pengutronix.de; Wed, 12 Jun 2013 11:31:50 +0200
Received: from smtp26.msg.oleane.net (smtp26.mail.priv [172.17.20.148]) 
	by smtp-out04.msg.oleane.net with ESMTP id r5C9Vmv0018807
	for <ptxdist@pengutronix.de>; Wed, 12 Jun 2013 11:31:48 +0200
Received: from smtp26.msg.oleane.net (localhost [127.0.0.1]) 
	by smtp26.msg.oleane.net (MTA-AV) with ESMTP id r5C9Vl0c025964
	for <ptxdist@pengutronix.de>; Wed, 12 Jun 2013 11:31:47 +0200
Received: from mail.sofrel.com (mailhost.sofrel.com [194.250.107.91]) 
	by smtp26.msg.oleane.net (MTA) with ESMTP id r5C9VlKS025888
	for <ptxdist@pengutronix.de>; Wed, 12 Jun 2013 11:31:47 +0200
From: "FLOC'H Tanguy" <t.floch@sofrel.com>
Date: Wed, 12 Jun 2013 09:31:46 +0000
Message-ID: <569BA28A76BB454CB22FBA1907D7E9E3B88409B6@SOF-EXCHANGE.sofrel.local>
References: <569BA28A76BB454CB22FBA1907D7E9E3B884090F@SOF-EXCHANGE.sofrel.local>
	<20130611130805.GF7381@pengutronix.de>
In-Reply-To: <20130611130805.GF7381@pengutronix.de>
Content-Language: fr-FR
MIME-Version: 1.0
Subject: Re: [ptxdist] ptxdist newpackages templates
Reply-To: ptxdist@pengutronix.de
List-Id: PTXdist Development Mailing List <ptxdist.pengutronix.de>
List-Unsubscribe: <http://metis.pengutronix.de/cgi-bin/mailman/options/ptxdist>, 
	<mailto:ptxdist-request@pengutronix.de?subject=unsubscribe>
List-Archive: <http://metis.pengutronix.de/pipermail/ptxdist>
List-Post: <mailto:ptxdist@pengutronix.de>
List-Help: <mailto:ptxdist-request@pengutronix.de?subject=help>
List-Subscribe: <http://metis.pengutronix.de/cgi-bin/mailman/listinfo/ptxdist>, 
	<mailto:ptxdist-request@pengutronix.de?subject=subscribe>
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Sender: ptxdist-bounces@pengutronix.de
Errors-To: ptxdist-bounces@pengutronix.de
To: "ptxdist@pengutronix.de" <ptxdist@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=A0: ptxdist-bounces@pengutronix.de [mailto:ptxdist-bounces@pengutronix.d=
e] De la part de Michael Olbrich
Envoy=E9=A0: mardi 11 juin 2013 15:08
=C0=A0: ptxdist@pengutronix.de
Objet=A0: 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 c=
ustom 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 wo=
rking. I've committed a fix for this.

> - Is this a better way to add custom templates, instead of copying + edit=
ing
>   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[@]}]=3D"foo"
ptxd_template_help_list[${#ptxd_template_help_list[@]}]=3D"create package t=
o 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