Alejandro del Castillo | 23 May 18:14 2016

[PATCH 0/3] miscelaneous test fixes

First patch correctly flags internal solver failures. Second and third
patches fix tests that are incorrectly using untargeted upgrades with 
the --autoremove flag, instead of targeted upgrades.

Alejandro del Castillo (3):
  tests: mark internal solver test failures
  test/regress: make issue32.py use targeted upgrade
  test/core: make upgrade targeted on core/18_upgrade_recommends.py

 tests/core/11_virtual_conflicts_second.py | 2 +-
 tests/core/18_upgrade_recommends.py       | 4 ++--
 tests/regress/issue163.py                 | 2 +-
 tests/regress/issue165.py                 | 2 +-
 tests/regress/issue165a.py                | 2 +-
 tests/regress/issue165b.py                | 2 +-
 tests/regress/issue32.py                  | 6 +++---
 tests/regress/issue85.py                  | 2 +-
 tests/regress/issue8912.py                | 2 +-
 9 files changed, 12 insertions(+), 12 deletions(-)

--

-- 
1.9.1

Alejandro del Castillo | 17 May 00:36 2016

[PATCH 0/2] Fix issue #9557

Currently, it's assumed that the opkg index file (Packages) will always be
created using opkg-make-index. To accomodate other tools, fixed tolerance
for CRLF end of line, as well as support for UTF-8 files with BOM's.  

Alejandro del Castillo (2):
  parse_version: trim trailing carriage return
  pkg_hash_add_from_file: add UTF-8 file support

 libopkg/pkg_hash.c  | 4 ++++
 libopkg/pkg_parse.c | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

--

-- 
1.9.1

Alejandro del Castillo | 12 May 21:24 2016

[PATCH 0/2] Add targeted install support

Targeted installs enable users to install a specific version of a package,
 when many versions are available.

Alejandro del Castillo (2):
  libopkg: move pkg_constraint_satisified to pkg_depends.*
  libopkg: add support for selecting the pkg version to install

 libopkg/opkg_download.c                          | 49 +++++++++++++++++++-----
 libopkg/opkg_utils.c                             | 23 +++++++++++
 libopkg/opkg_utils.h                             |  1 +
 libopkg/pkg_depends.c                            |  6 +++
 libopkg/pkg_depends.h                            |  1 +
 libopkg/solvers/internal/opkg_install_internal.c | 34 ++++++++++++++--
 libopkg/solvers/internal/pkg_depends_internal.c  |  7 +---
 libopkg/solvers/libsolv/opkg_solver_libsolv.c    | 17 +++++++-
 tests/Makefile                                   |  1 +
 tests/core/33_install_exact_version.py           | 41 ++++++++++++++++++++
 10 files changed, 159 insertions(+), 21 deletions(-)
 create mode 100755 tests/core/33_install_exact_version.py

--

-- 
1.9.1

Alejandro del Castillo | 5 May 23:57 2016

[PATCH] opkg_execute_install: set Autoinstalled flag correctly in dep graphs that contain circular dependencies

The pkgs_to_install vector may contain duplicated entries if circular
dependencies are present in the dependency graph. Decide if a package
needs to be set to Autoinstalled or not by comparing against the top
level package, instead of by vector index.

Fixes issue 167

Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@...>
---
 libopkg/solvers/internal/opkg_install_internal.c |  2 +-
 tests/Makefile                                   |  1 +
 tests/regress/issue167.py                        | 37 ++++++++++++++++++++++++
 3 files changed, 39 insertions(+), 1 deletion(-)
 create mode 100755 tests/regress/issue167.py

diff --git a/libopkg/solvers/internal/opkg_install_internal.c b/libopkg/solvers/internal/opkg_install_internal.c
index 1a17429..c18b03d 100644
--- a/libopkg/solvers/internal/opkg_install_internal.c
+++ b/libopkg/solvers/internal/opkg_install_internal.c
 <at>  <at>  -157,7 +157,7  <at>  <at>  int opkg_execute_install(pkg_t *pkg, pkg_vec_t *pkgs_to_install, pkg_vec_t *repl
                  dependency->name, dependency->version, dependency->dest->name);

         /* Set all pkgs to auto_installed except the top level */
-        if (i < (pkgs_to_install->len - 1))
+        if (dependency != pkg)
             dependency->auto_installed = 1;
         r = opkg_install_pkg(dependency, from_upgrade);
         if (r < 0)
diff --git a/tests/Makefile b/tests/Makefile
index cc12298..fff8e41 100644
(Continue reading)

Alejandro del Castillo | 4 May 01:18 2016

[opkg-utils][PATCH] CONTRIBUTING: No longer need to Cc Paul Barker

Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@...>
---
 CONTRIBUTING | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/CONTRIBUTING b/CONTRIBUTING
index c76fb67..8da0fc4 100644
--- a/CONTRIBUTING
+++ b/CONTRIBUTING
 <at>  <at>  -46,12 +46,11  <at>  <at>  changed to fix multiple bugs, that should be multiple patches.

 Opkg-utils is primarily used by the OpenEmbedded build system but may also be
 used by other embedded Linux projects. For now, please submit all patches to
-both the Yocto Project mailing list (yocto@...), the opkg mailing
-list (opkg-devel@...) and Cc the maintainer
-(paul@...), adding a subject prefix of "opkg-utils PATCH" (this
-prefix is necessary as the Yocto Project mailing list receives patches for many
-projects). Also make sure that you use the -M option on the command line or the
-"diff.renames=copy" option in your config.
+both the Yocto Project mailing list (yocto@...) and the opkg mailing
+list (opkg-devel@...), adding a subject prefix of
"opkg-utils PATCH"
+(this prefix is necessary as the Yocto Project mailing list receives patches for
+many projects). Also make sure that you use the -M option on the command line or
+the "diff.renames=copy" option in your config.

 That sounds like a lot to remember but if you run the following commands in your
 opkg-utils directory it will all be done automatically when you use
 <at>  <at>  -59,7 +58,6  <at>  <at>  opkg-utils directory it will all be done automatically when you use

(Continue reading)

Alejandro del Castillo | 4 May 01:04 2016

[PATCH] opkg_install{_multiple}_by_name: reset pkg state on solver error

If a solver operation returns an error, pkg->state_want stays as
SW_INSTALL, which causes opkg_conf_write_status_files to incorrectly
update the status file.

Fixes issue 8601

Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@...>
---
 libopkg/solvers/internal/opkg_install_internal.c |  6 +++-
 tests/Makefile                                   |  1 +
 tests/regress/issue8601.py                       | 44 ++++++++++++++++++++++++
 3 files changed, 50 insertions(+), 1 deletion(-)
 create mode 100755 tests/regress/issue8601.py

diff --git a/libopkg/solvers/internal/opkg_install_internal.c b/libopkg/solvers/internal/opkg_install_internal.c
index 76f765c..1a17429 100644
--- a/libopkg/solvers/internal/opkg_install_internal.c
+++ b/libopkg/solvers/internal/opkg_install_internal.c
 <at>  <at>  -195,7 +195,10  <at>  <at>  int opkg_install_by_name(const char *pkg_name)
     orphans = pkg_vec_alloc();

     r = internal_solver_solv(SOLVER_TRANSACTION_INSTALL, pkg, pkgs_to_install, replacees, orphans);
-    if (r == 0)
+
+    if (r < 0)
+        pkg->state_want = SW_UNKNOWN;
+    else if (r == 0)
         r = opkg_execute_install(pkg, pkgs_to_install, replacees, orphans, 0);

     pkg_vec_free(pkgs_to_install);
(Continue reading)

Alejandro del Castillo | 3 May 01:11 2016

[PATCH] opkg-build: return error if Version is missing

If Version is missing in a control file, opkg-build reports an error to
stdout, but returns 0. Fix condition on pkg_appears_sane to properly
return an error if Version is missing.

Suggested-by: Thomas de Schampheleire <patrickdepinguin@...>
Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@...>
---
 opkg-build | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/opkg-build b/opkg-build
index 82a0a51..ebbf5a3 100755
--- a/opkg-build
+++ b/opkg-build
 <at>  <at>  -86,8 +86,9  <at>  <at>  You probably want to chown these to a system user: " >&2
 	pkg=`required_field Package`
 	[ "$?" -ne 0 ] && PKG_ERROR=1

-	version=`required_field Version | sed 's/Version://; s/^.://g;'`
+	version=`required_field Version`
 	[ "$?" -ne 0 ] && PKG_ERROR=1
+	version=`echo $version | sed 's/Version://; s/^.://g;'`

 	arch=`required_field Architecture`
 	[ "$?" -ne 0 ] && PKG_ERROR=1
--

-- 
1.9.1

Alejandro del Castillo | 28 Apr 01:01 2016

[PATCH] solvers/internal: skip dependencies that have a provider installed

During dependency processing, check if the dependency being processed
has a Provider already installed. If so, skip.

Fixes issue 9059.

Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@...>
---
 libopkg/solvers/internal/opkg_install_internal.c | 10 ++++----
 libopkg/solvers/internal/opkg_solver_internal.c  | 32 ++++++++++++++++++++++++
 libopkg/solvers/internal/pkg_depends_internal.c  |  2 +-
 libopkg/solvers/internal/pkg_depends_internal.h  |  1 +
 4 files changed, 39 insertions(+), 6 deletions(-)

diff --git a/libopkg/solvers/internal/opkg_install_internal.c b/libopkg/solvers/internal/opkg_install_internal.c
index f737e45..76f765c 100644
--- a/libopkg/solvers/internal/opkg_install_internal.c
+++ b/libopkg/solvers/internal/opkg_install_internal.c
 <at>  <at>  -195,12 +195,9  <at>  <at>  int opkg_install_by_name(const char *pkg_name)
     orphans = pkg_vec_alloc();

     r = internal_solver_solv(SOLVER_TRANSACTION_INSTALL, pkg, pkgs_to_install, replacees, orphans);
-    if (r < 0)
-        goto cleanup;
+    if (r == 0)
+        r = opkg_execute_install(pkg, pkgs_to_install, replacees, orphans, 0);

-    r = opkg_execute_install(pkg, pkgs_to_install, replacees, orphans, 0);
-
-cleanup:
     pkg_vec_free(pkgs_to_install);
(Continue reading)

Alejandro del Castillo | 28 Apr 00:59 2016

[PATCH 0/2] Fix for issue 9533

First patch implements fix for bugzilla issue 9533. Second patch improves
the logic used to detect conflicts.

Alejandro del Castillo (2):
  __pkg_hash_fetch_conflicts: prevent installation of pkg that    
    Provides/Conflicts an installed pkg
  __pkg_hash_fetch_conflictees: fix conflict logic

 libopkg/solvers/internal/pkg_depends_internal.c |  3 +-
 tests/Makefile                                  |  1 +
 tests/regress/issue9533.py                      | 37 +++++++++++++++++++++++++
 3 files changed, 39 insertions(+), 2 deletions(-)
 create mode 100755 tests/regress/issue9533.py

--

-- 
1.9.1

Stefan Agner | 21 Apr 00:17 2016
Picon

opkg tries to remove package twice

Hi,

While using the Ångström distribution we see issues when upgrading some
packages. Specifically, libjpeg8 seems to get handled strange: opkg
tries to remove the old package twice! I looked at the package metadata,
it doesn't seem to have anything unusual:

Package: libjpeg8
Version: 8d+1.4.1-r0.6
Depends: libc6 (>= 2.22)
Provides: libjpeg-turbo, jpeg
Replaces: jpeg
Conflicts: jpeg
Section: base
Architecture: armv7at2hf-vfp-neon
Maintainer: Angstrom Developers <angstrom-distro-devel@...>
MD5Sum: a7b348f7dd4a347d0f636ff9ada3a0ed
Size: 195454
Filename: libjpeg8_8d+1.4.1-r0.6_armv7at2hf-vfp-neon.ipk
Description:  libjpeg-turbo version 8d+1.4.1-r0  libjpeg-turbo is a
derivative of
 libjpeg that uses SIMD instructions   (MMX, SSE2, NEON) to accelerate
 baseline JPEG compression and   decompression
OE: libjpeg-turbo
HomePage: http://libjpeg-turbo.org/
License: BSD-3-Clause
Priority: optional

However, when this package gets upgraded, opkg tries to remove the old
package twice, and the second remove fails due to missing rm scripts
(Continue reading)

Stefan Agner | 20 Apr 20:23 2016
Picon

[PATCH] libopkg: fix compare-versions for equal versions

When comparing equal versions, the last descision of last resort
is the force_reinstall field of a package. However, when using
the compare-versions command, this field is not initialized
leading to random results. Initialize the package structs in
opkg_compare_versions_cmd makes sure that any field which might
be used during the version compare process is initialized with
zero and hence equal.

Signed-off-by: Stefan Agner <stefan@...>
---
 libopkg/opkg_cmd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libopkg/opkg_cmd.c b/libopkg/opkg_cmd.c
index 4aadbd5..45f2d73 100644
--- a/libopkg/opkg_cmd.c
+++ b/libopkg/opkg_cmd.c
 <at>  <at>  -1072,7 +1072,7  <at>  <at>  static int opkg_compare_versions_cmd(int argc, char **argv)
 {
     if (argc == 3) {
         /* this is a bit gross */
-        struct pkg p1, p2;
+        struct pkg p1 = {}, p2 = {};
         parse_version(&p1, argv[0]);
         parse_version(&p2, argv[2]);
         return pkg_version_satisfied(&p1, &p2, argv[1]);
--

-- 
2.8.0

(Continue reading)


Gmane