FIX #2431 and other opkg / ipk related fixes
cover FIX #2431 and other opkg / ipk related fixes
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
Signature · 1 line
1.7.9.5
PATCH 1/4 opkg-utils: Add needed python modules as RDEPENDS
--- meta/recipes-devtools/opkg-utils/opkg-utils_git.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
meta/recipes-devtools/opkg-utils/opkg-utils_git.bb +2 -2
@@ -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 \ "
Signature · 1 line
1.7.9.5
PATCH 2/4 opkg: Add patch to fix removing packages with recommends
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]
--- ...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
meta/recipes-devtools/opkg/opkg/don-t-add-recommends-pkgs-to-depended-upon-by.patch new file +26 -0
@@ -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 <[email protected]> + +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;
meta/recipes-devtools/opkg/opkg_svn.bb +1 -0
@@ -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"
Signature · 1 line
1.7.9.5
PATCH 3/4 opkg: Don't print empty PROVIDES
In reply to Andrei GherzanEvery 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.
--- ...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
meta/recipes-devtools/opkg/opkg/don-t-print-provides-if-nothing-is-provided.patch new file +24 -0
@@ -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 <[email protected]> + +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 ? "" : ",",
meta/recipes-devtools/opkg/opkg_svn.bb +2 -1
@@ -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"
Signature · 1 line
1.7.9.5
PATCH 4/4 rootfs_ipk.bbclass: Don't duplicate remove_packaging_data_files code
In reply to Andrei GherzanWhile 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.
--- meta/classes/rootfs_ipk.bbclass | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
meta/classes/rootfs_ipk.bbclass +4 -4
@@ -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() {
Signature · 1 line
1.7.9.5
Re: [PATCH 4/4] rootfs_ipk.bbclass: Don't duplicate remove_packaging_data_files code
Quoted 7 lines · Andrei Gherzan
While removing packaging data files in
rootfs_ipk_do_rootfsuse theremove_packaging_data_filesfunction. By using this function we ensure that/var/lib/opkgdirectory is created. opkg needs this directory to create lock files.
Some extra spaces / tabs were removed / formated.Signed-off-by Andrei Gherzan <[email protected]>
I'd prefer if you could split the formating changes to another patch.
Signature · 3 lines
Otavio Salvador O.S. Systems E-mail: [email protected] http://www.ossystems.com.br Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br
On Sat, Oct 20, 2012 at 6:44 PM, Andrei Gherzan <[email protected]> wrote:
...
Quoted 5 lines
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 duplicateremove_packaging_data_filescode
...
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.
Signature · 3 lines
Otavio Salvador O.S. Systems E-mail: [email protected] http://www.ossystems.com.br Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br