* [ptxdist] How to update another packet at install @ 2011-10-22 9:57 Philippe Corbes 2011-10-22 19:24 ` Jon Ringle 0 siblings, 1 reply; 5+ messages in thread From: Philippe Corbes @ 2011-10-22 9:57 UTC (permalink / raw) To: ptxdist [-- Attachment #1.1: Type: text/plain, Size: 394 bytes --] Hello, I need help to solve a problem at packet install. I made a packet. It's a theme for pekwm. It depend of pekwm. But when I install this theme, I would like to update the config file of pekwm to use this them as default theme. There is may be something to do at "install.post" phase. I dont find how to do. Does anybody can help me to solve this? Thanks for your help. Philippe Corbes [-- Attachment #1.2: Type: text/html, Size: 440 bytes --] [-- Attachment #2: Type: text/plain, Size: 48 bytes --] -- ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [ptxdist] How to update another packet at install 2011-10-22 9:57 [ptxdist] How to update another packet at install Philippe Corbes @ 2011-10-22 19:24 ` Jon Ringle 2011-10-22 19:50 ` Robert Schwebel 2011-10-24 20:49 ` Philippe Corbes 0 siblings, 2 replies; 5+ messages in thread From: Jon Ringle @ 2011-10-22 19:24 UTC (permalink / raw) To: ptxdist On Sat, Oct 22, 2011 at 5:57 AM, Philippe Corbes <philippe.corbes@gmail.com> wrote: > > Hello, > > I need help to solve a problem at packet install. > > I made a packet. It's a theme for pekwm. It depend of pekwm. But when I install this theme, I would like to update the config file of pekwm to use this them as default theme. > > There is may be something to do at "install.post" phase. I dont find how to do. Does anybody can help me to solve this? Create a rules/<packet>.postinst The <packet>.postinst script will get called at targetinstall phase during building, so you probably want to have your script do nothing at this time. The way I handled this is that "configure" will be $1 when the packet is installed on the target. This is my template for <packet>.postinst: #! /bin/sh case "$1" in configure) # Do stuff when the packet is installed on target ;; esac Jon -- ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [ptxdist] How to update another packet at install 2011-10-22 19:24 ` Jon Ringle @ 2011-10-22 19:50 ` Robert Schwebel 2011-10-24 20:49 ` Philippe Corbes 1 sibling, 0 replies; 5+ messages in thread From: Robert Schwebel @ 2011-10-22 19:50 UTC (permalink / raw) To: ptxdist On Sat, Oct 22, 2011 at 03:24:33PM -0400, Jon Ringle wrote: > Create a rules/<packet>.postinst > The <packet>.postinst script will get called at targetinstall phase > during building, so you probably want to have your script do nothing > at this time. The way I handled this is that "configure" will be $1 > when the packet is installed on the target. This is my template for > <packet>.postinst: You can use $DESTDIR to detect if you are running at targetinstall or on runtime. rsc -- 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] 5+ messages in thread
* Re: [ptxdist] How to update another packet at install 2011-10-22 19:24 ` Jon Ringle 2011-10-22 19:50 ` Robert Schwebel @ 2011-10-24 20:49 ` Philippe Corbes 2011-10-25 12:04 ` Jon Ringle 1 sibling, 1 reply; 5+ messages in thread From: Philippe Corbes @ 2011-10-24 20:49 UTC (permalink / raw) To: ptxdist [-- Attachment #1.1: Type: text/plain, Size: 2817 bytes --] Jon, First, thank you for you mail. I updated the pekwm-clearlooks.make file. But nothing, no error, no worning, nothing. It's like if this code is not executed. Here is the code. What do you tink about this? # ---------------------------------------------------------------------------- # Target-Install # ---------------------------------------------------------------------------- PEKWM_CLEARLOOKS_INSTALL_DIR := $(call remove_quotes, $(PTXCONF_PEKWM_INSTALL_CONFIG_IN_DIR)) $(STATEDIR)/pekwm-clearlooks.targetinstall: @$(call targetinfo) @$(call install_init, pekwm-clearlooks) @$(call install_fixup, pekwm-clearlooks,PRIORITY,optional) @$(call install_fixup, pekwm-clearlooks,SECTION,base) @$(call install_fixup, pekwm-clearlooks,AUTHOR,"Philippe Corbes < philippe.corbes@gmail.com>") @$(call install_fixup, pekwm-clearlooks,DESCRIPTION,missing) @$(call install_copy, pekwm, 0, 0, 0644, -, \ /usr/share/pekwm/themes/default/theme) @cd $(PEKWM_CLEARLOOKS_PKGDIR) && \ find usr/share/pekwm/themes/Clearlooks -type f | while read file; do \ $(call install_copy, pekwm-clearlooks, 0, 0, 0644, -, /$$file); \ done @$(call install_finish, pekwm-clearlooks) @$(call touch) # ---------------------------------------------------------------------------- # Target-Postinst # ---------------------------------------------------------------------------- $(STATEDIR)/pekwm-clearlooks.postinst: #!/bin/sh case "$1" in configure) $(call install_replace, pekwm-clearlooks, $(PEKWM_CLEARLOOKS_INSTALL_DIR).pekwm/config, \ "usr/share/pekwm/themes/default", "usr/share/pekwm/themes/Clearlooks" ); ;; esac # vim: syntax=make Thank you, Philippe 2011/10/22 Jon Ringle <jon@ringle.org> > On Sat, Oct 22, 2011 at 5:57 AM, Philippe Corbes > <philippe.corbes@gmail.com> wrote: > > > > Hello, > > > > I need help to solve a problem at packet install. > > > > I made a packet. It's a theme for pekwm. It depend of pekwm. But when I > install this theme, I would like to update the config file of pekwm to use > this them as default theme. > > > > There is may be something to do at "install.post" phase. I dont find how > to do. Does anybody can help me to solve this? > > Create a rules/<packet>.postinst > The <packet>.postinst script will get called at targetinstall phase > during building, so you probably want to have your script do nothing > at this time. The way I handled this is that "configure" will be $1 > when the packet is installed on the target. This is my template for > <packet>.postinst: > > #! /bin/sh > > case "$1" in > configure) > # Do stuff when the packet is installed on target > ;; > esac > > Jon > > -- > ptxdist mailing list > ptxdist@pengutronix.de > [-- Attachment #1.2: Type: text/html, Size: 3680 bytes --] [-- Attachment #2: Type: text/plain, Size: 48 bytes --] -- ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [ptxdist] How to update another packet at install 2011-10-24 20:49 ` Philippe Corbes @ 2011-10-25 12:04 ` Jon Ringle 0 siblings, 0 replies; 5+ messages in thread From: Jon Ringle @ 2011-10-25 12:04 UTC (permalink / raw) To: ptxdist On Mon, Oct 24, 2011 at 4:49 PM, Philippe Corbes <philippe.corbes@gmail.com> wrote: > #!/bin/sh > case "$1" in > configure) > $(call install_replace, pekwm-clearlooks, > $(PEKWM_CLEARLOOKS_INSTALL_DIR).pekwm/config, \ > "usr/share/pekwm/themes/default", > "usr/share/pekwm/themes/Clearlooks" ); > ;; > esac Re-read my original response. A script like the above should be in a *file* rules/pekwm-clearlooks.postinst. Of course the $(call install_replace ...) is not valid at install time on the target. Jon -- ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-10-25 12:04 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2011-10-22 9:57 [ptxdist] How to update another packet at install Philippe Corbes 2011-10-22 19:24 ` Jon Ringle 2011-10-22 19:50 ` Robert Schwebel 2011-10-24 20:49 ` Philippe Corbes 2011-10-25 12:04 ` Jon Ringle
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox