* [ptxdist] ptxdist newpackages templates
@ 2013-06-11 9:23 FLOC'H Tanguy
0 siblings, 0 replies; 4+ messages in thread
From: FLOC'H Tanguy @ 2013-06-11 9:23 UTC (permalink / raw)
To: ptxdist
[-- Attachment #1.1: Type: text/plain, Size: 861 bytes --]
Hi!
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?
- Is this a better way to add custom templates, instead of copying + editing ptxd_lib_template.sh?
Thank you very much !
Tanguy Floc'h
[-- Attachment #1.2: Type: text/html, Size: 7572 bytes --]
[-- Attachment #2: Type: text/plain, Size: 48 bytes --]
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 4+ messages in thread
* [ptxdist] ptxdist newpackages templates
@ 2013-06-11 9:26 FLOC'H Tanguy
2013-06-11 13:08 ` Michael Olbrich
0 siblings, 1 reply; 4+ messages in thread
From: FLOC'H Tanguy @ 2013-06-11 9:26 UTC (permalink / raw)
To: ptxdist
Hi!
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?
- Is this a better way to add custom templates, instead of copying + editing ptxd_lib_template.sh?
Thank you very much !
Tanguy Floc'h
(sorry, previous mail wasn't in plain text)
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [ptxdist] ptxdist newpackages templates
2013-06-11 9:26 FLOC'H Tanguy
@ 2013-06-11 13:08 ` Michael Olbrich
2013-06-12 9:31 ` FLOC'H Tanguy
0 siblings, 1 reply; 4+ messages in thread
From: Michael Olbrich @ 2013-06-11 13:08 UTC (permalink / raw)
To: ptxdist
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [ptxdist] ptxdist newpackages templates
2013-06-11 13:08 ` Michael Olbrich
@ 2013-06-12 9:31 ` FLOC'H Tanguy
0 siblings, 0 replies; 4+ messages in thread
From: FLOC'H Tanguy @ 2013-06-12 9:31 UTC (permalink / raw)
To: ptxdist
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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-06-12 9:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-11 9:23 [ptxdist] ptxdist newpackages templates FLOC'H Tanguy
2013-06-11 9:26 FLOC'H Tanguy
2013-06-11 13:08 ` Michael Olbrich
2013-06-12 9:31 ` FLOC'H Tanguy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox