From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from ptx.hi.pengutronix.de ([2001:6f8:1178:2:5054:ff:fec0:8e10] ident=Debian-exim) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1UmOIy-0000fB-4n for ptxdist@pengutronix.de; Tue, 11 Jun 2013 15:08:08 +0200 Received: from mol by ptx.hi.pengutronix.de with local (Exim 4.72) (envelope-from ) id 1UmOIv-0004TU-Ud for ptxdist@pengutronix.de; Tue, 11 Jun 2013 15:08:05 +0200 Date: Tue, 11 Jun 2013 15:08:05 +0200 From: Michael Olbrich Message-ID: <20130611130805.GF7381@pengutronix.de> References: <569BA28A76BB454CB22FBA1907D7E9E3B884090F@SOF-EXCHANGE.sofrel.local> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <569BA28A76BB454CB22FBA1907D7E9E3B884090F@SOF-EXCHANGE.sofrel.local> Subject: Re: [ptxdist] ptxdist newpackages templates Reply-To: ptxdist@pengutronix.de List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: ptxdist-bounces@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de To: ptxdist@pengutronix.de 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