All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH V2 0/5] FIX #2431 and other opkg / ipk related fixes
@ 2012-10-21 15:40 Andrei Gherzan
  2012-10-21 15:40 ` [PATCH V2 1/5] opkg-utils: Add needed python modules as RDEPENDS Andrei Gherzan
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Andrei Gherzan @ 2012-10-21 15:40 UTC (permalink / raw)
  To: openembedded-core

V2:
Have rootfs_ipk.bbclass formatting changings in a different commit.
Thanks: Otavio Salvador <otavio@ossystems.com.br>

The following changes since commit caba9cbfce09f19eb27f4c6615c0c5c48e1a2952:

  kernel.bbclass: add kernel-modules to PACKAGES (2012-10-19 23:06:26 +0100)

are available in the git repository at:

  git://git.yoctoproject.org/poky-contrib ag/opkg
  http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=ag/opkg

Andrei Gherzan (5):
  opkg-utils: Add needed python modules as RDEPENDS
  opkg: Add patch to fix removing packages with recommends
  opkg: Don't print empty PROVIDES
  rootfs_ipk.bbclass: Don't duplicate remove_packaging_data_files code
  rootfs_ipk.bbclass: Some extra spaces / tabs were removed / formated

 meta/classes/rootfs_ipk.bbclass                    |    8 +++---
 meta/recipes-devtools/opkg-utils/opkg-utils_git.bb |    4 +--
 ...t-add-recommends-pkgs-to-depended-upon-by.patch |   26 ++++++++++++++++++++
 ...n-t-print-provides-if-nothing-is-provided.patch |   24 ++++++++++++++++++
 meta/recipes-devtools/opkg/opkg_svn.bb             |    4 ++-
 5 files changed, 59 insertions(+), 7 deletions(-)
 create mode 100644 meta/recipes-devtools/opkg/opkg/don-t-add-recommends-pkgs-to-depended-upon-by.patch
 create mode 100644 meta/recipes-devtools/opkg/opkg/don-t-print-provides-if-nothing-is-provided.patch

-- 
1.7.9.5




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

* [PATCH V2 1/5] opkg-utils: Add needed python modules as RDEPENDS
  2012-10-21 15:40 [PATCH V2 0/5] FIX #2431 and other opkg / ipk related fixes Andrei Gherzan
@ 2012-10-21 15:40 ` Andrei Gherzan
  2012-10-21 15:40 ` [PATCH V2 2/5] opkg: Add patch to fix removing packages with recommends Andrei Gherzan
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Andrei Gherzan @ 2012-10-21 15:40 UTC (permalink / raw)
  To: openembedded-core

Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
---
 meta/recipes-devtools/opkg-utils/opkg-utils_git.bb |    4 ++--
 1 file changed, 2 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 92e6624..825c927 100644
--- a/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb
+++ b/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb
@@ -4,11 +4,11 @@ HOMEPAGE = "http://wiki.openmoko.org/wiki/Opkg"
 LICENSE = "GPLv2+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
                     file://opkg.py;beginline=1;endline=18;md5=15917491ad6bf7acc666ca5f7cc1e083"
-RDEPENDS_${PN} = "python"
+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}_virtclass-native = ""
 SRCREV = "49cc783d8e0415059d126ae22c892988717ffda7"
 PV = "0.1.8+git${SRCPV}"
-PR = "r0"
+PR = "r1"
 
 SRC_URI = "git://git.yoctoproject.org/opkg-utils;protocol=git \
            "
-- 
1.7.9.5




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

* [PATCH V2 2/5] opkg: Add patch to fix removing packages with recommends
  2012-10-21 15:40 [PATCH V2 0/5] FIX #2431 and other opkg / ipk related fixes Andrei Gherzan
  2012-10-21 15:40 ` [PATCH V2 1/5] opkg-utils: Add needed python modules as RDEPENDS Andrei Gherzan
