* [PATCH 0/3] Opkg patch upstreaming and SIGSEGV fix
@ 2012-09-19 17:16 Martin Jansa
2012-09-19 17:16 ` [PATCH 1/3] opkg: replace local patches with git patches submitted upstream Martin Jansa
` (4 more replies)
0 siblings, 5 replies; 9+ messages in thread
From: Martin Jansa @ 2012-09-19 17:16 UTC (permalink / raw)
To: openembedded-core
This depends on
http://patchwork.openembedded.org/patch/36893/
otherwise warning about missing SRC_URI entries will be shown
The following changes since commit f06097f4581e4c728c2950a86e025384e4bdcdf0:
eglibc: Do not use fsqrt in libm when building for fsl ppc with fpu (2012-09-18 07:44:13 -0700)
are available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib jansa/opkg
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=jansa/opkg
Martin Jansa (3):
opkg: replace local patches with git patches submitted upstream
opkg: add patch to fix SIGSEGV when printing status file
opkg-nogpg: drop SRCREV
meta/recipes-devtools/opkg/opkg-nogpg_svn.bb | 2 -
.../0001-add-opkg_compare_versions-function.patch | 51 ++++++++++++++
...e-the-uname-gname-fields-when-extracting.patch} | 30 +++++---
...ix-dependency-issues-for-preinst-scripts.patch} | 65 ++++++++++--------
...nst-script-is-not-fatal-with-conf-offlin.patch} | 75 +++++++++++---------
...ot-read-etc-opkg-.conf-if-f-is-specified.patch} | 11 ++-
...tch => 0006-detect-circular-dependencies.patch} | 79 +++++++++++++---------
...g-provides-even-when-oldpkg-provides-exis.patch | 46 +++++++++++++
meta/recipes-devtools/opkg/opkg/add_vercmp.patch | 36 ----------
meta/recipes-devtools/opkg/opkg_svn.bb | 15 ++--
10 files changed, 258 insertions(+), 152 deletions(-)
create mode 100644 meta/recipes-devtools/opkg/opkg/0001-add-opkg_compare_versions-function.patch
rename meta/recipes-devtools/opkg/opkg/{add_uname_support.patch => 0002-Ensure-we-use-the-uname-gname-fields-when-extracting.patch} (71%)
rename meta/recipes-devtools/opkg/opkg/{fix_installorder.patch => 0003-Fix-dependency-issues-for-preinst-scripts.patch} (82%)
rename meta/recipes-devtools/opkg/opkg/{offline_postinstall.patch => 0004-Failed-postinst-script-is-not-fatal-with-conf-offlin.patch} (52%)
rename meta/recipes-devtools/opkg/opkg/{conf_override.patch => 0005-Do-not-read-etc-opkg-.conf-if-f-is-specified.patch} (91%)
rename meta/recipes-devtools/opkg/opkg/{track_parents.patch => 0006-detect-circular-dependencies.patch} (59%)
create mode 100644 meta/recipes-devtools/opkg/opkg/0007-merge-newpkg-provides-even-when-oldpkg-provides-exis.patch
delete mode 100644 meta/recipes-devtools/opkg/opkg/add_vercmp.patch
--
1.7.12
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 1/3] opkg: replace local patches with git patches submitted upstream
2012-09-19 17:16 [PATCH 0/3] Opkg patch upstreaming and SIGSEGV fix Martin Jansa
@ 2012-09-19 17:16 ` Martin Jansa
2012-09-19 17:16 ` [PATCH 2/3] opkg: add patch to fix SIGSEGV when printing status file Martin Jansa
` (3 subsequent siblings)
4 siblings, 0 replies; 9+ messages in thread
From: Martin Jansa @ 2012-09-19 17:16 UTC (permalink / raw)
To: openembedded-core
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
.../0001-add-opkg_compare_versions-function.patch | 51 ++++++++++++++
| 30 +++++---
...ix-dependency-issues-for-preinst-scripts.patch} | 65 ++++++++++--------
...nst-script-is-not-fatal-with-conf-offlin.patch} | 75 +++++++++++---------
...ot-read-etc-opkg-.conf-if-f-is-specified.patch} | 11 ++-
...tch => 0006-detect-circular-dependencies.patch} | 79 +++++++++++++---------
meta/recipes-devtools/opkg/opkg/add_vercmp.patch | 36 ----------
meta/recipes-devtools/opkg/opkg_svn.bb | 12 ++--
8 files changed, 210 insertions(+), 149 deletions(-)
create mode 100644 meta/recipes-devtools/opkg/opkg/0001-add-opkg_compare_versions-function.patch
rename meta/recipes-devtools/opkg/opkg/{add_uname_support.patch => 0002-Ensure-we-use-the-uname-gname-fields-when-extracting.patch} (71%)
rename meta/recipes-devtools/opkg/opkg/{fix_installorder.patch => 0003-Fix-dependency-issues-for-preinst-scripts.patch} (82%)
rename meta/recipes-devtools/opkg/opkg/{offline_postinstall.patch => 0004-Failed-postinst-script-is-not-fatal-with-conf-offlin.patch} (52%)
rename meta/recipes-devtools/opkg/opkg/{conf_override.patch => 0005-Do-not-read-etc-opkg-.conf-if-f-is-specified.patch} (91%)
rename meta/recipes-devtools/opkg/opkg/{track_parents.patch => 0006-detect-circular-dependencies.patch} (59%)
delete mode 100644 meta/recipes-devtools/opkg/opkg/add_vercmp.patch
diff --git a/meta/recipes-devtools/opkg/opkg/0001-add-opkg_compare_versions-function.patch b/meta/recipes-devtools/opkg/opkg/0001-add-opkg_compare_versions-function.patch
new file mode 100644
index 0000000..51853fa
--- /dev/null
+++ b/meta/recipes-devtools/opkg/opkg/0001-add-opkg_compare_versions-function.patch
@@ -0,0 +1,51 @@
+From 029cf99fd44645b5fe1b6491355c631da3096e09 Mon Sep 17 00:00:00 2001
+From: Martin Jansa <Martin.Jansa@gmail.com>
+Date: Sat, 17 Dec 2011 12:51:07 +0100
+Subject: [PATCH 1/7] add opkg_compare_versions function
+
+* not used in opkg but can be usefull, e.g. instead of
+ opkg-utils/opkg-compare-versions.c
+
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+---
+ libopkg/opkg.c | 15 +++++++++++++++
+ libopkg/opkg.h | 2 ++
+ 2 files changed, 17 insertions(+)
+
+diff --git a/libopkg/opkg.c b/libopkg/opkg.c
+index 92f61f4..eaea529 100644
+--- a/libopkg/opkg.c
++++ b/libopkg/opkg.c
+@@ -870,3 +870,18 @@ opkg_repository_accessibility_check(void)
+
+ return ret;
+ }
++
++int
++opkg_compare_versions (const char *ver1, const char *ver2)
++{
++ pkg_t *pkg1, *pkg2;
++
++ pkg1 = pkg_new();
++ pkg2 = pkg_new();
++
++ parse_version(pkg1, ver1);
++ parse_version(pkg2, ver2);
++
++ return pkg_compare_versions(pkg1, pkg2);
++}
++
+diff --git a/libopkg/opkg.h b/libopkg/opkg.h
+index 4fbd404..7aa86eb 100644
+--- a/libopkg/opkg.h
++++ b/libopkg/opkg.h
+@@ -58,4 +58,6 @@ pkg_t* opkg_find_package (const char *name, const char *version, const char *arc
+
+ int opkg_repository_accessibility_check(void);
+
++int opkg_compare_versions (const char *ver1, const char *ver2);
++
+ #endif /* OPKG_H */
+--
+1.7.12
+
diff --git a/meta/recipes-devtools/opkg/opkg/add_uname_support.patch b/meta/recipes-devtools/opkg/opkg/0002-Ensure-we-use-the-uname-gname-fields-when-extracting.patch
similarity index 71%
rename from meta/recipes-devtools/opkg/opkg/add_uname_support.patch
rename to meta/recipes-devtools/opkg/opkg/0002-Ensure-we-use-the-uname-gname-fields-when-extracting.patch
index 0f627f1..a2fb036 100644
--- a/meta/recipes-devtools/opkg/opkg/add_uname_support.patch
+++ b/meta/recipes-devtools/opkg/opkg/0002-Ensure-we-use-the-uname-gname-fields-when-extracting.patch
@@ -1,17 +1,24 @@
+From 254780ab3b0db398447150251332916598d3b9f4 Mon Sep 17 00:00:00 2001
+From: Richard Purdie <richard.purdie@linuxfoundation.org>
+Date: Fri, 11 Nov 2011 17:17:01 +0000
+Subject: [PATCH 2/7] Ensure we use the uname/gname fields when extracting
+ tarballs
-When updating packages on the target device we ideally want to match
+When updating packages on the target device we ideally want to match
user and group numbers from the existing file system. This patch encourages
opkg to lookup the uname/gname fields first and only use the hardcoded
numerical values if that fails.
-Upstream-Status: Pending
+Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+---
+ libbb/unarchive.c | 49 +++++++++++++++++++++++++++++++++++++++++++++++--
+ 1 file changed, 47 insertions(+), 2 deletions(-)
-RP 11/11/11
-
-Index: trunk/libbb/unarchive.c
-===================================================================
---- trunk.orig/libbb/unarchive.c 2011-11-11 15:52:59.761674091 +0000
-+++ trunk/libbb/unarchive.c 2011-11-11 17:04:56.501574419 +0000
+diff --git a/libbb/unarchive.c b/libbb/unarchive.c
+index 5d4464f..d583767 100644
+--- a/libbb/unarchive.c
++++ b/libbb/unarchive.c
@@ -22,10 +22,13 @@
#include <stdio.h>
#include <errno.h>
@@ -26,7 +33,7 @@ Index: trunk/libbb/unarchive.c
#include "libbb.h"
-@@ -436,6 +439,42 @@
+@@ -436,6 +439,42 @@ free_header_ar(file_header_t *ar_entry)
free(ar_entry);
}
@@ -69,7 +76,7 @@ Index: trunk/libbb/unarchive.c
static file_header_t *
get_header_tar(FILE *tar_stream)
-@@ -515,8 +554,14 @@
+@@ -515,8 +554,14 @@ get_header_tar(FILE *tar_stream)
*/
tar_entry->mode = 07777 & strtol(tar.formated.mode, NULL, 8);
@@ -86,3 +93,6 @@ Index: trunk/libbb/unarchive.c
tar_entry->size = strtol(tar.formated.size, NULL, 8);
tar_entry->mtime = strtol(tar.formated.mtime, NULL, 8);
+--
+1.7.12
+
diff --git a/meta/recipes-devtools/opkg/opkg/fix_installorder.patch b/meta/recipes-devtools/opkg/opkg/0003-Fix-dependency-issues-for-preinst-scripts.patch
similarity index 82%
rename from meta/recipes-devtools/opkg/opkg/fix_installorder.patch
rename to meta/recipes-devtools/opkg/opkg/0003-Fix-dependency-issues-for-preinst-scripts.patch
index 6a7e6db..2d7f8ba 100644
--- a/meta/recipes-devtools/opkg/opkg/fix_installorder.patch
+++ b/meta/recipes-devtools/opkg/opkg/0003-Fix-dependency-issues-for-preinst-scripts.patch
@@ -1,16 +1,21 @@
-There is a problem with dependency order when installing packages. The key
-problem revolves around the satisfy_dependencies_for() function which is
+From 6a294b6dad681b0e95aa061bc368d801d2ddc781 Mon Sep 17 00:00:00 2001
+From: Richard Purdie <richard.purdie@linuxfoundation.org>
+Date: Thu, 15 Dec 2011 21:08:49 +0000
+Subject: [PATCH 3/7] Fix dependency issues for preinst scripts
+
+There is a problem with dependency order when installing packages. The key
+problem revolves around the satisfy_dependencies_for() function which is
called from opkg_install_pkg just before the installation (and preinst)
happens.
The satisfy_dependencies_for() function calls pkg_hash_fetch_unsatisfied_dependencies()
-which will only return packages which were previously not marked as
-*going* to be installed at some point. For the purposes of
-opkg_install_pkg() we really need to know which dependencies haven't been
+which will only return packages which were previously not marked as
+*going* to be installed at some point. For the purposes of
+opkg_install_pkg() we really need to know which dependencies haven't been
installed yet.
-This patch adds pkg_hash_fetch_satisfied_dependencies() which returns a
-list of package dependencies. We can then directly check the status of
+This patch adds pkg_hash_fetch_satisfied_dependencies() which returns a
+list of package dependencies. We can then directly check the status of
these and ensure any hard dependencies (not suggestions or recommendations)
are installed before returning.
@@ -21,9 +26,9 @@ A -> B,E
E -> B
B -> C
-Currently X would install A and E. When installing A the packages B, E
+Currently X would install A and E. When installing A the packages B, E
and C would be marked as "to install". When the package B is considered
-the second time (as a dependency of E rather than A), it would install
+the second time (as a dependency of E rather than A), it would install
straight away even though C was not currently installed, just marked
as needing to be installed.
@@ -31,15 +36,18 @@ The patch changes the behaviour so B can't install until C really is installed.
This change is required to run the postinst scripts in the correct order.
-Upstream-Status: Pending
-
-RP 2011/12/15
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+---
+ libopkg/opkg_install.c | 21 +++++++++++++
+ libopkg/pkg_depends.c | 82 ++++++++++++++++++++++++++++++++++++++++++++++++++
+ libopkg/pkg_depends.h | 1 +
+ 3 files changed, 104 insertions(+)
-Index: trunk/libopkg/opkg_install.c
-===================================================================
---- trunk.orig/libopkg/opkg_install.c 2011-12-15 15:58:39.000000000 +0000
-+++ trunk/libopkg/opkg_install.c 2011-12-15 15:58:41.838334788 +0000
-@@ -76,6 +77,27 @@
+diff --git a/libopkg/opkg_install.c b/libopkg/opkg_install.c
+index 3925f58..1632066 100644
+--- a/libopkg/opkg_install.c
++++ b/libopkg/opkg_install.c
+@@ -76,6 +76,27 @@ satisfy_dependencies_for(pkg_t *pkg)
}
if (ndepends <= 0) {
@@ -67,11 +75,11 @@ Index: trunk/libopkg/opkg_install.c
pkg_vec_free(depends);
return 0;
}
-Index: trunk/libopkg/pkg_depends.c
-===================================================================
---- trunk.orig/libopkg/pkg_depends.c 2010-12-22 16:04:43.000000000 +0000
-+++ trunk/libopkg/pkg_depends.c 2011-12-15 15:58:41.838334788 +0000
-@@ -259,6 +259,88 @@
+diff --git a/libopkg/pkg_depends.c b/libopkg/pkg_depends.c
+index 1e14d1f..36c76aa 100644
+--- a/libopkg/pkg_depends.c
++++ b/libopkg/pkg_depends.c
+@@ -259,6 +259,88 @@ pkg_hash_fetch_unsatisfied_dependencies(pkg_t * pkg, pkg_vec_t *unsatisfied,
return unsatisfied->len;
}
@@ -160,11 +168,11 @@ Index: trunk/libopkg/pkg_depends.c
/*checking for conflicts !in replaces
If a packages conflicts with another but is also replacing it, I should not consider it a
really conflicts
-Index: trunk/libopkg/pkg_depends.h
-===================================================================
---- trunk.orig/libopkg/pkg_depends.h 2010-12-22 16:04:43.000000000 +0000
-+++ trunk/libopkg/pkg_depends.h 2011-12-15 15:58:41.838334788 +0000
-@@ -82,6 +82,7 @@
+diff --git a/libopkg/pkg_depends.h b/libopkg/pkg_depends.h
+index 5d1f074..b8072e2 100644
+--- a/libopkg/pkg_depends.h
++++ b/libopkg/pkg_depends.h
+@@ -82,6 +82,7 @@ char *pkg_depend_str(pkg_t *pkg, int index);
void buildDependedUponBy(pkg_t * pkg, abstract_pkg_t * ab_pkg);
int version_constraints_satisfied(depend_t * depends, pkg_t * pkg);
int pkg_hash_fetch_unsatisfied_dependencies(pkg_t * pkg, pkg_vec_t *depends, char *** unresolved);
@@ -172,3 +180,6 @@ Index: trunk/libopkg/pkg_depends.h
pkg_vec_t * pkg_hash_fetch_conflicts(pkg_t * pkg);
int pkg_dependence_satisfiable(depend_t *depend);
int pkg_dependence_satisfied(depend_t *depend);
+--
+1.7.12
+
diff --git a/meta/recipes-devtools/opkg/opkg/offline_postinstall.patch b/meta/recipes-devtools/opkg/opkg/0004-Failed-postinst-script-is-not-fatal-with-conf-offlin.patch
similarity index 52%
rename from meta/recipes-devtools/opkg/opkg/offline_postinstall.patch
rename to meta/recipes-devtools/opkg/opkg/0004-Failed-postinst-script-is-not-fatal-with-conf-offlin.patch
index b197f6b..902fe5c 100644
--- a/meta/recipes-devtools/opkg/opkg/offline_postinstall.patch
+++ b/meta/recipes-devtools/opkg/opkg/0004-Failed-postinst-script-is-not-fatal-with-conf-offlin.patch
@@ -1,35 +1,27 @@
-When we have an offline root and have specified force-postinstall,
+From 1f709b4540e12cf7e08592aae0ad7e3e35322cab Mon Sep 17 00:00:00 2001
+From: Richard Purdie <richard.purdie@linuxfoundation.org>
+Date: Thu, 15 Dec 2011 21:08:49 +0000
+Subject: [PATCH 4/7] Failed postinst script is not fatal with
+ conf->offline_root
+
+When we have an offline root and have specified force-postinstall,
attempt to run the postinstall but if it fails, just leave it in the
-status file as neeing to run. We can issue a NOTICE this is happened
+status file as needing to run. We can issue a NOTICE this is happened
but supress errors. This means the OE class doesn't have to do any
further post processing of the postinstalls itself.
-Upstream-Status: Pending
-
-RP 2011/12/15
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+---
+ libopkg/opkg_cmd.c | 3 ++-
+ libopkg/opkg_configure.c | 5 ++++-
+ libopkg/pkg.c | 5 +++--
+ 3 files changed, 9 insertions(+), 4 deletions(-)
-
-Index: trunk/libopkg/pkg.c
-===================================================================
---- trunk.orig/libopkg/pkg.c 2011-12-15 15:58:39.000000000 +0000
-+++ trunk/libopkg/pkg.c 2011-12-15 20:04:50.109992736 +0000
-@@ -1297,8 +1297,9 @@
- free(cmd);
-
- if (err) {
-- opkg_msg(ERROR, "package \"%s\" %s script returned status %d.\n",
-- pkg->name, script, err);
-+ if (!conf->offline_root)
-+ opkg_msg(ERROR, "package \"%s\" %s script returned status %d.\n",
-+ pkg->name, script, err);
- return err;
- }
-
-Index: trunk/libopkg/opkg_cmd.c
-===================================================================
---- trunk.orig/libopkg/opkg_cmd.c 2011-12-15 19:49:25.826014150 +0000
-+++ trunk/libopkg/opkg_cmd.c 2011-12-15 19:50:52.346012148 +0000
-@@ -453,7 +453,8 @@
+diff --git a/libopkg/opkg_cmd.c b/libopkg/opkg_cmd.c
+index 11e7867..36ff8eb 100644
+--- a/libopkg/opkg_cmd.c
++++ b/libopkg/opkg_cmd.c
+@@ -453,7 +453,8 @@ opkg_configure_packages(char *pkg_name)
pkg->state_flag &= ~SF_PREFER;
opkg_state_changed++;
} else {
@@ -39,11 +31,11 @@ Index: trunk/libopkg/opkg_cmd.c
}
}
}
-Index: trunk/libopkg/opkg_configure.c
-===================================================================
---- trunk.orig/libopkg/opkg_configure.c 2011-12-15 19:50:11.586013081 +0000
-+++ trunk/libopkg/opkg_configure.c 2011-12-15 19:52:15.082010347 +0000
-@@ -35,7 +35,10 @@
+diff --git a/libopkg/opkg_configure.c b/libopkg/opkg_configure.c
+index 719da5a..169828d 100644
+--- a/libopkg/opkg_configure.c
++++ b/libopkg/opkg_configure.c
+@@ -35,7 +35,10 @@ opkg_configure(pkg_t *pkg)
err = pkg_run_script(pkg, "postinst", "configure");
if (err) {
@@ -55,3 +47,22 @@ Index: trunk/libopkg/opkg_configure.c
return err;
}
+diff --git a/libopkg/pkg.c b/libopkg/pkg.c
+index d8c3984..6ccbde2 100644
+--- a/libopkg/pkg.c
++++ b/libopkg/pkg.c
+@@ -1297,8 +1297,9 @@ pkg_run_script(pkg_t *pkg, const char *script, const char *args)
+ free(cmd);
+
+ if (err) {
+- opkg_msg(ERROR, "package \"%s\" %s script returned status %d.\n",
+- pkg->name, script, err);
++ if (!conf->offline_root)
++ opkg_msg(ERROR, "package \"%s\" %s script returned status %d.\n",
++ pkg->name, script, err);
+ return err;
+ }
+
+--
+1.7.12
+
diff --git a/meta/recipes-devtools/opkg/opkg/conf_override.patch b/meta/recipes-devtools/opkg/opkg/0005-Do-not-read-etc-opkg-.conf-if-f-is-specified.patch
similarity index 91%
rename from meta/recipes-devtools/opkg/opkg/conf_override.patch
rename to meta/recipes-devtools/opkg/opkg/0005-Do-not-read-etc-opkg-.conf-if-f-is-specified.patch
index b1698d8..2d006c3 100644
--- a/meta/recipes-devtools/opkg/opkg/conf_override.patch
+++ b/meta/recipes-devtools/opkg/opkg/0005-Do-not-read-etc-opkg-.conf-if-f-is-specified.patch
@@ -1,17 +1,16 @@
-From 45d0468f7f9e9be633b2819aa43ab9b6287b8e6a Mon Sep 17 00:00:00 2001
+From 541b6b7bd80dc321493e42955d93b277af0c9221 Mon Sep 17 00:00:00 2001
From: Paul Eggleton <paul.eggleton@linux.intel.com>
Date: Mon, 9 Jul 2012 11:01:15 +0100
-Subject: [PATCH] Do not read /etc/opkg/*.conf if -f is specified
+Subject: [PATCH 5/7] Do not read /etc/opkg/*.conf if -f is specified
If a configuration file is specified on the command line, we should
assume it contains all of the configuration and not try to read the
configuration in /etc/opkg.
-Upstream-Status: Pending
-
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
- libopkg/opkg_conf.c | 55 ++++++++++++++++++++++++++-------------------------
+ libopkg/opkg_conf.c | 55 +++++++++++++++++++++++++++--------------------------
1 file changed, 28 insertions(+), 27 deletions(-)
diff --git a/libopkg/opkg_conf.c b/libopkg/opkg_conf.c
@@ -87,5 +86,5 @@ index 4711ce7..1e65bad 100644
if (conf->offline_root)
sprintf_alloc (&lock_file, "%s/%s", conf->offline_root, OPKGLOCKFILE);
--
-1.7.9.5
+1.7.12
diff --git a/meta/recipes-devtools/opkg/opkg/track_parents.patch b/meta/recipes-devtools/opkg/opkg/0006-detect-circular-dependencies.patch
similarity index 59%
rename from meta/recipes-devtools/opkg/opkg/track_parents.patch
rename to meta/recipes-devtools/opkg/opkg/0006-detect-circular-dependencies.patch
index ef327e3..cdf5e76 100644
--- a/meta/recipes-devtools/opkg/opkg/track_parents.patch
+++ b/meta/recipes-devtools/opkg/opkg/0006-detect-circular-dependencies.patch
@@ -1,15 +1,27 @@
-Add logic to detect circular dependencies. If we see any dependency from any
-given parent twice, ignore it the second time and print a notice message
+From f434078a342435ae8a666b599d989c30d4c6a7f5 Mon Sep 17 00:00:00 2001
+From: Richard Purdie <richard.purdie@linuxfoundation.org>
+Date: Sun, 18 Dec 2011 23:54:30 +0000
+Subject: [PATCH 6/7] detect circular dependencies
+
+Add logic to detect circular dependencies. If we see any dependency from
+any given parent twice, ignore it the second time and print a notice message
that we did so.
-Upstream-Status: Pending
-RP 2011/12/18
+Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+---
+ libopkg/opkg_install.c | 8 ++++++++
+ libopkg/pkg.c | 2 ++
+ libopkg/pkg.h | 1 +
+ libopkg/pkg_depends.c | 3 +--
+ libopkg/pkg_depends.h | 1 +
+ 5 files changed, 13 insertions(+), 2 deletions(-)
-Index: trunk/libopkg/opkg_install.c
-===================================================================
---- trunk.orig/libopkg/opkg_install.c 2011-12-18 11:15:17.320725365 +0000
-+++ trunk/libopkg/opkg_install.c 2011-12-18 12:38:54.980609225 +0000
-@@ -84,8 +84,14 @@
+diff --git a/libopkg/opkg_install.c b/libopkg/opkg_install.c
+index 1632066..0216914 100644
+--- a/libopkg/opkg_install.c
++++ b/libopkg/opkg_install.c
+@@ -84,8 +84,14 @@ satisfy_dependencies_for(pkg_t *pkg)
/* The package was uninstalled when we started, but another
dep earlier in this loop may have depended on it and pulled
it in, so check first. */
@@ -24,7 +36,7 @@ Index: trunk/libopkg/opkg_install.c
err = opkg_install_pkg(dep, 0);
/* mark this package as having been automatically installed to
* satisfy a dependency */
-@@ -115,6 +121,8 @@
+@@ -115,6 +121,8 @@ satisfy_dependencies_for(pkg_t *pkg)
/* The package was uninstalled when we started, but another
dep earlier in this loop may have depended on it and pulled
it in, so check first. */
@@ -33,11 +45,11 @@ Index: trunk/libopkg/opkg_install.c
if ((dep->state_status != SS_INSTALLED)
&& (dep->state_status != SS_UNPACKED)) {
opkg_msg(DEBUG2,"Calling opkg_install_pkg.\n");
-Index: trunk/libopkg/pkg.c
-===================================================================
---- trunk.orig/libopkg/pkg.c 2011-12-18 11:12:39.976729002 +0000
-+++ trunk/libopkg/pkg.c 2011-12-18 11:22:34.528715535 +0000
-@@ -86,6 +86,7 @@
+diff --git a/libopkg/pkg.c b/libopkg/pkg.c
+index 6ccbde2..be486ee 100644
+--- a/libopkg/pkg.c
++++ b/libopkg/pkg.c
+@@ -86,6 +86,7 @@ pkg_init(pkg_t *pkg)
pkg->section = NULL;
pkg->description = NULL;
pkg->state_want = SW_UNKNOWN;
@@ -45,7 +57,7 @@ Index: trunk/libopkg/pkg.c
pkg->state_flag = SF_OK;
pkg->state_status = SS_NOT_INSTALLED;
pkg->depends_str = NULL;
-@@ -191,6 +192,7 @@
+@@ -191,6 +192,7 @@ pkg_deinit(pkg_t *pkg)
pkg->description = NULL;
pkg->state_want = SW_UNKNOWN;
@@ -53,11 +65,11 @@ Index: trunk/libopkg/pkg.c
pkg->state_flag = SF_OK;
pkg->state_status = SS_NOT_INSTALLED;
-Index: trunk/libopkg/pkg.h
-===================================================================
---- trunk.orig/libopkg/pkg.h 2011-12-18 11:12:37.120728742 +0000
-+++ trunk/libopkg/pkg.h 2011-12-18 11:15:39.080725150 +0000
-@@ -129,6 +129,7 @@
+diff --git a/libopkg/pkg.h b/libopkg/pkg.h
+index 775b656..5d468cb 100644
+--- a/libopkg/pkg.h
++++ b/libopkg/pkg.h
+@@ -129,6 +129,7 @@ struct pkg
char *description;
char *tags;
pkg_state_want_t state_want;
@@ -65,11 +77,11 @@ Index: trunk/libopkg/pkg.h
pkg_state_flag_t state_flag;
pkg_state_status_t state_status;
char **depends_str;
-Index: trunk/libopkg/pkg_depends.c
-===================================================================
---- trunk.orig/libopkg/pkg_depends.c 2011-12-18 11:14:24.464726569 +0000
-+++ trunk/libopkg/pkg_depends.c 2011-12-18 11:30:32.516704127 +0000
-@@ -30,7 +30,6 @@
+diff --git a/libopkg/pkg_depends.c b/libopkg/pkg_depends.c
+index 36c76aa..a72eed7 100644
+--- a/libopkg/pkg_depends.c
++++ b/libopkg/pkg_depends.c
+@@ -30,7 +30,6 @@ static int parseDepends(compound_depend_t *compound_depend, char * depend_str);
static depend_t * depend_init(void);
static char ** add_unresolved_dep(pkg_t * pkg, char ** the_lost, int ref_ndx);
static char ** merge_unresolved(char ** oldstuff, char ** newstuff);
@@ -77,7 +89,7 @@ Index: trunk/libopkg/pkg_depends.c
static int pkg_installed_and_constraint_satisfied(pkg_t *pkg, void *cdata)
{
-@@ -531,7 +530,7 @@
+@@ -531,7 +530,7 @@ int pkg_dependence_satisfied(depend_t *depend)
return 0;
}
@@ -86,14 +98,17 @@ Index: trunk/libopkg/pkg_depends.c
{
int i;
pkg_t ** pkgs = vec->pkgs;
-Index: trunk/libopkg/pkg_depends.h
-===================================================================
---- trunk.orig/libopkg/pkg_depends.h 2011-12-18 11:28:51.960706484 +0000
-+++ trunk/libopkg/pkg_depends.h 2011-12-18 11:29:19.400705862 +0000
-@@ -87,5 +87,6 @@
+diff --git a/libopkg/pkg_depends.h b/libopkg/pkg_depends.h
+index b8072e2..ca0801f 100644
+--- a/libopkg/pkg_depends.h
++++ b/libopkg/pkg_depends.h
+@@ -87,5 +87,6 @@ pkg_vec_t * pkg_hash_fetch_conflicts(pkg_t * pkg);
int pkg_dependence_satisfiable(depend_t *depend);
int pkg_dependence_satisfied(depend_t *depend);
const char* constraint_to_str(enum version_constraint c);
+int is_pkg_in_pkg_vec(pkg_vec_t * vec, pkg_t * pkg);
#endif
+--
+1.7.12
+
diff --git a/meta/recipes-devtools/opkg/opkg/add_vercmp.patch b/meta/recipes-devtools/opkg/opkg/add_vercmp.patch
deleted file mode 100644
index 1203c54..0000000
--- a/meta/recipes-devtools/opkg/opkg/add_vercmp.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-Upstream-Status: Inappropriate [function not used]
-
-Index: trunk/libopkg/opkg.c
-===================================================================
---- trunk.orig/libopkg/opkg.c 2010-01-26 20:32:19.000000000 +0000
-+++ trunk/libopkg/opkg.c 2010-01-26 20:40:34.000000000 +0000
-@@ -876,3 +876,18 @@
-
- return ret;
- }
-+
-+int
-+opkg_compare_versions (const char *ver1, const char *ver2)
-+{
-+ pkg_t *pkg1, *pkg2;
-+
-+ pkg1 = pkg_new();
-+ pkg2 = pkg_new();
-+
-+ parse_version(pkg1, ver1);
-+ parse_version(pkg2, ver2);
-+
-+ return pkg_compare_versions(pkg1, pkg2);
-+}
-+
-Index: trunk/libopkg/opkg.h
-===================================================================
---- trunk.orig/libopkg/opkg.h 2010-01-26 20:32:19.000000000 +0000
-+++ trunk/libopkg/opkg.h 2010-01-26 20:35:19.000000000 +0000
-@@ -58,4 +58,6 @@
-
- int opkg_repository_accessibility_check(void);
-
-+int opkg_compare_versions (const char *ver1, const char *ver2);
-+
- #endif /* OPKG_H */
diff --git a/meta/recipes-devtools/opkg/opkg_svn.bb b/meta/recipes-devtools/opkg/opkg_svn.bb
index 4146b7e..03ed103 100644
--- a/meta/recipes-devtools/opkg/opkg_svn.bb
+++ b/meta/recipes-devtools/opkg/opkg_svn.bb
@@ -1,12 +1,12 @@
require opkg.inc
SRC_URI = "svn://opkg.googlecode.com/svn;module=trunk;protocol=http \
- file://add_vercmp.patch \
- file://add_uname_support.patch \
- file://fix_installorder.patch \
- file://offline_postinstall.patch\
- file://track_parents.patch \
- file://conf_override.patch \
+ file://0001-add-opkg_compare_versions-function.patch \
+ file://0002-Ensure-we-use-the-uname-gname-fields-when-extracting.patch \
+ file://0003-Fix-dependency-issues-for-preinst-scripts.patch \
+ file://0004-Failed-postinst-script-is-not-fatal-with-conf-offlin.patch \
+ file://0005-Do-not-read-etc-opkg-.conf-if-f-is-specified.patch \
+ file://0006-detect-circular-dependencies.patch \
"
S = "${WORKDIR}/trunk"
--
1.7.12
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 2/3] opkg: add patch to fix SIGSEGV when printing status file
2012-09-19 17:16 [PATCH 0/3] Opkg patch upstreaming and SIGSEGV fix Martin Jansa
2012-09-19 17:16 ` [PATCH 1/3] opkg: replace local patches with git patches submitted upstream Martin Jansa
@ 2012-09-19 17:16 ` Martin Jansa
[not found] ` <cover.1348076271.git.Martin.Jansa@gmail.com>
2012-09-19 17:16 ` [PATCH 3/3] opkg-nogpg: drop SRCREV Martin Jansa
` (2 subsequent siblings)
4 siblings, 1 reply; 9+ messages in thread
From: Martin Jansa @ 2012-09-19 17:16 UTC (permalink / raw)
To: openembedded-core
* it was triggered by c02364f36e228835ea5d7fd4e1d347fd451f8544 when new package had 2 entries in Provides and old version just 1
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
...g-provides-even-when-oldpkg-provides-exis.patch | 46 ++++++++++++++++++++++
meta/recipes-devtools/opkg/opkg_svn.bb | 3 +-
2 files changed, 48 insertions(+), 1 deletion(-)
create mode 100644 meta/recipes-devtools/opkg/opkg/0007-merge-newpkg-provides-even-when-oldpkg-provides-exis.patch
diff --git a/meta/recipes-devtools/opkg/opkg/0007-merge-newpkg-provides-even-when-oldpkg-provides-exis.patch b/meta/recipes-devtools/opkg/opkg/0007-merge-newpkg-provides-even-when-oldpkg-provides-exis.patch
new file mode 100644
index 0000000..1e5e965
--- /dev/null
+++ b/meta/recipes-devtools/opkg/opkg/0007-merge-newpkg-provides-even-when-oldpkg-provides-exis.patch
@@ -0,0 +1,46 @@
+From 3340b120909ea353440cfffe01fed43c55387a00 Mon Sep 17 00:00:00 2001
+From: Martin Jansa <Martin.Jansa@gmail.com>
+Date: Wed, 19 Sep 2012 17:31:45 +0200
+Subject: [PATCH 7/7] merge newpkg->provides even when oldpkg->provides
+ existed
+
+* introduced in http://code.google.com/p/opkg/source/diff?spec=svn277&r=277&format=side&path=/trunk/libopkg/pkg.c
+* the problem happens when oldpkg provide 1 and newpkg provide 2
+ provides_count is merged to 2, but oldpkg->provides has only 1 entry
+ causing SIGSEGV:
+ pkg_formatted_field (fp=fp@entry=0x1444ce0, pkg=pkg@entry=0x120c620, field=<optimized out>, field@entry=0x7ffff7bd2abe "Provides") at pkg.c:739
+ 739 fprintf(fp, "%s %s", i == 1 ? "" : ",",
+ (gdb) bt
+ #0 pkg_formatted_field (fp=fp@entry=0x1444ce0, pkg=pkg@entry=0x120c620, field=<optimized out>, field@entry=0x7ffff7bd2abe "Provides") at pkg.c:739
+ #1 0x00007ffff7bc32fc in pkg_print_status (pkg=0x120c620, file=0x1444ce0) at pkg.c:887
+ #2 0x00007ffff7bbff59 in opkg_conf_write_status_files () at opkg_conf.c:400
+ #3 0x00007ffff7bbad8a in write_status_files_if_changed () at opkg_cmd.c:65
+ #4 0x00007ffff7bbb73e in opkg_upgrade_cmd (argc=<optimized out>, argv=<optimized out>) at opkg_cmd.c:577
+ #5 0x00007ffff7bbbcc2 in opkg_cmd_exec (cmd=cmd@entry=0x7ffff7dda080, argc=argc@entry=1, argv=argv@entry=0x7fffffffe768) at opkg_cmd.c:1319
+ #6 0x000000000040165f in main (argc=3, argv=0x7fffffffe758) at opkg-cl.c:377
+
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+---
+ libopkg/pkg.c | 6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
+
+diff --git a/libopkg/pkg.c b/libopkg/pkg.c
+index be486ee..255c673 100644
+--- a/libopkg/pkg.c
++++ b/libopkg/pkg.c
+@@ -377,10 +377,8 @@ pkg_merge(pkg_t *oldpkg, pkg_t *newpkg)
+ oldpkg->provides_count = newpkg->provides_count;
+ newpkg->provides_count = 0;
+
+- if (!oldpkg->provides) {
+- oldpkg->provides = newpkg->provides;
+- newpkg->provides = NULL;
+- }
++ oldpkg->provides = newpkg->provides;
++ newpkg->provides = NULL;
+ }
+
+ if (!oldpkg->conflicts_count) {
+--
+1.7.12
+
diff --git a/meta/recipes-devtools/opkg/opkg_svn.bb b/meta/recipes-devtools/opkg/opkg_svn.bb
index 03ed103..9a03f2e 100644
--- a/meta/recipes-devtools/opkg/opkg_svn.bb
+++ b/meta/recipes-devtools/opkg/opkg_svn.bb
@@ -7,6 +7,7 @@ SRC_URI = "svn://opkg.googlecode.com/svn;module=trunk;protocol=http \
file://0004-Failed-postinst-script-is-not-fatal-with-conf-offlin.patch \
file://0005-Do-not-read-etc-opkg-.conf-if-f-is-specified.patch \
file://0006-detect-circular-dependencies.patch \
+ file://0007-merge-newpkg-provides-even-when-oldpkg-provides-exis.patch \
"
S = "${WORKDIR}/trunk"
@@ -14,4 +15,4 @@ S = "${WORKDIR}/trunk"
SRCREV = "633"
PV = "0.1.8+svnr${SRCPV}"
-PR = "${INC_PR}.2"
+PR = "${INC_PR}.3"
--
1.7.12
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 3/3] opkg-nogpg: drop SRCREV
2012-09-19 17:16 [PATCH 0/3] Opkg patch upstreaming and SIGSEGV fix Martin Jansa
2012-09-19 17:16 ` [PATCH 1/3] opkg: replace local patches with git patches submitted upstream Martin Jansa
2012-09-19 17:16 ` [PATCH 2/3] opkg: add patch to fix SIGSEGV when printing status file Martin Jansa
@ 2012-09-19 17:16 ` Martin Jansa
2012-09-19 17:29 ` [PATCH 0/3] Opkg patch upstreaming and SIGSEGV fix Saul Wold
2012-09-21 22:25 ` Saul Wold
4 siblings, 0 replies; 9+ messages in thread
From: Martin Jansa @ 2012-09-19 17:16 UTC (permalink / raw)
To: openembedded-core
* use SRCREV from opkg_svn.bb, because with 596 patches we have won't apply
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
meta/recipes-devtools/opkg/opkg-nogpg_svn.bb | 2 --
1 file changed, 2 deletions(-)
diff --git a/meta/recipes-devtools/opkg/opkg-nogpg_svn.bb b/meta/recipes-devtools/opkg/opkg-nogpg_svn.bb
index 35f0581..e1b9f24 100644
--- a/meta/recipes-devtools/opkg/opkg-nogpg_svn.bb
+++ b/meta/recipes-devtools/opkg/opkg-nogpg_svn.bb
@@ -3,8 +3,6 @@ require opkg_svn.bb
DEPENDS = "curl"
PROVIDES += "opkg"
-SRCREV = "596"
-
EXTRA_OECONF += "--disable-gpg"
DEFAULT_PREFERENCE = "-1"
--
1.7.12
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 0/3] Opkg patch upstreaming and SIGSEGV fix
2012-09-19 17:16 [PATCH 0/3] Opkg patch upstreaming and SIGSEGV fix Martin Jansa
` (2 preceding siblings ...)
2012-09-19 17:16 ` [PATCH 3/3] opkg-nogpg: drop SRCREV Martin Jansa
@ 2012-09-19 17:29 ` Saul Wold
2012-09-19 17:33 ` Martin Jansa
2012-09-21 22:25 ` Saul Wold
4 siblings, 1 reply; 9+ messages in thread
From: Saul Wold @ 2012-09-19 17:29 UTC (permalink / raw)
To: Martin Jansa; +Cc: openembedded-core
On 09/19/2012 10:16 AM, Martin Jansa wrote:
> This depends on
> http://patchwork.openembedded.org/patch/36893/
> otherwise warning about missing SRC_URI entries will be shown
>
> The following changes since commit f06097f4581e4c728c2950a86e025384e4bdcdf0:
>
> eglibc: Do not use fsqrt in libm when building for fsl ppc with fpu (2012-09-18 07:44:13 -0700)
>
> are available in the git repository at:
>
> git://git.openembedded.org/openembedded-core-contrib jansa/opkg
> http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=jansa/opkg
>
> Martin Jansa (3):
> opkg: replace local patches with git patches submitted upstream
> opkg: add patch to fix SIGSEGV when printing status file
> opkg-nogpg: drop SRCREV
>
> meta/recipes-devtools/opkg/opkg-nogpg_svn.bb | 2 -
> .../0001-add-opkg_compare_versions-function.patch | 51 ++++++++++++++
> ...e-the-uname-gname-fields-when-extracting.patch} | 30 +++++---
> ...ix-dependency-issues-for-preinst-scripts.patch} | 65 ++++++++++--------
> ...nst-script-is-not-fatal-with-conf-offlin.patch} | 75 +++++++++++---------
> ...ot-read-etc-opkg-.conf-if-f-is-specified.patch} | 11 ++-
> ...tch => 0006-detect-circular-dependencies.patch} | 79 +++++++++++++---------
> ...g-provides-even-when-oldpkg-provides-exis.patch | 46 +++++++++++++
> meta/recipes-devtools/opkg/opkg/add_vercmp.patch | 36 ----------
These patches do not have Upstream-Status in the local version, I guess
you are trying to preserve the original state? How soon will they be
accepted into the upstream?
They should still have Upstream-Status: Submitted added.
Thanks
Sau!
> meta/recipes-devtools/opkg/opkg_svn.bb | 15 ++--
> 10 files changed, 258 insertions(+), 152 deletions(-)
> create mode 100644 meta/recipes-devtools/opkg/opkg/0001-add-opkg_compare_versions-function.patch
> rename meta/recipes-devtools/opkg/opkg/{add_uname_support.patch => 0002-Ensure-we-use-the-uname-gname-fields-when-extracting.patch} (71%)
> rename meta/recipes-devtools/opkg/opkg/{fix_installorder.patch => 0003-Fix-dependency-issues-for-preinst-scripts.patch} (82%)
> rename meta/recipes-devtools/opkg/opkg/{offline_postinstall.patch => 0004-Failed-postinst-script-is-not-fatal-with-conf-offlin.patch} (52%)
> rename meta/recipes-devtools/opkg/opkg/{conf_override.patch => 0005-Do-not-read-etc-opkg-.conf-if-f-is-specified.patch} (91%)
> rename meta/recipes-devtools/opkg/opkg/{track_parents.patch => 0006-detect-circular-dependencies.patch} (59%)
> create mode 100644 meta/recipes-devtools/opkg/opkg/0007-merge-newpkg-provides-even-when-oldpkg-provides-exis.patch
> delete mode 100644 meta/recipes-devtools/opkg/opkg/add_vercmp.patch
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 0/3] Opkg patch upstreaming and SIGSEGV fix
2012-09-19 17:29 ` [PATCH 0/3] Opkg patch upstreaming and SIGSEGV fix Saul Wold
@ 2012-09-19 17:33 ` Martin Jansa
0 siblings, 0 replies; 9+ messages in thread
From: Martin Jansa @ 2012-09-19 17:33 UTC (permalink / raw)
To: Saul Wold; +Cc: openembedded-core
[-- Attachment #1: Type: text/plain, Size: 3170 bytes --]
On Wed, Sep 19, 2012 at 10:29:51AM -0700, Saul Wold wrote:
> On 09/19/2012 10:16 AM, Martin Jansa wrote:
> > This depends on
> > http://patchwork.openembedded.org/patch/36893/
> > otherwise warning about missing SRC_URI entries will be shown
> >
> > The following changes since commit f06097f4581e4c728c2950a86e025384e4bdcdf0:
> >
> > eglibc: Do not use fsqrt in libm when building for fsl ppc with fpu (2012-09-18 07:44:13 -0700)
> >
> > are available in the git repository at:
> >
> > git://git.openembedded.org/openembedded-core-contrib jansa/opkg
> > http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=jansa/opkg
> >
> > Martin Jansa (3):
> > opkg: replace local patches with git patches submitted upstream
> > opkg: add patch to fix SIGSEGV when printing status file
> > opkg-nogpg: drop SRCREV
> >
> > meta/recipes-devtools/opkg/opkg-nogpg_svn.bb | 2 -
> > .../0001-add-opkg_compare_versions-function.patch | 51 ++++++++++++++
> > ...e-the-uname-gname-fields-when-extracting.patch} | 30 +++++---
> > ...ix-dependency-issues-for-preinst-scripts.patch} | 65 ++++++++++--------
> > ...nst-script-is-not-fatal-with-conf-offlin.patch} | 75 +++++++++++---------
> > ...ot-read-etc-opkg-.conf-if-f-is-specified.patch} | 11 ++-
> > ...tch => 0006-detect-circular-dependencies.patch} | 79 +++++++++++++---------
> > ...g-provides-even-when-oldpkg-provides-exis.patch | 46 +++++++++++++
> > meta/recipes-devtools/opkg/opkg/add_vercmp.patch | 36 ----------
>
> These patches do not have Upstream-Status in the local version, I guess
> you are trying to preserve the original state? How soon will they be
> accepted into the upstream?
No idea, but Graham was usually quick.
> They should still have Upstream-Status: Submitted added.
Ah sorry, I've sent wrong version of this patch, yes I had them with
Upstream-Status: Submitted
Sending v2 in few minutes.
>
> Thanks
> Sau!
>
> > meta/recipes-devtools/opkg/opkg_svn.bb | 15 ++--
> > 10 files changed, 258 insertions(+), 152 deletions(-)
> > create mode 100644 meta/recipes-devtools/opkg/opkg/0001-add-opkg_compare_versions-function.patch
> > rename meta/recipes-devtools/opkg/opkg/{add_uname_support.patch => 0002-Ensure-we-use-the-uname-gname-fields-when-extracting.patch} (71%)
> > rename meta/recipes-devtools/opkg/opkg/{fix_installorder.patch => 0003-Fix-dependency-issues-for-preinst-scripts.patch} (82%)
> > rename meta/recipes-devtools/opkg/opkg/{offline_postinstall.patch => 0004-Failed-postinst-script-is-not-fatal-with-conf-offlin.patch} (52%)
> > rename meta/recipes-devtools/opkg/opkg/{conf_override.patch => 0005-Do-not-read-etc-opkg-.conf-if-f-is-specified.patch} (91%)
> > rename meta/recipes-devtools/opkg/opkg/{track_parents.patch => 0006-detect-circular-dependencies.patch} (59%)
> > create mode 100644 meta/recipes-devtools/opkg/opkg/0007-merge-newpkg-provides-even-when-oldpkg-provides-exis.patch
> > delete mode 100644 meta/recipes-devtools/opkg/opkg/add_vercmp.patch
> >
--
Martin 'JaMa' Jansa jabber: Martin.Jansa@gmail.com
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCHv2 2/3] opkg: add patch to fix SIGSEGV when printing status file
[not found] ` <cover.1348076271.git.Martin.Jansa@gmail.com>
@ 2012-09-19 17:40 ` Martin Jansa
2012-09-19 17:41 ` [PATCHv2 1/3] opkg: replace local patches with git patches submitted upstream Martin Jansa
1 sibling, 0 replies; 9+ messages in thread
From: Martin Jansa @ 2012-09-19 17:40 UTC (permalink / raw)
To: openembedded-core
* it was triggered by c02364f36e228835ea5d7fd4e1d347fd451f8544 when new package had 2 entries in Provides and old version just 1
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
...g-provides-even-when-oldpkg-provides-exis.patch | 49 ++++++++++++++++++++++
meta/recipes-devtools/opkg/opkg_svn.bb | 3 +-
2 files changed, 51 insertions(+), 1 deletion(-)
create mode 100644 meta/recipes-devtools/opkg/opkg/0007-merge-newpkg-provides-even-when-oldpkg-provides-exis.patch
diff --git a/meta/recipes-devtools/opkg/opkg/0007-merge-newpkg-provides-even-when-oldpkg-provides-exis.patch b/meta/recipes-devtools/opkg/opkg/0007-merge-newpkg-provides-even-when-oldpkg-provides-exis.patch
new file mode 100644
index 0000000..f1be7b8
--- /dev/null
+++ b/meta/recipes-devtools/opkg/opkg/0007-merge-newpkg-provides-even-when-oldpkg-provides-exis.patch
@@ -0,0 +1,49 @@
+From 3340b120909ea353440cfffe01fed43c55387a00 Mon Sep 17 00:00:00 2001
+From: Martin Jansa <Martin.Jansa@gmail.com>
+Date: Wed, 19 Sep 2012 17:31:45 +0200
+Subject: [PATCH 7/7] merge newpkg->provides even when oldpkg->provides
+ existed
+
+* introduced in http://code.google.com/p/opkg/source/diff?spec=svn277&r=277&format=side&path=/trunk/libopkg/pkg.c
+* the problem happens when oldpkg provide 1 and newpkg provide 2
+ provides_count is merged to 2, but oldpkg->provides has only 1 entry
+ causing SIGSEGV:
+ pkg_formatted_field (fp=fp@entry=0x1444ce0, pkg=pkg@entry=0x120c620, field=<optimized out>, field@entry=0x7ffff7bd2abe "Provides") at pkg.c:739
+ 739 fprintf(fp, "%s %s", i == 1 ? "" : ",",
+ (gdb) bt
+ #0 pkg_formatted_field (fp=fp@entry=0x1444ce0, pkg=pkg@entry=0x120c620, field=<optimized out>, field@entry=0x7ffff7bd2abe "Provides") at pkg.c:739
+ #1 0x00007ffff7bc32fc in pkg_print_status (pkg=0x120c620, file=0x1444ce0) at pkg.c:887
+ #2 0x00007ffff7bbff59 in opkg_conf_write_status_files () at opkg_conf.c:400
+ #3 0x00007ffff7bbad8a in write_status_files_if_changed () at opkg_cmd.c:65
+ #4 0x00007ffff7bbb73e in opkg_upgrade_cmd (argc=<optimized out>, argv=<optimized out>) at opkg_cmd.c:577
+ #5 0x00007ffff7bbbcc2 in opkg_cmd_exec (cmd=cmd@entry=0x7ffff7dda080, argc=argc@entry=1, argv=argv@entry=0x7fffffffe768) at opkg_cmd.c:1319
+ #6 0x000000000040165f in main (argc=3, argv=0x7fffffffe758) at opkg-cl.c:377
+
+Upstream-Status: Submitted
+http://code.google.com/p/opkg/issues/detail?id=93
+
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+---
+ libopkg/pkg.c | 6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
+
+diff --git a/libopkg/pkg.c b/libopkg/pkg.c
+index be486ee..255c673 100644
+--- a/libopkg/pkg.c
++++ b/libopkg/pkg.c
+@@ -377,10 +377,8 @@ pkg_merge(pkg_t *oldpkg, pkg_t *newpkg)
+ oldpkg->provides_count = newpkg->provides_count;
+ newpkg->provides_count = 0;
+
+- if (!oldpkg->provides) {
+- oldpkg->provides = newpkg->provides;
+- newpkg->provides = NULL;
+- }
++ oldpkg->provides = newpkg->provides;
++ newpkg->provides = NULL;
+ }
+
+ if (!oldpkg->conflicts_count) {
+--
+1.7.12
+
diff --git a/meta/recipes-devtools/opkg/opkg_svn.bb b/meta/recipes-devtools/opkg/opkg_svn.bb
index 03ed103..9a03f2e 100644
--- a/meta/recipes-devtools/opkg/opkg_svn.bb
+++ b/meta/recipes-devtools/opkg/opkg_svn.bb
@@ -7,6 +7,7 @@ SRC_URI = "svn://opkg.googlecode.com/svn;module=trunk;protocol=http \
file://0004-Failed-postinst-script-is-not-fatal-with-conf-offlin.patch \
file://0005-Do-not-read-etc-opkg-.conf-if-f-is-specified.patch \
file://0006-detect-circular-dependencies.patch \
+ file://0007-merge-newpkg-provides-even-when-oldpkg-provides-exis.patch \
"
S = "${WORKDIR}/trunk"
@@ -14,4 +15,4 @@ S = "${WORKDIR}/trunk"
SRCREV = "633"
PV = "0.1.8+svnr${SRCPV}"
-PR = "${INC_PR}.2"
+PR = "${INC_PR}.3"
--
1.7.12
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCHv2 1/3] opkg: replace local patches with git patches submitted upstream
[not found] ` <cover.1348076271.git.Martin.Jansa@gmail.com>
2012-09-19 17:40 ` [PATCHv2 " Martin Jansa
@ 2012-09-19 17:41 ` Martin Jansa
1 sibling, 0 replies; 9+ messages in thread
From: Martin Jansa @ 2012-09-19 17:41 UTC (permalink / raw)
To: openembedded-core
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
.../0001-add-opkg_compare_versions-function.patch | 54 ++++++++++++++
| 31 +++++---
...ix-dependency-issues-for-preinst-scripts.patch} | 66 ++++++++++-------
...nst-script-is-not-fatal-with-conf-offlin.patch} | 76 ++++++++++++--------
...ot-read-etc-opkg-.conf-if-f-is-specified.patch} | 12 ++--
...tch => 0006-detect-circular-dependencies.patch} | 82 +++++++++++++---------
meta/recipes-devtools/opkg/opkg/add_vercmp.patch | 36 ----------
meta/recipes-devtools/opkg/opkg_svn.bb | 12 ++--
8 files changed, 224 insertions(+), 145 deletions(-)
create mode 100644 meta/recipes-devtools/opkg/opkg/0001-add-opkg_compare_versions-function.patch
rename meta/recipes-devtools/opkg/opkg/{add_uname_support.patch => 0002-Ensure-we-use-the-uname-gname-fields-when-extracting.patch} (69%)
rename meta/recipes-devtools/opkg/opkg/{fix_installorder.patch => 0003-Fix-dependency-issues-for-preinst-scripts.patch} (81%)
rename meta/recipes-devtools/opkg/opkg/{offline_postinstall.patch => 0004-Failed-postinst-script-is-not-fatal-with-conf-offlin.patch} (50%)
rename meta/recipes-devtools/opkg/opkg/{conf_override.patch => 0005-Do-not-read-etc-opkg-.conf-if-f-is-specified.patch} (88%)
rename meta/recipes-devtools/opkg/opkg/{track_parents.patch => 0006-detect-circular-dependencies.patch} (58%)
delete mode 100644 meta/recipes-devtools/opkg/opkg/add_vercmp.patch
diff --git a/meta/recipes-devtools/opkg/opkg/0001-add-opkg_compare_versions-function.patch b/meta/recipes-devtools/opkg/opkg/0001-add-opkg_compare_versions-function.patch
new file mode 100644
index 0000000..5dc76d4
--- /dev/null
+++ b/meta/recipes-devtools/opkg/opkg/0001-add-opkg_compare_versions-function.patch
@@ -0,0 +1,54 @@
+From 029cf99fd44645b5fe1b6491355c631da3096e09 Mon Sep 17 00:00:00 2001
+From: Martin Jansa <Martin.Jansa@gmail.com>
+Date: Sat, 17 Dec 2011 12:51:07 +0100
+Subject: [PATCH 1/7] add opkg_compare_versions function
+
+* not used in opkg but can be usefull, e.g. instead of
+ opkg-utils/opkg-compare-versions.c
+
+Upstream-Status: Submitted
+http://code.google.com/p/opkg/issues/detail?id=93
+
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+---
+ libopkg/opkg.c | 15 +++++++++++++++
+ libopkg/opkg.h | 2 ++
+ 2 files changed, 17 insertions(+)
+
+diff --git a/libopkg/opkg.c b/libopkg/opkg.c
+index 92f61f4..eaea529 100644
+--- a/libopkg/opkg.c
++++ b/libopkg/opkg.c
+@@ -870,3 +870,18 @@ opkg_repository_accessibility_check(void)
+
+ return ret;
+ }
++
++int
++opkg_compare_versions (const char *ver1, const char *ver2)
++{
++ pkg_t *pkg1, *pkg2;
++
++ pkg1 = pkg_new();
++ pkg2 = pkg_new();
++
++ parse_version(pkg1, ver1);
++ parse_version(pkg2, ver2);
++
++ return pkg_compare_versions(pkg1, pkg2);
++}
++
+diff --git a/libopkg/opkg.h b/libopkg/opkg.h
+index 4fbd404..7aa86eb 100644
+--- a/libopkg/opkg.h
++++ b/libopkg/opkg.h
+@@ -58,4 +58,6 @@ pkg_t* opkg_find_package (const char *name, const char *version, const char *arc
+
+ int opkg_repository_accessibility_check(void);
+
++int opkg_compare_versions (const char *ver1, const char *ver2);
++
+ #endif /* OPKG_H */
+--
+1.7.12
+
diff --git a/meta/recipes-devtools/opkg/opkg/add_uname_support.patch b/meta/recipes-devtools/opkg/opkg/0002-Ensure-we-use-the-uname-gname-fields-when-extracting.patch
similarity index 69%
rename from meta/recipes-devtools/opkg/opkg/add_uname_support.patch
rename to meta/recipes-devtools/opkg/opkg/0002-Ensure-we-use-the-uname-gname-fields-when-extracting.patch
index 0f627f1..f51cf58 100644
--- a/meta/recipes-devtools/opkg/opkg/add_uname_support.patch
+++ b/meta/recipes-devtools/opkg/opkg/0002-Ensure-we-use-the-uname-gname-fields-when-extracting.patch
@@ -1,17 +1,27 @@
+From 254780ab3b0db398447150251332916598d3b9f4 Mon Sep 17 00:00:00 2001
+From: Richard Purdie <richard.purdie@linuxfoundation.org>
+Date: Fri, 11 Nov 2011 17:17:01 +0000
+Subject: [PATCH 2/7] Ensure we use the uname/gname fields when extracting
+ tarballs
-When updating packages on the target device we ideally want to match
+When updating packages on the target device we ideally want to match
user and group numbers from the existing file system. This patch encourages
opkg to lookup the uname/gname fields first and only use the hardcoded
numerical values if that fails.
-Upstream-Status: Pending
+Upstream-Status: Submitted
+http://code.google.com/p/opkg/issues/detail?id=93
-RP 11/11/11
+Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+---
+ libbb/unarchive.c | 49 +++++++++++++++++++++++++++++++++++++++++++++++--
+ 1 file changed, 47 insertions(+), 2 deletions(-)
-Index: trunk/libbb/unarchive.c
-===================================================================
---- trunk.orig/libbb/unarchive.c 2011-11-11 15:52:59.761674091 +0000
-+++ trunk/libbb/unarchive.c 2011-11-11 17:04:56.501574419 +0000
+diff --git a/libbb/unarchive.c b/libbb/unarchive.c
+index 5d4464f..d583767 100644
+--- a/libbb/unarchive.c
++++ b/libbb/unarchive.c
@@ -22,10 +22,13 @@
#include <stdio.h>
#include <errno.h>
@@ -26,7 +36,7 @@ Index: trunk/libbb/unarchive.c
#include "libbb.h"
-@@ -436,6 +439,42 @@
+@@ -436,6 +439,42 @@ free_header_ar(file_header_t *ar_entry)
free(ar_entry);
}
@@ -69,7 +79,7 @@ Index: trunk/libbb/unarchive.c
static file_header_t *
get_header_tar(FILE *tar_stream)
-@@ -515,8 +554,14 @@
+@@ -515,8 +554,14 @@ get_header_tar(FILE *tar_stream)
*/
tar_entry->mode = 07777 & strtol(tar.formated.mode, NULL, 8);
@@ -86,3 +96,6 @@ Index: trunk/libbb/unarchive.c
tar_entry->size = strtol(tar.formated.size, NULL, 8);
tar_entry->mtime = strtol(tar.formated.mtime, NULL, 8);
+--
+1.7.12
+
diff --git a/meta/recipes-devtools/opkg/opkg/fix_installorder.patch b/meta/recipes-devtools/opkg/opkg/0003-Fix-dependency-issues-for-preinst-scripts.patch
similarity index 81%
rename from meta/recipes-devtools/opkg/opkg/fix_installorder.patch
rename to meta/recipes-devtools/opkg/opkg/0003-Fix-dependency-issues-for-preinst-scripts.patch
index 6a7e6db..195598f 100644
--- a/meta/recipes-devtools/opkg/opkg/fix_installorder.patch
+++ b/meta/recipes-devtools/opkg/opkg/0003-Fix-dependency-issues-for-preinst-scripts.patch
@@ -1,16 +1,21 @@
-There is a problem with dependency order when installing packages. The key
-problem revolves around the satisfy_dependencies_for() function which is
+From 6a294b6dad681b0e95aa061bc368d801d2ddc781 Mon Sep 17 00:00:00 2001
+From: Richard Purdie <richard.purdie@linuxfoundation.org>
+Date: Thu, 15 Dec 2011 21:08:49 +0000
+Subject: [PATCH 3/7] Fix dependency issues for preinst scripts
+
+There is a problem with dependency order when installing packages. The key
+problem revolves around the satisfy_dependencies_for() function which is
called from opkg_install_pkg just before the installation (and preinst)
happens.
The satisfy_dependencies_for() function calls pkg_hash_fetch_unsatisfied_dependencies()
-which will only return packages which were previously not marked as
-*going* to be installed at some point. For the purposes of
-opkg_install_pkg() we really need to know which dependencies haven't been
+which will only return packages which were previously not marked as
+*going* to be installed at some point. For the purposes of
+opkg_install_pkg() we really need to know which dependencies haven't been
installed yet.
-This patch adds pkg_hash_fetch_satisfied_dependencies() which returns a
-list of package dependencies. We can then directly check the status of
+This patch adds pkg_hash_fetch_satisfied_dependencies() which returns a
+list of package dependencies. We can then directly check the status of
these and ensure any hard dependencies (not suggestions or recommendations)
are installed before returning.
@@ -21,9 +26,9 @@ A -> B,E
E -> B
B -> C
-Currently X would install A and E. When installing A the packages B, E
+Currently X would install A and E. When installing A the packages B, E
and C would be marked as "to install". When the package B is considered
-the second time (as a dependency of E rather than A), it would install
+the second time (as a dependency of E rather than A), it would install
straight away even though C was not currently installed, just marked
as needing to be installed.
@@ -31,15 +36,21 @@ The patch changes the behaviour so B can't install until C really is installed.
This change is required to run the postinst scripts in the correct order.
-Upstream-Status: Pending
+Upstream-Status: Submitted
+http://code.google.com/p/opkg/issues/detail?id=93
-RP 2011/12/15
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+---
+ libopkg/opkg_install.c | 21 +++++++++++++
+ libopkg/pkg_depends.c | 82 ++++++++++++++++++++++++++++++++++++++++++++++++++
+ libopkg/pkg_depends.h | 1 +
+ 3 files changed, 104 insertions(+)
-Index: trunk/libopkg/opkg_install.c
-===================================================================
---- trunk.orig/libopkg/opkg_install.c 2011-12-15 15:58:39.000000000 +0000
-+++ trunk/libopkg/opkg_install.c 2011-12-15 15:58:41.838334788 +0000
-@@ -76,6 +77,27 @@
+diff --git a/libopkg/opkg_install.c b/libopkg/opkg_install.c
+index 3925f58..1632066 100644
+--- a/libopkg/opkg_install.c
++++ b/libopkg/opkg_install.c
+@@ -76,6 +76,27 @@ satisfy_dependencies_for(pkg_t *pkg)
}
if (ndepends <= 0) {
@@ -67,11 +78,11 @@ Index: trunk/libopkg/opkg_install.c
pkg_vec_free(depends);
return 0;
}
-Index: trunk/libopkg/pkg_depends.c
-===================================================================
---- trunk.orig/libopkg/pkg_depends.c 2010-12-22 16:04:43.000000000 +0000
-+++ trunk/libopkg/pkg_depends.c 2011-12-15 15:58:41.838334788 +0000
-@@ -259,6 +259,88 @@
+diff --git a/libopkg/pkg_depends.c b/libopkg/pkg_depends.c
+index 1e14d1f..36c76aa 100644
+--- a/libopkg/pkg_depends.c
++++ b/libopkg/pkg_depends.c
+@@ -259,6 +259,88 @@ pkg_hash_fetch_unsatisfied_dependencies(pkg_t * pkg, pkg_vec_t *unsatisfied,
return unsatisfied->len;
}
@@ -160,11 +171,11 @@ Index: trunk/libopkg/pkg_depends.c
/*checking for conflicts !in replaces
If a packages conflicts with another but is also replacing it, I should not consider it a
really conflicts
-Index: trunk/libopkg/pkg_depends.h
-===================================================================
---- trunk.orig/libopkg/pkg_depends.h 2010-12-22 16:04:43.000000000 +0000
-+++ trunk/libopkg/pkg_depends.h 2011-12-15 15:58:41.838334788 +0000
-@@ -82,6 +82,7 @@
+diff --git a/libopkg/pkg_depends.h b/libopkg/pkg_depends.h
+index 5d1f074..b8072e2 100644
+--- a/libopkg/pkg_depends.h
++++ b/libopkg/pkg_depends.h
+@@ -82,6 +82,7 @@ char *pkg_depend_str(pkg_t *pkg, int index);
void buildDependedUponBy(pkg_t * pkg, abstract_pkg_t * ab_pkg);
int version_constraints_satisfied(depend_t * depends, pkg_t * pkg);
int pkg_hash_fetch_unsatisfied_dependencies(pkg_t * pkg, pkg_vec_t *depends, char *** unresolved);
@@ -172,3 +183,6 @@ Index: trunk/libopkg/pkg_depends.h
pkg_vec_t * pkg_hash_fetch_conflicts(pkg_t * pkg);
int pkg_dependence_satisfiable(depend_t *depend);
int pkg_dependence_satisfied(depend_t *depend);
+--
+1.7.12
+
diff --git a/meta/recipes-devtools/opkg/opkg/offline_postinstall.patch b/meta/recipes-devtools/opkg/opkg/0004-Failed-postinst-script-is-not-fatal-with-conf-offlin.patch
similarity index 50%
rename from meta/recipes-devtools/opkg/opkg/offline_postinstall.patch
rename to meta/recipes-devtools/opkg/opkg/0004-Failed-postinst-script-is-not-fatal-with-conf-offlin.patch
index b197f6b..900c150 100644
--- a/meta/recipes-devtools/opkg/opkg/offline_postinstall.patch
+++ b/meta/recipes-devtools/opkg/opkg/0004-Failed-postinst-script-is-not-fatal-with-conf-offlin.patch
@@ -1,35 +1,30 @@
-When we have an offline root and have specified force-postinstall,
+From 1f709b4540e12cf7e08592aae0ad7e3e35322cab Mon Sep 17 00:00:00 2001
+From: Richard Purdie <richard.purdie@linuxfoundation.org>
+Date: Thu, 15 Dec 2011 21:08:49 +0000
+Subject: [PATCH 4/7] Failed postinst script is not fatal with
+ conf->offline_root
+
+When we have an offline root and have specified force-postinstall,
attempt to run the postinstall but if it fails, just leave it in the
-status file as neeing to run. We can issue a NOTICE this is happened
+status file as needing to run. We can issue a NOTICE this is happened
but supress errors. This means the OE class doesn't have to do any
further post processing of the postinstalls itself.
-Upstream-Status: Pending
-
-RP 2011/12/15
+Upstream-Status: Submitted
+http://code.google.com/p/opkg/issues/detail?id=93
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+---
+ libopkg/opkg_cmd.c | 3 ++-
+ libopkg/opkg_configure.c | 5 ++++-
+ libopkg/pkg.c | 5 +++--
+ 3 files changed, 9 insertions(+), 4 deletions(-)
-Index: trunk/libopkg/pkg.c
-===================================================================
---- trunk.orig/libopkg/pkg.c 2011-12-15 15:58:39.000000000 +0000
-+++ trunk/libopkg/pkg.c 2011-12-15 20:04:50.109992736 +0000
-@@ -1297,8 +1297,9 @@
- free(cmd);
-
- if (err) {
-- opkg_msg(ERROR, "package \"%s\" %s script returned status %d.\n",
-- pkg->name, script, err);
-+ if (!conf->offline_root)
-+ opkg_msg(ERROR, "package \"%s\" %s script returned status %d.\n",
-+ pkg->name, script, err);
- return err;
- }
-
-Index: trunk/libopkg/opkg_cmd.c
-===================================================================
---- trunk.orig/libopkg/opkg_cmd.c 2011-12-15 19:49:25.826014150 +0000
-+++ trunk/libopkg/opkg_cmd.c 2011-12-15 19:50:52.346012148 +0000
-@@ -453,7 +453,8 @@
+diff --git a/libopkg/opkg_cmd.c b/libopkg/opkg_cmd.c
+index 11e7867..36ff8eb 100644
+--- a/libopkg/opkg_cmd.c
++++ b/libopkg/opkg_cmd.c
+@@ -453,7 +453,8 @@ opkg_configure_packages(char *pkg_name)
pkg->state_flag &= ~SF_PREFER;
opkg_state_changed++;
} else {
@@ -39,11 +34,11 @@ Index: trunk/libopkg/opkg_cmd.c
}
}
}
-Index: trunk/libopkg/opkg_configure.c
-===================================================================
---- trunk.orig/libopkg/opkg_configure.c 2011-12-15 19:50:11.586013081 +0000
-+++ trunk/libopkg/opkg_configure.c 2011-12-15 19:52:15.082010347 +0000
-@@ -35,7 +35,10 @@
+diff --git a/libopkg/opkg_configure.c b/libopkg/opkg_configure.c
+index 719da5a..169828d 100644
+--- a/libopkg/opkg_configure.c
++++ b/libopkg/opkg_configure.c
+@@ -35,7 +35,10 @@ opkg_configure(pkg_t *pkg)
err = pkg_run_script(pkg, "postinst", "configure");
if (err) {
@@ -55,3 +50,22 @@ Index: trunk/libopkg/opkg_configure.c
return err;
}
+diff --git a/libopkg/pkg.c b/libopkg/pkg.c
+index d8c3984..6ccbde2 100644
+--- a/libopkg/pkg.c
++++ b/libopkg/pkg.c
+@@ -1297,8 +1297,9 @@ pkg_run_script(pkg_t *pkg, const char *script, const char *args)
+ free(cmd);
+
+ if (err) {
+- opkg_msg(ERROR, "package \"%s\" %s script returned status %d.\n",
+- pkg->name, script, err);
++ if (!conf->offline_root)
++ opkg_msg(ERROR, "package \"%s\" %s script returned status %d.\n",
++ pkg->name, script, err);
+ return err;
+ }
+
+--
+1.7.12
+
diff --git a/meta/recipes-devtools/opkg/opkg/conf_override.patch b/meta/recipes-devtools/opkg/opkg/0005-Do-not-read-etc-opkg-.conf-if-f-is-specified.patch
similarity index 88%
rename from meta/recipes-devtools/opkg/opkg/conf_override.patch
rename to meta/recipes-devtools/opkg/opkg/0005-Do-not-read-etc-opkg-.conf-if-f-is-specified.patch
index b1698d8..3313bf7 100644
--- a/meta/recipes-devtools/opkg/opkg/conf_override.patch
+++ b/meta/recipes-devtools/opkg/opkg/0005-Do-not-read-etc-opkg-.conf-if-f-is-specified.patch
@@ -1,17 +1,19 @@
-From 45d0468f7f9e9be633b2819aa43ab9b6287b8e6a Mon Sep 17 00:00:00 2001
+From 541b6b7bd80dc321493e42955d93b277af0c9221 Mon Sep 17 00:00:00 2001
From: Paul Eggleton <paul.eggleton@linux.intel.com>
Date: Mon, 9 Jul 2012 11:01:15 +0100
-Subject: [PATCH] Do not read /etc/opkg/*.conf if -f is specified
+Subject: [PATCH 5/7] Do not read /etc/opkg/*.conf if -f is specified
If a configuration file is specified on the command line, we should
assume it contains all of the configuration and not try to read the
configuration in /etc/opkg.
-Upstream-Status: Pending
+Upstream-Status: Submitted
+http://code.google.com/p/opkg/issues/detail?id=93
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
- libopkg/opkg_conf.c | 55 ++++++++++++++++++++++++++-------------------------
+ libopkg/opkg_conf.c | 55 +++++++++++++++++++++++++++--------------------------
1 file changed, 28 insertions(+), 27 deletions(-)
diff --git a/libopkg/opkg_conf.c b/libopkg/opkg_conf.c
@@ -87,5 +89,5 @@ index 4711ce7..1e65bad 100644
if (conf->offline_root)
sprintf_alloc (&lock_file, "%s/%s", conf->offline_root, OPKGLOCKFILE);
--
-1.7.9.5
+1.7.12
diff --git a/meta/recipes-devtools/opkg/opkg/track_parents.patch b/meta/recipes-devtools/opkg/opkg/0006-detect-circular-dependencies.patch
similarity index 58%
rename from meta/recipes-devtools/opkg/opkg/track_parents.patch
rename to meta/recipes-devtools/opkg/opkg/0006-detect-circular-dependencies.patch
index ef327e3..5cf8618 100644
--- a/meta/recipes-devtools/opkg/opkg/track_parents.patch
+++ b/meta/recipes-devtools/opkg/opkg/0006-detect-circular-dependencies.patch
@@ -1,15 +1,30 @@
-Add logic to detect circular dependencies. If we see any dependency from any
-given parent twice, ignore it the second time and print a notice message
+From f434078a342435ae8a666b599d989c30d4c6a7f5 Mon Sep 17 00:00:00 2001
+From: Richard Purdie <richard.purdie@linuxfoundation.org>
+Date: Sun, 18 Dec 2011 23:54:30 +0000
+Subject: [PATCH 6/7] detect circular dependencies
+
+Add logic to detect circular dependencies. If we see any dependency from
+any given parent twice, ignore it the second time and print a notice message
that we did so.
-Upstream-Status: Pending
-RP 2011/12/18
+Upstream-Status: Submitted
+http://code.google.com/p/opkg/issues/detail?id=93
+
+Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+---
+ libopkg/opkg_install.c | 8 ++++++++
+ libopkg/pkg.c | 2 ++
+ libopkg/pkg.h | 1 +
+ libopkg/pkg_depends.c | 3 +--
+ libopkg/pkg_depends.h | 1 +
+ 5 files changed, 13 insertions(+), 2 deletions(-)
-Index: trunk/libopkg/opkg_install.c
-===================================================================
---- trunk.orig/libopkg/opkg_install.c 2011-12-18 11:15:17.320725365 +0000
-+++ trunk/libopkg/opkg_install.c 2011-12-18 12:38:54.980609225 +0000
-@@ -84,8 +84,14 @@
+diff --git a/libopkg/opkg_install.c b/libopkg/opkg_install.c
+index 1632066..0216914 100644
+--- a/libopkg/opkg_install.c
++++ b/libopkg/opkg_install.c
+@@ -84,8 +84,14 @@ satisfy_dependencies_for(pkg_t *pkg)
/* The package was uninstalled when we started, but another
dep earlier in this loop may have depended on it and pulled
it in, so check first. */
@@ -24,7 +39,7 @@ Index: trunk/libopkg/opkg_install.c
err = opkg_install_pkg(dep, 0);
/* mark this package as having been automatically installed to
* satisfy a dependency */
-@@ -115,6 +121,8 @@
+@@ -115,6 +121,8 @@ satisfy_dependencies_for(pkg_t *pkg)
/* The package was uninstalled when we started, but another
dep earlier in this loop may have depended on it and pulled
it in, so check first. */
@@ -33,11 +48,11 @@ Index: trunk/libopkg/opkg_install.c
if ((dep->state_status != SS_INSTALLED)
&& (dep->state_status != SS_UNPACKED)) {
opkg_msg(DEBUG2,"Calling opkg_install_pkg.\n");
-Index: trunk/libopkg/pkg.c
-===================================================================
---- trunk.orig/libopkg/pkg.c 2011-12-18 11:12:39.976729002 +0000
-+++ trunk/libopkg/pkg.c 2011-12-18 11:22:34.528715535 +0000
-@@ -86,6 +86,7 @@
+diff --git a/libopkg/pkg.c b/libopkg/pkg.c
+index 6ccbde2..be486ee 100644
+--- a/libopkg/pkg.c
++++ b/libopkg/pkg.c
+@@ -86,6 +86,7 @@ pkg_init(pkg_t *pkg)
pkg->section = NULL;
pkg->description = NULL;
pkg->state_want = SW_UNKNOWN;
@@ -45,7 +60,7 @@ Index: trunk/libopkg/pkg.c
pkg->state_flag = SF_OK;
pkg->state_status = SS_NOT_INSTALLED;
pkg->depends_str = NULL;
-@@ -191,6 +192,7 @@
+@@ -191,6 +192,7 @@ pkg_deinit(pkg_t *pkg)
pkg->description = NULL;
pkg->state_want = SW_UNKNOWN;
@@ -53,11 +68,11 @@ Index: trunk/libopkg/pkg.c
pkg->state_flag = SF_OK;
pkg->state_status = SS_NOT_INSTALLED;
-Index: trunk/libopkg/pkg.h
-===================================================================
---- trunk.orig/libopkg/pkg.h 2011-12-18 11:12:37.120728742 +0000
-+++ trunk/libopkg/pkg.h 2011-12-18 11:15:39.080725150 +0000
-@@ -129,6 +129,7 @@
+diff --git a/libopkg/pkg.h b/libopkg/pkg.h
+index 775b656..5d468cb 100644
+--- a/libopkg/pkg.h
++++ b/libopkg/pkg.h
+@@ -129,6 +129,7 @@ struct pkg
char *description;
char *tags;
pkg_state_want_t state_want;
@@ -65,11 +80,11 @@ Index: trunk/libopkg/pkg.h
pkg_state_flag_t state_flag;
pkg_state_status_t state_status;
char **depends_str;
-Index: trunk/libopkg/pkg_depends.c
-===================================================================
---- trunk.orig/libopkg/pkg_depends.c 2011-12-18 11:14:24.464726569 +0000
-+++ trunk/libopkg/pkg_depends.c 2011-12-18 11:30:32.516704127 +0000
-@@ -30,7 +30,6 @@
+diff --git a/libopkg/pkg_depends.c b/libopkg/pkg_depends.c
+index 36c76aa..a72eed7 100644
+--- a/libopkg/pkg_depends.c
++++ b/libopkg/pkg_depends.c
+@@ -30,7 +30,6 @@ static int parseDepends(compound_depend_t *compound_depend, char * depend_str);
static depend_t * depend_init(void);
static char ** add_unresolved_dep(pkg_t * pkg, char ** the_lost, int ref_ndx);
static char ** merge_unresolved(char ** oldstuff, char ** newstuff);
@@ -77,7 +92,7 @@ Index: trunk/libopkg/pkg_depends.c
static int pkg_installed_and_constraint_satisfied(pkg_t *pkg, void *cdata)
{
-@@ -531,7 +530,7 @@
+@@ -531,7 +530,7 @@ int pkg_dependence_satisfied(depend_t *depend)
return 0;
}
@@ -86,14 +101,17 @@ Index: trunk/libopkg/pkg_depends.c
{
int i;
pkg_t ** pkgs = vec->pkgs;
-Index: trunk/libopkg/pkg_depends.h
-===================================================================
---- trunk.orig/libopkg/pkg_depends.h 2011-12-18 11:28:51.960706484 +0000
-+++ trunk/libopkg/pkg_depends.h 2011-12-18 11:29:19.400705862 +0000
-@@ -87,5 +87,6 @@
+diff --git a/libopkg/pkg_depends.h b/libopkg/pkg_depends.h
+index b8072e2..ca0801f 100644
+--- a/libopkg/pkg_depends.h
++++ b/libopkg/pkg_depends.h
+@@ -87,5 +87,6 @@ pkg_vec_t * pkg_hash_fetch_conflicts(pkg_t * pkg);
int pkg_dependence_satisfiable(depend_t *depend);
int pkg_dependence_satisfied(depend_t *depend);
const char* constraint_to_str(enum version_constraint c);
+int is_pkg_in_pkg_vec(pkg_vec_t * vec, pkg_t * pkg);
#endif
+--
+1.7.12
+
diff --git a/meta/recipes-devtools/opkg/opkg/add_vercmp.patch b/meta/recipes-devtools/opkg/opkg/add_vercmp.patch
deleted file mode 100644
index 1203c54..0000000
--- a/meta/recipes-devtools/opkg/opkg/add_vercmp.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-Upstream-Status: Inappropriate [function not used]
-
-Index: trunk/libopkg/opkg.c
-===================================================================
---- trunk.orig/libopkg/opkg.c 2010-01-26 20:32:19.000000000 +0000
-+++ trunk/libopkg/opkg.c 2010-01-26 20:40:34.000000000 +0000
-@@ -876,3 +876,18 @@
-
- return ret;
- }
-+
-+int
-+opkg_compare_versions (const char *ver1, const char *ver2)
-+{
-+ pkg_t *pkg1, *pkg2;
-+
-+ pkg1 = pkg_new();
-+ pkg2 = pkg_new();
-+
-+ parse_version(pkg1, ver1);
-+ parse_version(pkg2, ver2);
-+
-+ return pkg_compare_versions(pkg1, pkg2);
-+}
-+
-Index: trunk/libopkg/opkg.h
-===================================================================
---- trunk.orig/libopkg/opkg.h 2010-01-26 20:32:19.000000000 +0000
-+++ trunk/libopkg/opkg.h 2010-01-26 20:35:19.000000000 +0000
-@@ -58,4 +58,6 @@
-
- int opkg_repository_accessibility_check(void);
-
-+int opkg_compare_versions (const char *ver1, const char *ver2);
-+
- #endif /* OPKG_H */
diff --git a/meta/recipes-devtools/opkg/opkg_svn.bb b/meta/recipes-devtools/opkg/opkg_svn.bb
index 4146b7e..03ed103 100644
--- a/meta/recipes-devtools/opkg/opkg_svn.bb
+++ b/meta/recipes-devtools/opkg/opkg_svn.bb
@@ -1,12 +1,12 @@
require opkg.inc
SRC_URI = "svn://opkg.googlecode.com/svn;module=trunk;protocol=http \
- file://add_vercmp.patch \
- file://add_uname_support.patch \
- file://fix_installorder.patch \
- file://offline_postinstall.patch\
- file://track_parents.patch \
- file://conf_override.patch \
+ file://0001-add-opkg_compare_versions-function.patch \
+ file://0002-Ensure-we-use-the-uname-gname-fields-when-extracting.patch \
+ file://0003-Fix-dependency-issues-for-preinst-scripts.patch \
+ file://0004-Failed-postinst-script-is-not-fatal-with-conf-offlin.patch \
+ file://0005-Do-not-read-etc-opkg-.conf-if-f-is-specified.patch \
+ file://0006-detect-circular-dependencies.patch \
"
S = "${WORKDIR}/trunk"
--
1.7.12
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 0/3] Opkg patch upstreaming and SIGSEGV fix
2012-09-19 17:16 [PATCH 0/3] Opkg patch upstreaming and SIGSEGV fix Martin Jansa
` (3 preceding siblings ...)
2012-09-19 17:29 ` [PATCH 0/3] Opkg patch upstreaming and SIGSEGV fix Saul Wold
@ 2012-09-21 22:25 ` Saul Wold
4 siblings, 0 replies; 9+ messages in thread
From: Saul Wold @ 2012-09-21 22:25 UTC (permalink / raw)
To: Martin Jansa; +Cc: openembedded-core
On 09/19/2012 10:16 AM, Martin Jansa wrote:
> This depends on
> http://patchwork.openembedded.org/patch/36893/
> otherwise warning about missing SRC_URI entries will be shown
>
> The following changes since commit f06097f4581e4c728c2950a86e025384e4bdcdf0:
>
> eglibc: Do not use fsqrt in libm when building for fsl ppc with fpu (2012-09-18 07:44:13 -0700)
>
> are available in the git repository at:
>
> git://git.openembedded.org/openembedded-core-contrib jansa/opkg
> http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=jansa/opkg
>
> Martin Jansa (3):
> opkg: replace local patches with git patches submitted upstream
> opkg: add patch to fix SIGSEGV when printing status file
> opkg-nogpg: drop SRCREV
>
> meta/recipes-devtools/opkg/opkg-nogpg_svn.bb | 2 -
> .../0001-add-opkg_compare_versions-function.patch | 51 ++++++++++++++
> ...e-the-uname-gname-fields-when-extracting.patch} | 30 +++++---
> ...ix-dependency-issues-for-preinst-scripts.patch} | 65 ++++++++++--------
> ...nst-script-is-not-fatal-with-conf-offlin.patch} | 75 +++++++++++---------
> ...ot-read-etc-opkg-.conf-if-f-is-specified.patch} | 11 ++-
> ...tch => 0006-detect-circular-dependencies.patch} | 79 +++++++++++++---------
> ...g-provides-even-when-oldpkg-provides-exis.patch | 46 +++++++++++++
> meta/recipes-devtools/opkg/opkg/add_vercmp.patch | 36 ----------
> meta/recipes-devtools/opkg/opkg_svn.bb | 15 ++--
> 10 files changed, 258 insertions(+), 152 deletions(-)
> create mode 100644 meta/recipes-devtools/opkg/opkg/0001-add-opkg_compare_versions-function.patch
> rename meta/recipes-devtools/opkg/opkg/{add_uname_support.patch => 0002-Ensure-we-use-the-uname-gname-fields-when-extracting.patch} (71%)
> rename meta/recipes-devtools/opkg/opkg/{fix_installorder.patch => 0003-Fix-dependency-issues-for-preinst-scripts.patch} (82%)
> rename meta/recipes-devtools/opkg/opkg/{offline_postinstall.patch => 0004-Failed-postinst-script-is-not-fatal-with-conf-offlin.patch} (52%)
> rename meta/recipes-devtools/opkg/opkg/{conf_override.patch => 0005-Do-not-read-etc-opkg-.conf-if-f-is-specified.patch} (91%)
> rename meta/recipes-devtools/opkg/opkg/{track_parents.patch => 0006-detect-circular-dependencies.patch} (59%)
> create mode 100644 meta/recipes-devtools/opkg/opkg/0007-merge-newpkg-provides-even-when-oldpkg-provides-exis.patch
> delete mode 100644 meta/recipes-devtools/opkg/opkg/add_vercmp.patch
>
Merged into OE-Core with v2 of 2/3
Thanks
Sau!
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2012-09-21 22:38 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-19 17:16 [PATCH 0/3] Opkg patch upstreaming and SIGSEGV fix Martin Jansa
2012-09-19 17:16 ` [PATCH 1/3] opkg: replace local patches with git patches submitted upstream Martin Jansa
2012-09-19 17:16 ` [PATCH 2/3] opkg: add patch to fix SIGSEGV when printing status file Martin Jansa
[not found] ` <cover.1348076271.git.Martin.Jansa@gmail.com>
2012-09-19 17:40 ` [PATCHv2 " Martin Jansa
2012-09-19 17:41 ` [PATCHv2 1/3] opkg: replace local patches with git patches submitted upstream Martin Jansa
2012-09-19 17:16 ` [PATCH 3/3] opkg-nogpg: drop SRCREV Martin Jansa
2012-09-19 17:29 ` [PATCH 0/3] Opkg patch upstreaming and SIGSEGV fix Saul Wold
2012-09-19 17:33 ` Martin Jansa
2012-09-21 22:25 ` Saul Wold
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox