All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] Change update-alternatives provider
@ 2014-01-16 17:59 Paul Barker
  2014-01-16 17:59 ` [PATCH v2 1/3] opkg-utils: Upgrade to latest git HEAD Paul Barker
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Paul Barker @ 2014-01-16 17:59 UTC (permalink / raw)
  To: openembedded-core

The update-alternatives script has been copied from opkg to opkg-utils so the
openembedded recipe for opkg-utils is updated accordingly. Changing the default
provider of update-alternatives to opkg-utils allows dependencies to be added to
the opkg recipe without causing circular dependency loops. This series partially
solves Yocto Project issue 4836.

Changes in v2:

    - Reordered variables in opkg-utils recipe
    - Added nativesdk class to opkg-utils

Paul Barker (3):
  opkg-utils: Upgrade to latest git HEAD
  default-providers: Change update-alternatives provider to opkg-utils
  opkg: No longer PROVIDES update-alternatives

 meta/conf/distro/include/default-providers.inc     |  6 +++---
 meta/recipes-devtools/opkg-utils/opkg-utils_git.bb |  9 +++++++--
 meta/recipes-devtools/opkg/opkg.inc                | 12 +++---------
 3 files changed, 13 insertions(+), 14 deletions(-)

-- 
1.8.5.2



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v2 1/3] opkg-utils: Upgrade to latest git HEAD
  2014-01-16 17:59 [PATCH v2 0/3] Change update-alternatives provider Paul Barker
@ 2014-01-16 17:59 ` Paul Barker
  2014-01-16 17:59 ` [PATCH v2 2/3] default-providers: Change update-alternatives provider to opkg-utils Paul Barker
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Paul Barker @ 2014-01-16 17:59 UTC (permalink / raw)
  To: openembedded-core

The latest version of opkg-utils PROVIDES virtual/update-alternatives via a
script copied from opkg, packaged as update-alternatives-opkg.

The nativesdk class is added to the recipe to ensure that
nativesdk-update-alternatives-opkg is built.

Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
---
 meta/recipes-devtools/opkg-utils/opkg-utils_git.bb | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb b/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb
index 714fc51..eb54a81 100644
--- a/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb
+++ b/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb
@@ -4,8 +4,9 @@ HOMEPAGE = "http://code.google.com/p/opkg/"
 LICENSE = "GPLv2+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
                     file://opkg.py;beginline=1;endline=18;md5=15917491ad6bf7acc666ca5f7cc1e083"
+PROVIDES += "virtual/update-alternatives"
 
-SRCREV = "757a1664a440c60e8126443bf984e4bdf374c327"
+SRCREV = "fd4a3a4c20ada47b19e89849ddb6ff87904f01d2"
 PV = "0.1.8+git${SRCPV}"
 
 SRC_URI = "git://git.yoctoproject.org/opkg-utils"
@@ -21,7 +22,11 @@ do_install() {
 # Avoid circular dependencies from package_ipk.bbclass
 PACKAGES_class-native = ""
 
+PACKAGES =+ "update-alternatives-opkg"
+FILES_update-alternatives-opkg = "${bindir}/update-alternatives"
+
 RDEPENDS_${PN} = "python python-shell python-io python-math python-crypt python-logging python-fcntl python-subprocess python-pickle python-compression python-textutils python-stringold"
 RDEPENDS_${PN}_class-native = ""
+RPROVIDES_update-alternatives-opkg = "update-alternatives"
 
-BBCLASSEXTEND = "native"
+BBCLASSEXTEND = "native nativesdk"
-- 
1.8.5.2



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH v2 2/3] default-providers: Change update-alternatives provider to opkg-utils
  2014-01-16 17:59 [PATCH v2 0/3] Change update-alternatives provider Paul Barker
  2014-01-16 17:59 ` [PATCH v2 1/3] opkg-utils: Upgrade to latest git HEAD Paul Barker