@ 2012-10-21 15:40 ` Andrei Gherzan
  2012-10-21 15:40 ` [PATCH V2 3/5] opkg: Don't print empty PROVIDES Andrei Gherzan
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Andrei Gherzan @ 2012-10-21 15:40 UTC (permalink / raw)
  To: openembedded-core

While removing a package with opkg, the process shouldn't be blocked if
another package RECOMMENDS the package wanted to be removed. This is
because, while generating the dependencies, opkg adds dependencies to
depended_upon_by even if dependency's type is RECOMMEND. The fix is to
skip dependencies of type RECOMMEND while constructing depended_upon_by.

[YOCTO: #2431]

Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
---
 ...t-add-recommends-pkgs-to-depended-upon-by.patch |   26 ++++++++++++++++++++
 meta/recipes-devtools/opkg/opkg_svn.bb             |    1 +
 2 files changed, 27 insertions(+)
 create mode 100644 meta/recipes-devtools/opkg/opkg/don-t-add-recommends-pkgs-to-depended-upon-by.patch

diff --git a/meta/recipes-devtools/opkg/opkg/don-t-add-recommends-pkgs-to-depended-upon-by.patch b/meta/recipes-devtools/opkg/opkg/don-t-add-recommends-pkgs-to-depended-upon-by.patch
new file mode 100644
index 0000000..e581dc0
--- /dev/null
+++ b/meta/recipes-devtools/opkg/opkg/don-t-add-recommends-pkgs-to-depended-upon-by.patch
@@ -0,0 +1,26 @@
+While removing a package with opkg, the process shouldn't be blocked if
+another package RECOMMENDS the package wanted to be removed. This is
+because, while generating the dependencies, opkg adds dependencies to
+depended_upon_by even if dependency's type is RECOMMEND. The fix is to
+skip dependencies of type RECOMMEND while constructing depended_upon_by.
+
+Bug info:
+https://bugzilla.yoctoproject.org/show_bug.cgi?id=2431
+
+Upstream-Status: Pending
+Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
+
+Index: trunk/libopkg/pkg_depends.c
+===================================================================
+--- trunk.orig/libopkg/pkg_depends.c	2011-09-03 05:54:56.000000000 +0300
++++ trunk/libopkg/pkg_depends.c	2012-10-20 22:23:03.783573202 +0300
+@@ -785,8 +785,7 @@
+ 	for (i = 0; i < count; i++) {
+ 		depends = &pkg->depends[i];
+ 		if (depends->type != PREDEPEND
+-		    && depends->type != DEPEND
+-		    && depends->type != RECOMMEND)
++		    && depends->type != DEPEND)
+ 			continue;
+ 		for (j = 0; j < depends->possibility_count; j++) {
+ 			ab_depend = depends->possibilities[j]->pkg;
diff --git a/meta/recipes-devtools/opkg/opkg_svn.bb b/meta/recipes-devtools/opkg/opkg_svn.bb
index 4e83cfb..3a90677 100644
--- a/meta/recipes-devtools/opkg/opkg_svn.bb
+++ b/meta/recipes-devtools/opkg/opkg_svn.bb
@@ -12,6 +12,7 @@ SRC_URI = "svn://opkg.googlecode.com/svn;module=trunk;protocol=http \
   file://0009-pkg_depends-fix-version-constraints.patch \
   file://0010-pkg_depends-fix-version_constraints_satisfied.patch \
   file://opkg-no-sync-offline.patch \
+  file://don-t-add-recommends-pkgs-to-depended-upon-by.patch \
 "
 
 S = "${WORKDIR}/trunk"
-- 
1.7.9.5




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

* [PATCH V2 3/5] opkg: Don't print empty PROVIDES
  2012-10-21 15:40 [PATCH V2 0/5] FIX #2431 and other opkg / ipk related fixes Andrei Gherzan
  2012-10-21 15:40 ` [PATCH V2 1/5] opkg-utils: Add needed python modules as RDEPENDS Andrei Gherzan
  2012-10-21 15:40 ` [PATCH V2 2/5] opkg: Add patch to fix removing packages with recommends Andrei Gherzan
@ 2012-10-21 15:40 ` Andrei Gherzan
  2012-10-21 15:40 ` [PATCH V2 4/5] rootfs_ipk.bbclass: Don't duplicate remove_packaging_data_files code Andrei Gherzan
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Andrei Gherzan @ 2012-10-21 15:40 UTC (permalink / raw)
  To: openembedded-core

Every package provides itself. While printing package information all
fields are printed only if there is any relevant info for them. For
example: a package with no "Replaces" won't get this printed at all.
Packages which provide only themselves, were printing this field but with
no values. This patch skips this field if the package provides only
itself.

Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
---
 ...n-t-print-provides-if-nothing-is-provided.patch |   24 ++++++++++++++++++++
 meta/recipes-devtools/opkg/opkg_svn.bb             |    3 ++-
 2 files changed, 26 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-devtools/opkg/opkg/don-t-print-provides-if-nothing-is-provided.patch

diff --git a/meta/recipes-devtools/opkg/opkg/don-t-print-provides-if-nothing-is-provided.patch b/meta/recipes-devtools/opkg/opkg/don-t-print-provides-if-nothing-is-provided.patch
new file mode 100644
index 0000000..669faef
--- /dev/null
+++ b/meta/recipes-devtools/opkg/opkg/don-t-print-provides-if-nothing-is-provided.patch
@@ -0,0 +1,24 @@
+Every package provides itself. While printing package information all
+fields are printed only if there is any relevant info for them. For
+example: a package with no "Replaces" won't get this printed at all.
+Packages which provide only themselves, were printing this field but with
+no values. This patch skips this field if the package provides only
+itself.
+
+Upstream-Status: Pending
+Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
+
+Index: trunk/libopkg/pkg.c
+===================================================================
+--- trunk.orig/libopkg/pkg.c	2011-12-18 02:11:34.000000000 +0200
++++ trunk/libopkg/pkg.c	2012-10-20 22:20:04.109201287 +0300
+@@ -731,7 +731,8 @@
+ 	  } else if (strcasecmp(field, "Priority") == 0) {
+                fprintf(fp, "Priority: %s\n", pkg->priority);
+ 	  } else if (strcasecmp(field, "Provides") == 0) {
+-	       if (pkg->provides_count) {
++	       /* Don't print provides if this package provides only itself */
++	       if (pkg->provides_count > 1) {
+                   fprintf(fp, "Provides:");
+ 		  for(i = 1; i < pkg->provides_count; i++) {
+                       fprintf(fp, "%s %s", i == 1 ? "" : ",",
diff --git a/meta/recipes-devtools/opkg/opkg_svn.bb b/meta/recipes-devtools/opkg/opkg_svn.bb
index 3a90677..e1049a7 100644
--- a/meta/recipes-devtools/opkg/opkg_svn.bb
+++ b/meta/recipes-devtools/opkg/opkg_svn.bb
@@ -13,6 +13,7 @@ SRC_URI = "svn://opkg.googlecode.com/svn;module=trunk;protocol=http \
   file://0010-pkg_depends-fix-version_constraints_satisfied.patch \
   file://opkg-no-sync-offline.patch \
   file://don-t-add-recommends-pkgs-to-depended-upon-by.patch \
+  file://don-t-print-provides-if-nothing-is-provided.patch \
 "
 
 S = "${WORKDIR}/trunk"
@@ -20,4 +21,4 @@ S = "${WORKDIR}/trunk"
 SRCREV = "633"
 PV = "0.1.8+svnr${SRCPV}"
 
-PR = "${INC_PR}.7"
+PR = "${INC_PR}.8"
-- 
1.7.9.5




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

* [PATCH V2 4/5] rootfs_ipk.bbclass: Don't duplicate remove_packaging_data_files code
  2012-10-21 15:40 [PATCH V2 0/5] FIX #2431 and other opkg / ipk related fixes Andrei Gherzan
                   ` (2 preceding siblings ...)
  2012-10-21 15:40 ` [PATCH V2 3/5] opkg: Don't print empty PROVIDES Andrei Gherzan
@ 2012-10-21 15:40 ` Andrei Gherzan
  2012-10-21 15:40 ` [PATCH V2 5/5] rootfs_ipk.bbclass: Some extra spaces / tabs were removed / formated Andrei Gherzan
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Andrei Gherzan @ 2012-10-21 15:40 UTC (permalink / raw)
  To: openembedded-core

While removing packaging data files in rootfs_ipk_do_rootfs use the
remove_packaging_data_files function. By using this function we ensure
that /var/lib/opkg directory is created. opkg needs this directory to
create lock files.

Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
---
 meta/classes/rootfs_ipk.bbclass |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/rootfs_ipk.bbclass b/meta/classes/rootfs_ipk.bbclass
index 9d716fb..25f15ee 100644
--- a/meta/classes/rootfs_ipk.bbclass
+++ b/meta/classes/rootfs_ipk.bbclass
@@ -111,7 +111,7 @@ fakeroot rootfs_ipk_do_rootfs () {
 			fi
 
 			# Also delete the status files
-			rm -rf ${IMAGE_ROOTFS}${opkglibdir}
+			remove_packaging_data_files
 		fi
 	fi
 	set +x
-- 
1.7.9.5




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

* [PATCH V2 5/5] rootfs_ipk.bbclass: Some extra spaces / tabs were removed / formated
  2012-10-21 15:40 [PATCH V2 0/5] FIX #2431 and other opkg / ipk related fixes Andrei Gherzan
                   ` (3 preceding siblings ...)
  2012-10-21 15:40 ` [PATCH V2 4/5] rootfs_ipk.bbclass: Don't duplicate remove_packaging_data_files code Andrei Gherzan
@ 2012-10-21 15:40 ` Andrei Gherzan
  2012-10-21 17:02 ` [PATCH V2 0/5] FIX #2431 and other opkg / ipk related fixes Otavio Salvador
  2012-10-23 18:51 ` Saul Wold
  6 siblings, 0 replies; 8+ messages in thread
From: Andrei Gherzan @ 2012-10-21 15:40 UTC (permalink / raw)
  To: openembedded-core

Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
---
 meta/classes/rootfs_ipk.bbclass |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/meta/classes/rootfs_ipk.bbclass b/meta/classes/rootfs_ipk.bbclass
index 25f15ee..f69cc0e 100644
--- a/meta/classes/rootfs_ipk.bbclass
+++ b/meta/classes/rootfs_ipk.bbclass
@@ -115,7 +115,7 @@ fakeroot rootfs_ipk_do_rootfs () {
 		fi
 	fi
 	set +x
-	log_check rootfs 	
+	log_check rootfs
 }
 
 rootfs_ipk_write_manifest() {
@@ -134,8 +134,8 @@ rootfs_ipk_write_manifest() {
 
 remove_packaging_data_files() {
 	rm -rf ${IMAGE_ROOTFS}${opkglibdir}
-        # We need the directory for the package manager lock
-        mkdir ${IMAGE_ROOTFS}${opkglibdir}
+	# We need the directory for the package manager lock
+	mkdir ${IMAGE_ROOTFS}${opkglibdir}
 }
 
 list_installed_packages() {
-- 
1.7.9.5




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

* Re: [PATCH V2 0/5] FIX #2431 and other opkg / ipk related fixes
  2012-10-21 15:40 [PATCH V2 0/5] FIX #2431 and other opkg / ipk related fixes Andrei Gherzan
                   ` (4 preceding siblings ...)
  2012-10-21 15:40 ` [PATCH V2 5/5] rootfs_ipk.bbclass: Some extra spaces / tabs were removed / formated Andrei Gherzan
@ 2012-10-21 17:02 ` Otavio Salvador
  2012-10-23 18:51 ` Saul Wold
  6 siblings, 0 replies; 8+ messages in thread
From: Otavio Salvador @ 2012-10-21 17:02 UTC (permalink / raw)
  To: Andrei Gherzan; +Cc: openembedded-core

On Sun, Oct 21, 2012 at 1:40 PM, Andrei Gherzan <andrei@gherzan.ro> wrote:
> V2:
> Have rootfs_ipk.bbclass formatting changings in a different commit.
> Thanks: Otavio Salvador <otavio@ossystems.com.br>

Good; my acked-by for whole series.

Thanks,

-- 
Otavio Salvador                             O.S. Systems
E-mail: otavio@ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br



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

* Re: [PATCH V2 0/5] FIX #2431 and other opkg / ipk related fixes
  2012-10-21 15:40 [PATCH V2 0/5] FIX #2431 and other opkg / ipk related fixes Andrei Gherzan
                   ` (5 preceding siblings ...)
  2012-10-21 17:02 ` [PATCH V2 0/5] FIX #2431 and other opkg / ipk related fixes Otavio Salvador
@ 2012-10-23 18:51 ` Saul Wold
  6 siblings, 0 replies; 8+ messages in thread
From: Saul Wold @ 2012-10-23 18:51 UTC (permalink / raw)
  To: Andrei Gherzan; +Cc: openembedded-core

On 10/21/2012 08:40 AM, Andrei Gherzan wrote:
> V2:
> Have rootfs_ipk.bbclass formatting changings in a different commit.
> Thanks: Otavio Salvador <otavio@ossystems.com.br>
>
> The following changes since commit caba9cbfce09f19eb27f4c6615c0c5c48e1a2952:
>
>    kernel.bbclass: add kernel-modules to PACKAGES (2012-10-19 23:06:26 +0100)
>
> are available in the git repository at:
>
>    git://git.yoctoproject.org/poky-contrib ag/opkg
>    http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=ag/opkg
>
> Andrei Gherzan (5):
>    opkg-utils: Add needed python modules as RDEPENDS
This one was not merged

>    opkg: Add patch to fix removing packages with recommends
>    opkg: Don't print empty PROVIDES
>    rootfs_ipk.bbclass: Don't duplicate remove_packaging_data_files code
>    rootfs_ipk.bbclass: Some extra spaces / tabs were removed / formated
>
Merged into OE-Core

Thanks
	Sau!

>   meta/classes/rootfs_ipk.bbclass                    |    8 +++---
>   meta/recipes-devtools/opkg-utils/opkg-utils_git.bb |    4 +--
>   ...t-add-recommends-pkgs-to-depended-upon-by.patch |   26 ++++++++++++++++++++
>   ...n-t-print-provides-if-nothing-is-provided.patch |   24 ++++++++++++++++++
>   meta/recipes-devtools/opkg/opkg_svn.bb             |    4 ++-
>   5 files changed, 59 insertions(+), 7 deletions(-)
>   create mode 100644 meta/recipes-devtools/opkg/opkg/don-t-add-recommends-pkgs-to-depended-upon-by.patch
>   create mode 100644 meta/recipes-devtools/opkg/opkg/don-t-print-provides-if-nothing-is-provided.patch
>



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

end of thread, other threads:[~2012-10-23 19:04 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-21 15:40 [PATCH V2 0/5] FIX #2431 and other opkg / ipk related fixes Andrei Gherzan
2012-10-21 15:40 ` [PATCH V2 1/5] opkg-utils: Add needed python modules as RDEPENDS Andrei Gherzan
2012-10-21 15:40 ` [PATCH V2 2/5] opkg: Add patch to fix removing packages with recommends Andrei Gherzan
2012-10-21 15:40 ` [PATCH V2 3/5] opkg: Don't print empty PROVIDES Andrei Gherzan
2012-10-21 15:40 ` [PATCH V2 4/5] rootfs_ipk.bbclass: Don't duplicate remove_packaging_data_files code Andrei Gherzan
2012-10-21 15:40 ` [PATCH V2 5/5] rootfs_ipk.bbclass: Some extra spaces / tabs were removed / formated Andrei Gherzan
2012-10-21 17:02 ` [PATCH V2 0/5] FIX #2431 and other opkg / ipk related fixes Otavio Salvador
2012-10-23 18:51 ` Saul Wold

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.