* Re: [PATCH] classes: Modify rootfs_ipk.bbclass for -force-overwrite.
2010-10-29 14:08 [PATCH] classes: Modify rootfs_ipk.bbclass for -force-overwrite Alex Ferguson
@ 2010-10-29 14:21 ` Eric Bénard
2010-10-29 14:39 ` Graeme Gregory
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: Eric Bénard @ 2010-10-29 14:21 UTC (permalink / raw)
To: openembedded-devel
Le 29/10/2010 16:08, Alex Ferguson a écrit :
> Rationale: In Jlime we ship a package called jlime-extras which
> contains several files (configuration files, scripts, etc.), some
> of which conflict with files provided by other packages. This is
> intentional, and is for distro customization purposes. For example
> we ship a modified version of the /usr/bin/startx script, some
> alternative icons for applications, some modified .desktop files
> and so on. Building an image with this jlime-extras package fails,
> of course, due to conflicting files.
>
> To overcome this issue, I have added a base-conditional to
> rootfs_ipk.bbclass, adding the PACKAGE_FORCE_OVERWRITE variable
> to IPKG_ARGS which enables -force-overwrite for opkg, and which
> can be used in image recipes individually without affecting others.
>
> I believe this functionality might be useful for everyone and comes
> at almost no additional cost, which is why I'm sending this patch
> for consideration by the OE developers.
>
> I'd be more than happy to help in any way in order to get this in.
>
> Thank you.
>
> Signed-off-by: Alex Ferguson<thoughtmonster@gmail.com>
Acked-by: Eric Bénard <eric@eukrea.com>
> ---
> classes/rootfs_ipk.bbclass | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/classes/rootfs_ipk.bbclass b/classes/rootfs_ipk.bbclass
> index a4a8563..dd8586a 100644
> --- a/classes/rootfs_ipk.bbclass
> +++ b/classes/rootfs_ipk.bbclass
> @@ -9,9 +9,10 @@ do_rootfs[depends] += "opkg-native:do_populate_sysroot"
> do_rootfs[lockfiles] = "${DEPLOY_DIR_IPK}.lock"
>
> IPKG_TMP_DIR = "${IMAGE_ROOTFS}-tmp"
> -IPKG_ARGS = "-f ${IPKGCONF_TARGET} -o ${IMAGE_ROOTFS} -t ${IPKG_TMP_DIR} ${@base_conditional("PACKAGE_INSTALL_NO_DEPS", "1", "-nodeps", "", d)}"
> +IPKG_ARGS = "-f ${IPKGCONF_TARGET} -o ${IMAGE_ROOTFS} -t ${IPKG_TMP_DIR} ${@base_conditional("PACKAGE_INSTALL_NO_DEPS", "1", "-nodeps", "", d)} ${@base_conditional("PACKAGE_FORCE_OVERWRITE", "1", "-force-overwrite", "", d)}"
>
> PACKAGE_INSTALL_NO_DEPS ?= "0"
> +PACKAGE_FORCE_OVERWRITE ?= "0"
>
> # What support to provide for online management of packages at run time?
> # full -> traditional system, opkg is installed with all metadata
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] classes: Modify rootfs_ipk.bbclass for -force-overwrite.
2010-10-29 14:08 [PATCH] classes: Modify rootfs_ipk.bbclass for -force-overwrite Alex Ferguson
2010-10-29 14:21 ` Eric Bénard
@ 2010-10-29 14:39 ` Graeme Gregory
2010-10-29 14:55 ` Martin Jansa
2010-10-29 17:44 ` Khem Raj
3 siblings, 0 replies; 6+ messages in thread
From: Graeme Gregory @ 2010-10-29 14:39 UTC (permalink / raw)
To: openembedded-devel
This is generally an unsafe way to do things, but I dont see an issue
with allowing a user or distro to force it.
Acked-by: Graeme Gregory <dp@xora.org.uk>
On 29/10/2010 15:08, Alex Ferguson wrote:
> Rationale: In Jlime we ship a package called jlime-extras which
> contains several files (configuration files, scripts, etc.), some
> of which conflict with files provided by other packages. This is
> intentional, and is for distro customization purposes. For example
> we ship a modified version of the /usr/bin/startx script, some
> alternative icons for applications, some modified .desktop files
> and so on. Building an image with this jlime-extras package fails,
> of course, due to conflicting files.
>
> To overcome this issue, I have added a base-conditional to
> rootfs_ipk.bbclass, adding the PACKAGE_FORCE_OVERWRITE variable
> to IPKG_ARGS which enables -force-overwrite for opkg, and which
> can be used in image recipes individually without affecting others.
>
> I believe this functionality might be useful for everyone and comes
> at almost no additional cost, which is why I'm sending this patch
> for consideration by the OE developers.
>
> I'd be more than happy to help in any way in order to get this in.
>
> Thank you.
>
> Signed-off-by: Alex Ferguson <thoughtmonster@gmail.com>
> ---
> classes/rootfs_ipk.bbclass | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/classes/rootfs_ipk.bbclass b/classes/rootfs_ipk.bbclass
> index a4a8563..dd8586a 100644
> --- a/classes/rootfs_ipk.bbclass
> +++ b/classes/rootfs_ipk.bbclass
> @@ -9,9 +9,10 @@ do_rootfs[depends] += "opkg-native:do_populate_sysroot"
> do_rootfs[lockfiles] = "${DEPLOY_DIR_IPK}.lock"
>
> IPKG_TMP_DIR = "${IMAGE_ROOTFS}-tmp"
> -IPKG_ARGS = "-f ${IPKGCONF_TARGET} -o ${IMAGE_ROOTFS} -t ${IPKG_TMP_DIR} ${@base_conditional("PACKAGE_INSTALL_NO_DEPS", "1", "-nodeps", "", d)}"
> +IPKG_ARGS = "-f ${IPKGCONF_TARGET} -o ${IMAGE_ROOTFS} -t ${IPKG_TMP_DIR} ${@base_conditional("PACKAGE_INSTALL_NO_DEPS", "1", "-nodeps", "", d)} ${@base_conditional("PACKAGE_FORCE_OVERWRITE", "1", "-force-overwrite", "", d)}"
>
> PACKAGE_INSTALL_NO_DEPS ?= "0"
> +PACKAGE_FORCE_OVERWRITE ?= "0"
>
> # What support to provide for online management of packages at run time?
> # full -> traditional system, opkg is installed with all metadata
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] classes: Modify rootfs_ipk.bbclass for -force-overwrite.
2010-10-29 14:08 [PATCH] classes: Modify rootfs_ipk.bbclass for -force-overwrite Alex Ferguson
2010-10-29 14:21 ` Eric Bénard
2010-10-29 14:39 ` Graeme Gregory
@ 2010-10-29 14:55 ` Martin Jansa
2010-10-29 15:40 ` Alex Ferguson
2010-10-29 17:44 ` Khem Raj
3 siblings, 1 reply; 6+ messages in thread
From: Martin Jansa @ 2010-10-29 14:55 UTC (permalink / raw)
To: openembedded-devel; +Cc: Alex Ferguson
On Fri, Oct 29, 2010 at 05:08:54PM +0300, Alex Ferguson wrote:
> Rationale: In Jlime we ship a package called jlime-extras which
> contains several files (configuration files, scripts, etc.), some
> of which conflict with files provided by other packages. This is
> intentional, and is for distro customization purposes. For example
> we ship a modified version of the /usr/bin/startx script, some
> alternative icons for applications, some modified .desktop files
> and so on. Building an image with this jlime-extras package fails,
> of course, due to conflicting files.
Why not modify the original files in corresponding recipes with distro
override?
Problem with this kind of package overwritting other packages is when
original package is upgraded (PR bump or even just DISTRO_PR) it forces
user to also use -force-overwrite and then he will loose those
customizations.
I don't have problem with it as long as it's conditional, but I would be
very carefull with using it. IMHO this is good only if you're building
images which are not supposed to be upgraded by user with ie opkg on target.
Regards,
--
Martin 'JaMa' Jansa jabber: Martin.Jansa@gmail.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] classes: Modify rootfs_ipk.bbclass for -force-overwrite.
2010-10-29 14:55 ` Martin Jansa
@ 2010-10-29 15:40 ` Alex Ferguson
0 siblings, 0 replies; 6+ messages in thread
From: Alex Ferguson @ 2010-10-29 15:40 UTC (permalink / raw)
To: openembedded-devel
First of all, thank you for your quick reply.
So,
On Fri, Oct 29, 2010 at 5:55 PM, Martin Jansa <martin.jansa@gmail.com>wrote:
> Why not modify the original files in corresponding recipes with distro
> override?
>
I understand this would be the best solution all around, but in most cases
this is impractical, as it is the case with icon themes. These
customizations change from
time to time and having to modify several packages (which will have to go
upstream),
is something I'd like to avoid.
> Problem with this kind of package overwritting other packages is when
> original package is upgraded (PR bump or even just DISTRO_PR) it forces
> user to also use -force-overwrite and then he will loose those
> customizations.
>
> I don't have problem with it as long as it's conditional, but I would be
> very carefull with using it. IMHO this is good only if you're building
> images which are not supposed to be upgraded by user with ie opkg on target<Martin.Jansa@gmail.com>
>
Our images are generally not upgraded but a simple workaround would be
pushing
the PR for jlime-extras along with other packages which might conflict,
although you
are correct as far as the user having to do -force-overwrite himself.
Thinking about it, it seems like a workaround, one which might cause some
issues down the road. I have nothing else for now and it certainly doesn't
hurt having the option there. I might just have to think of something better
for the future.
Thank you,
Alex Ferguson.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] classes: Modify rootfs_ipk.bbclass for -force-overwrite.
2010-10-29 14:08 [PATCH] classes: Modify rootfs_ipk.bbclass for -force-overwrite Alex Ferguson
` (2 preceding siblings ...)
2010-10-29 14:55 ` Martin Jansa
@ 2010-10-29 17:44 ` Khem Raj
3 siblings, 0 replies; 6+ messages in thread
From: Khem Raj @ 2010-10-29 17:44 UTC (permalink / raw)
To: openembedded-devel; +Cc: Alex Ferguson
On Fri, Oct 29, 2010 at 7:08 AM, Alex Ferguson <thoughtmonster@gmail.com> wrote:
> Rationale: In Jlime we ship a package called jlime-extras which
> contains several files (configuration files, scripts, etc.), some
> of which conflict with files provided by other packages. This is
> intentional, and is for distro customization purposes. For example
> we ship a modified version of the /usr/bin/startx script, some
> alternative icons for applications, some modified .desktop files
> and so on. Building an image with this jlime-extras package fails,
> of course, due to conflicting files.
>
hmmm ideally there should be no conflicts and update alternative methods
should be used to provide alternatives.
> To overcome this issue, I have added a base-conditional to
> rootfs_ipk.bbclass, adding the PACKAGE_FORCE_OVERWRITE variable
> to IPKG_ARGS which enables -force-overwrite for opkg, and which
> can be used in image recipes individually without affecting others.
>
you could have added distro specific overrides or even your own layer
to provide these
files per recipe instead of collecting them into a another recipe
which would step
on everyone. I think if we let this happen it can be chosen as a quick
workaround by
many and thats not good.
> I believe this functionality might be useful for everyone and comes
> at almost no additional cost, which is why I'm sending this patch
> for consideration by the OE developers.
>
> I'd be more than happy to help in any way in order to get this in.
>
> Thank you.
>
> Signed-off-by: Alex Ferguson <thoughtmonster@gmail.com>
> ---
> classes/rootfs_ipk.bbclass | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/classes/rootfs_ipk.bbclass b/classes/rootfs_ipk.bbclass
> index a4a8563..dd8586a 100644
> --- a/classes/rootfs_ipk.bbclass
> +++ b/classes/rootfs_ipk.bbclass
> @@ -9,9 +9,10 @@ do_rootfs[depends] += "opkg-native:do_populate_sysroot"
> do_rootfs[lockfiles] = "${DEPLOY_DIR_IPK}.lock"
>
> IPKG_TMP_DIR = "${IMAGE_ROOTFS}-tmp"
> -IPKG_ARGS = "-f ${IPKGCONF_TARGET} -o ${IMAGE_ROOTFS} -t ${IPKG_TMP_DIR} ${@base_conditional("PACKAGE_INSTALL_NO_DEPS", "1", "-nodeps", "", d)}"
> +IPKG_ARGS = "-f ${IPKGCONF_TARGET} -o ${IMAGE_ROOTFS} -t ${IPKG_TMP_DIR} ${@base_conditional("PACKAGE_INSTALL_NO_DEPS", "1", "-nodeps", "", d)} ${@base_conditional("PACKAGE_FORCE_OVERWRITE", "1", "-force-overwrite", "", d)}"
>
> PACKAGE_INSTALL_NO_DEPS ?= "0"
> +PACKAGE_FORCE_OVERWRITE ?= "0"
>
> # What support to provide for online management of packages at run time?
> # full -> traditional system, opkg is installed with all metadata
> --
> 1.7.3.2
>
>
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
>
^ permalink raw reply [flat|nested] 6+ messages in thread