@ 2014-01-16 17:59 ` Paul Barker
  2014-01-16 17:59 ` [PATCH v2 3/3] opkg: No longer PROVIDES update-alternatives Paul Barker
  2014-01-17 10:47 ` [PATCH v2 0/3] Change update-alternatives provider Richard Purdie
  3 siblings, 0 replies; 6+ messages in thread
From: Paul Barker @ 2014-01-16 17:59 UTC (permalink / raw)
  To: openembedded-core

This allows dependencies to be added to the opkg recipe without causing circular
dependency loops. As opkg-utils has minimal dependencies it is the best recipe
to provide update-alternatives.

This partially solves Yocto Project issue 4836. More work is still needed for a
complete solution.

Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
---
 meta/conf/distro/include/default-providers.inc | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/meta/conf/distro/include/default-providers.inc b/meta/conf/distro/include/default-providers.inc
index e2b0892..419ffcd 100644
--- a/meta/conf/distro/include/default-providers.inc
+++ b/meta/conf/distro/include/default-providers.inc
@@ -10,15 +10,15 @@ PREFERRED_PROVIDER_virtual/libgl ?= "mesa"
 PREFERRED_PROVIDER_virtual/libgles1 ?= "mesa"
 PREFERRED_PROVIDER_virtual/libgles2 ?= "mesa"
 PREFERRED_PROVIDER_virtual/mesa ?= "mesa"
-PREFERRED_PROVIDER_virtual/update-alternatives ?= "opkg"
-PREFERRED_PROVIDER_virtual/update-alternatives-native ?= "opkg-native"
+PREFERRED_PROVIDER_virtual/update-alternatives ?= "opkg-utils"
+PREFERRED_PROVIDER_virtual/update-alternatives-native ?= "opkg-utils-native"
 PREFERRED_PROVIDER_virtual/libx11 ?= "libx11"
 PREFERRED_PROVIDER_xf86-video-intel ?= "xf86-video-intel"
 
 #
 # Default virtual runtime providers
 #
-VIRTUAL-RUNTIME_update-alternatives ?= "update-alternatives-cworth"
+VIRTUAL-RUNTIME_update-alternatives ?= "update-alternatives-opkg"
 VIRTUAL-RUNTIME_apm ?= "apm"
 VIRTUAL-RUNTIME_alsa-state ?= "alsa-state"
 
-- 
1.8.5.2



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH v2 3/3] opkg: No longer PROVIDES update-alternatives
  2014-01-16 17:59 [PATCH v2 0/3] Change update-alternatives provider Paul Barker
  2014-01-16 17:59 ` [PATCH v2 1/3] opkg-utils: Upgrade to latest git HEAD Paul Barker
  2014-01-16 17:59 ` [PATCH v2 2/3] default-providers: Change update-alternatives provider to opkg-utils Paul Barker
@ 2014-01-16 17:59 ` Paul Barker
  2014-01-17 10:47 ` [PATCH v2 0/3] Change update-alternatives provider Richard Purdie
  3 siblings, 0 replies; 6+ messages in thread
From: Paul Barker @ 2014-01-16 17:59 UTC (permalink / raw)
  To: openembedded-core

The new provider is the opkg-utils recipe.

Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
---
 meta/recipes-devtools/opkg/opkg.inc | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/meta/recipes-devtools/opkg/opkg.inc b/meta/recipes-devtools/opkg/opkg.inc
index c9fb505..527fe5d 100644
--- a/meta/recipes-devtools/opkg/opkg.inc
+++ b/meta/recipes-devtools/opkg/opkg.inc
@@ -39,17 +39,13 @@ EXTRA_OECONF = "\
   --with-opkglibdir=${OPKGLIBDIR} \
 "
 
-PROVIDES += "virtual/update-alternatives"
-RPROVIDES_update-alternatives-cworth += "update-alternatives"
-RCONFLICTS_update-alternatives-cworth = "update-alternatives-dpkg"
 RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} opkg-config-base"
 RDEPENDS_${PN}_class-native = ""
 RDEPENDS_${PN}_class-nativesdk = ""
 RREPLACES_${PN} = "opkg-nogpg"
 
-PACKAGES =+ "libopkg-dev libopkg-staticdev libopkg update-alternatives-cworth"
+PACKAGES =+ "libopkg-dev libopkg-staticdev libopkg"
 
-FILES_update-alternatives-cworth = "${bindir}/update-alternatives"
 FILES_libopkg-dev = "${libdir}/*.la ${libdir}/*.so ${includedir}/libopkg"
 FILES_libopkg-staticdev = "${libdir}/*.a"
 FILES_libopkg = "${libdir}/*.so.* ${OPKGLIBDIR}/opkg/"
@@ -74,10 +70,8 @@ do_install_append() {
 	ln -sf opkg-cl ${D}${bindir}/opkg
 }
 
-do_install_append_class-native() {
-	if [ "${PREFERRED_PROVIDER_virtual/update-alternatives-native}" != "${PN}" ]; then
-		rm ${D}${bindir}/update-alternatives
-	fi
+do_install_append() {
+	rm ${D}${bindir}/update-alternatives
 }
 
 pkg_postinst_${PN} () {
-- 
1.8.5.2



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH v2 0/3] Change update-alternatives provider
  2014-01-16 17:59 [PATCH v2 0/3] Change update-alternatives provider Paul Barker
                   ` (2 preceding siblings ...)
  2014-01-16 17:59 ` [PATCH v2 3/3] opkg: No longer PROVIDES update-alternatives Paul Barker
@ 2014-01-17 10:47 ` Richard Purdie
  2014-01-17 12:15   ` Paul Barker
  3 siblings, 1 reply; 6+ messages in thread
From: Richard Purdie @ 2014-01-17 10:47 UTC (permalink / raw)
  To: Paul Barker; +Cc: openembedded-core

On Thu, 2014-01-16 at 17:59 +0000, Paul Barker wrote:
> The update-alternatives script has been copied from opkg to opkg-utils so the
> openembedded recipe for opkg-utils is updated accordingly. Changing the default
> provider of update-alternatives to opkg-utils allows dependencies to be added to
> the opkg recipe without causing circular dependency loops. This series partially
> solves Yocto Project issue 4836.
> 
> Changes in v2:
> 
>     - Reordered variables in opkg-utils recipe
>     - Added nativesdk class to opkg-utils
> 
> Paul Barker (3):
>   opkg-utils: Upgrade to latest git HEAD
>   default-providers: Change update-alternatives provider to opkg-utils
>   opkg: No longer PROVIDES update-alternatives
> 
>  meta/conf/distro/include/default-providers.inc     |  6 +++---
>  meta/recipes-devtools/opkg-utils/opkg-utils_git.bb |  9 +++++++--
>  meta/recipes-devtools/opkg/opkg.inc                | 12 +++---------
>  3 files changed, 13 insertions(+), 14 deletions(-)

The errors still occurred on the autobuilder with the revised patchset.
I tracked down a couple of issues and have sent out patches for those.

We do however have one more problematic regression:

http://autobuilder.yoctoproject.org/main/builders/poky-tiny/builds/1/steps/BuildImages/logs/stdio

Basically, the tiny configuration is quite cut down and we can't build
python with it. Before this change we were able to build opkg and all
was well. Now we need to build opkg-utils which depends on python.

We're therefore building python when we never used to (due to the python
scripts in opkg-utils).

I suspect to resolve this and allow tiny to work again we'll have to put
a PACKAGECONFIG on opkg-utils and disable python for tiny...

Cheers,

Richard





^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2 0/3] Change update-alternatives provider
  2014-01-17 10:47 ` [PATCH v2 0/3] Change update-alternatives provider Richard Purdie
