* [PATCH 0/4] FIX #2431 and other opkg / ipk related fixes
@ 2012-10-20 21:44 Andrei Gherzan
2012-10-20 21:44 ` [PATCH 1/4] opkg-utils: Add needed python modules as RDEPENDS Andrei Gherzan
` (4 more replies)
0 siblings, 5 replies; 7+ messages in thread
From: Andrei Gherzan @ 2012-10-20 21:44 UTC (permalink / raw)
To: openembedded-core
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 (4):
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
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] 7+ messages in thread
* [PATCH 1/4] opkg-utils: Add needed python modules as RDEPENDS
2012-10-20 21:44 [PATCH 0/4] FIX #2431 and other opkg / ipk related fixes Andrei Gherzan
@ 2012-10-20 21:44 ` Andrei Gherzan
2012-10-20 21:44 ` [PATCH 2/4] opkg: Add patch to fix removing packages with recommends Andrei Gherzan
` (3 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Andrei Gherzan @ 2012-10-20 21:44 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] 7+ messages in thread
* [PATCH 2/4] opkg: Add patch to fix removing packages with recommends
2012-10-20 21:44 [PATCH 0/4] FIX #2431 and other opkg / ipk related fixes Andrei Gherzan
2012-10-20 21:44 ` [PATCH 1/4] opkg-utils: Add needed python modules as RDEPENDS Andrei Gherzan
@ 2012-10-20 21:44 ` Andrei Gherzan
2012-10-20 21:44 ` [PATCH 3/4] opkg: Don't print empty PROVIDES Andrei Gherzan
` (2 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Andrei Gherzan @ 2012-10-20 21:44 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] 7+ messages in thread
* [PATCH 3/4] opkg: Don't print empty PROVIDES
2012-10-20 21:44 [PATCH 0/4] FIX #2431 and other opkg / ipk related fixes Andrei Gherzan
2012-10-20 21:44 ` [PATCH 1/4] opkg-utils: Add needed python modules as RDEPENDS Andrei Gherzan
2012-10-20 21:44 ` [PATCH 2/4] opkg: Add patch to fix removing packages with recommends Andrei Gherzan
@ 2012-10-20 21:44 ` Andrei Gherzan
2012-10-20 21:44 ` [PATCH 4/4] rootfs_ipk.bbclass: Don't duplicate remove_packaging_data_files code Andrei Gherzan
2012-10-21 12:38 ` [PATCH 0/4] FIX #2431 and other opkg / ipk related fixes Otavio Salvador
4 siblings, 0 replies; 7+ messages in thread
From: Andrei Gherzan @ 2012-10-20 21:44 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] 7+ messages in thread
* [PATCH 4/4] rootfs_ipk.bbclass: Don't duplicate remove_packaging_data_files code
2012-10-20 21:44 [PATCH 0/4] FIX #2431 and other opkg / ipk related fixes Andrei Gherzan
` (2 preceding siblings ...)
2012-10-20 21:44 ` [PATCH 3/4] opkg: Don't print empty PROVIDES Andrei Gherzan
@ 2012-10-20 21:44 ` Andrei Gherzan
2012-10-21 12:36 ` Otavio Salvador
2012-10-21 12:38 ` [PATCH 0/4] FIX #2431 and other opkg / ipk related fixes Otavio Salvador
4 siblings, 1 reply; 7+ messages in thread
From: Andrei Gherzan @ 2012-10-20 21:44 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.
Some extra spaces / tabs were removed / formated.
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
---
meta/classes/rootfs_ipk.bbclass | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/meta/classes/rootfs_ipk.bbclass b/meta/classes/rootfs_ipk.bbclass
index 9d716fb..f69cc0e 100644
--- a/meta/classes/rootfs_ipk.bbclass
+++ b/meta/classes/rootfs_ipk.bbclass
@@ -111,11 +111,11 @@ fakeroot rootfs_ipk_do_rootfs () {
fi
# Also delete the status files
- rm -rf ${IMAGE_ROOTFS}${opkglibdir}
+ remove_packaging_data_files
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] 7+ messages in thread
* Re: [PATCH 4/4] rootfs_ipk.bbclass: Don't duplicate remove_packaging_data_files code
2012-10-20 21:44 ` [PATCH 4/4] rootfs_ipk.bbclass: Don't duplicate remove_packaging_data_files code Andrei Gherzan
@ 2012-10-21 12:36 ` Otavio Salvador
0 siblings, 0 replies; 7+ messages in thread
From: Otavio Salvador @ 2012-10-21 12:36 UTC (permalink / raw)
To: Andrei Gherzan; +Cc: openembedded-core
On Sat, Oct 20, 2012 at 6:44 PM, Andrei Gherzan <andrei@gherzan.ro> wrote:
> 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.
> Some extra spaces / tabs were removed / formated.
>
> Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
I'd prefer if you could split the formating changes to another patch.
--
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] 7+ messages in thread
* Re: [PATCH 0/4] FIX #2431 and other opkg / ipk related fixes
2012-10-20 21:44 [PATCH 0/4] FIX #2431 and other opkg / ipk related fixes Andrei Gherzan
` (3 preceding siblings ...)
2012-10-20 21:44 ` [PATCH 4/4] rootfs_ipk.bbclass: Don't duplicate remove_packaging_data_files code Andrei Gherzan
@ 2012-10-21 12:38 ` Otavio Salvador
4 siblings, 0 replies; 7+ messages in thread
From: Otavio Salvador @ 2012-10-21 12:38 UTC (permalink / raw)
To: Andrei Gherzan; +Cc: openembedded-core
On Sat, Oct 20, 2012 at 6:44 PM, Andrei Gherzan <andrei@gherzan.ro> wrote:
...
> Andrei Gherzan (4):
> 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
...
I check the series and it looks all good; please split the formating
changes onto another patch or drop it.
Those formating changes are better to be dealt at upstream as it can
cause conflicts and the smaller the patch is, harder it to conflict.
--
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] 7+ messages in thread
end of thread, other threads:[~2012-10-21 12:52 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-20 21:44 [PATCH 0/4] FIX #2431 and other opkg / ipk related fixes Andrei Gherzan
2012-10-20 21:44 ` [PATCH 1/4] opkg-utils: Add needed python modules as RDEPENDS Andrei Gherzan
2012-10-20 21:44 ` [PATCH 2/4] opkg: Add patch to fix removing packages with recommends Andrei Gherzan
2012-10-20 21:44 ` [PATCH 3/4] opkg: Don't print empty PROVIDES Andrei Gherzan
2012-10-20 21:44 ` [PATCH 4/4] rootfs_ipk.bbclass: Don't duplicate remove_packaging_data_files code Andrei Gherzan
2012-10-21 12:36 ` Otavio Salvador
2012-10-21 12:38 ` [PATCH 0/4] FIX #2431 and other opkg / ipk related fixes Otavio Salvador
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.