@ 2014-01-17 12:15   ` Paul Barker
  0 siblings, 0 replies; 6+ messages in thread
From: Paul Barker @ 2014-01-17 12:15 UTC (permalink / raw)
  To: Richard Purdie; +Cc: openembedded-core

On 17 January 2014 10:47, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
> On Thu, 2014-01-16 at 17:59 +0000, Paul Barker wrote:
>> The update-alternatives script has been copied from opkg to opkg-utils so the
>> openembedded recipe for opkg-utils is updated accordingly. Changing the default
>> provider of update-alternatives to opkg-utils allows dependencies to be added to
>> the opkg recipe without causing circular dependency loops. This series partially
>> solves Yocto Project issue 4836.
>>
>> Changes in v2:
>>
>>     - Reordered variables in opkg-utils recipe
>>     - Added nativesdk class to opkg-utils
>
> The errors still occurred on the autobuilder with the revised patchset.
> I tracked down a couple of issues and have sent out patches for those.
>

Ok, let me know if there's anything left that I need to fix after the
next autobuilder run.

> We do however have one more problematic regression:
>
> http://autobuilder.yoctoproject.org/main/builders/poky-tiny/builds/1/steps/BuildImages/logs/stdio
>
> Basically, the tiny configuration is quite cut down and we can't build
> python with it. Before this change we were able to build opkg and all
> was well. Now we need to build opkg-utils which depends on python.
>
> We're therefore building python when we never used to (due to the python
> scripts in opkg-utils).
>
> I suspect to resolve this and allow tiny to work again we'll have to put
> a PACKAGECONFIG on opkg-utils and disable python for tiny...
>

Most of the functionality of opkg-utils (other than
update-alternatives) does depend on python so I think this would
result in an opkg-utils package which doesn't run if installed on the
target. For tiny it might be better to have an
'update-alternatives-only' PACKAGECONFIG which is set for the target
class only and prevents the installation and packaging of all the
package creation & inspection tools.

-- 
Paul Barker

Email: paul@paulbarker.me.uk
http://www.paulbarker.me.uk


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-01-17 12:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-16 17:59 [PATCH v2 0/3] Change update-alternatives provider Paul Barker
2014-01-16 17:59 ` [PATCH v2 1/3] opkg-utils: Upgrade to latest git HEAD Paul Barker
2014-01-16 17:59 ` [PATCH v2 2/3] default-providers: Change update-alternatives provider to opkg-utils Paul Barker
2014-01-16 17:59 ` [PATCH v2 3/3] opkg: No longer PROVIDES update-alternatives Paul Barker
2014-01-17 10:47 ` [PATCH v2 0/3] Change update-alternatives provider Richard Purdie
2014-01-17 12:15   ` Paul Barker

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.