Josh Cartwright | 15 Jul 20:47 2016

[PATCH 0/4] basic list-upgradable tests & cleanup

This is a series of patches cooked up from things found during code inspection.

Josh Cartwright (4):
  tests/opkgcl.py: consistently indent
  tests/opkgcl.py: add helper for is_upgradable
  tests/core: add basic test for list-upgradable behavior
  libopkg: kill active_list

 libopkg/Makefile.am                              |   4 +-
 libopkg/active_list.c                            | 139 -----------------------
 libopkg/active_list.h                            |  45 --------
 libopkg/opkg_cmd.c                               |  14 +--
 libopkg/pkg.c                                    |   4 -
 libopkg/pkg.h                                    |   3 +-
 libopkg/solvers/internal/opkg_upgrade_internal.c |  30 ++---
 libopkg/solvers/internal/opkg_upgrade_internal.h |   3 +-
 tests/Makefile                                   |   1 +
 tests/core/34_list_upgradable.py                 |  41 +++++++
 tests/opkgcl.py                                  |  42 +++++--
 11 files changed, 94 insertions(+), 232 deletions(-)
 delete mode 100644 libopkg/active_list.c
 delete mode 100644 libopkg/active_list.h
 create mode 100755 tests/core/34_list_upgradable.py

--

-- 
2.9.0

Alejandro del Castillo | 13 Jul 20:25 2016

Opkg-0.3.3 release

Hi all,

I am pleased to announce the release of opkg-0.3.3. The release is available at
the yocto project download page:

http://downloads.yoctoproject.org/releases/opkg/

This is a bug fix release that address two regressions found on the 0.3.2 release.

For the next release cycle (December 2016), my goal is to expand the ATS test
coverage to prevent regressions moving forward, as well as addressing some of
the issues highlighted by Coverity
(https://scan.coverity.com/projects/opkg?tab=overview).

Release Notes for opkg-0.3.3
==========

- Fix build breakage when using configure option --enable-sha256.
  Regression from 0.3.1

Internal Solver:

- Do not upgrade installed dependencies if version constrains are meet
  (issue 9802).

- Do not remove packages if removal operation is not valid due to installed
  dependents (issue 9862). Regression from 0.3.

--

-- 
Cheers,
(Continue reading)

Alejandro del Castillo | 13 Jul 18:32 2016

[PATCH 0/2] updates for 0.3.3 release

Final updates before release.

Alejandro del Castillo (2):
  NEWS: update to v0.3.3
  configure.ac: bump version to 0.3.3

 NEWS         | 15 +++++++++++++++
 configure.ac |  2 +-
 2 files changed, 16 insertions(+), 1 deletion(-)

--

-- 
1.9.1

Alejandro del Castillo | 8 Jul 22:20 2016

[PATCH] Fix issue 9862

This patch fixes the regression reported on:
   https://bugzilla.yoctoproject.org/show_bug.cgi?id=9862.

I plan to post a bug fix release (0.3.3) next week, so I could use 
community testing to make sure there are no other major regressions.

Alejandro del Castillo (1):
  opkg_solver_remove: add pkg to pkg_to_remove vector only if there
    aren't any installed dependents

 libopkg/solvers/internal/opkg_action.c | 3 +--
 tests/core/06_dependency.py            | 8 ++++++++
 2 files changed, 9 insertions(+), 2 deletions(-)

--

-- 
1.9.1

Florin Gherendi | 7 Jul 12:17 2016
Picon

Re: opkg-0.3.2 on DD-WRT problems

Hi again!

On 07/06/2016 10:43 PM, Alejandro del Castillo wrote:
> 
> 
> On 07/01/2016 01:15 PM, Florin wrote:
>> Thanks for the answer! 
> 
> np, I am really glad you have interest in getting OpenWRT working with the
> latest opkg! The 2 biggest opkg clients are OpenEmbedded/Yocto and OpenWRT.
> While OE/Yocto stays up to date with opkg, OpenWRT does not...so this is a great
> step into getting it in sync
> 
It is useful for me too, and it does not hurt giving a helpful hand if I
can.

> 
> I believe "opkg info" should be able to give you package information of all
> installed packages, regardless of the way they were installed (repository of
> not)....not sure if that's what you were referring to...
> 
Hmm, nope. The problem is that the status file does not store the
package description and size, that info is only stored in the repository
package list file, but not extracted from the installed package. I will
give it a look, maybe I can change that; it would be a nice feature to have.

> Weird....I was not able to install ipk's generated with the latest version of
> opkg-build without the change below. Regardless, the backwards compatibility
> case is the one that we should focus on (new opkg, old ipk's).
> 
(Continue reading)

jpdjong | 4 Jul 13:22 2016
Picon

[PATCH] src/opkg.c: Fix prefer_arch_to_version as it was misspelled

Signed-off-by: Jaap de Jong <jaap.dejong@...>
---
 src/opkg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/opkg.c b/src/opkg.c
index 1aa0fd9..ca28201 100644
--- a/src/opkg.c
+++ b/src/opkg.c
 <at>  <at>  -96,7 +96,7  <at>  <at>  static struct option long_options[] = {
     {"force-remove", 0, 0, ARGS_OPT_FORCE_REMOVE},
     {"force_remove", 0, 0, ARGS_OPT_FORCE_REMOVE},
     {"prefer-arch-to-version", 0, 0, ARGS_OPT_PREFER_ARCH_TO_VERSION},
-    {"prefer-arch-to-version", 0, 0, ARGS_OPT_PREFER_ARCH_TO_VERSION},
+    {"prefer_arch_to_version", 0, 0, ARGS_OPT_PREFER_ARCH_TO_VERSION},
     {"noaction", 0, 0, ARGS_OPT_NOACTION},
     {"download-only", 0, 0, ARGS_OPT_DOWNLOAD_ONLY},
     {"nodeps", 0, 0, ARGS_OPT_NODEPS},
--
1.9.1

Florin | 1 Jul 12:59 2016
Picon

opkg-0.3.2 on DD-WRT problems

I've tried to compile opkg-0.3.2 for a DD-WRT router with ARM cortex a9 (I already have a running native gcc on it with all dev tools working perfectly).

Of course I had to edit libopkg/opkg_conf.h in order to specify the location for info dir to /opt/lib/opkg/info and status file as /opt/lib/opkg/status, as the original opkg-0.1.8 provided for DD-WRT uses.

But I have two problems:

1) opkg list-installed does not show the installed packages even if they really are listed in the status file and info dir. Tried to specified these as options in an opkg.conf file, the conf file gets read but the same behaviour. Is there a total incompatibility between the two versions (0.1.8 and 0.3.2) status files??

2) I've also tried to install some ipk files with another compilation of opkg where I set the location of info dir and status files on /opt/usr/share/opkg (for not to break the original status file and info), and this does not work neither, I get the following messages:

Collected errors:
 * open_outer: Failed to open package './libopkg-dev_0.3.2-1_armv7soft.ipk': Unrecognized archive format
 * pkg_extract_control_file_to_stream: Failed to extract control.tar.gz from package './libopkg-dev_0.3.2-1_armv7soft.ipk'.
 * pkg_init_from_file: Failed to extract control file from ./libopkg-dev_0.3.2-1_armv7soft.ipk

but the ipk files are ok, tar compressed, they can be installed with the original opkg with no trouble.

What am I missing? It shouldn't be a problem with my libarchive, the libarchive binaries can decompress the files.

Thanks,

Florin

--
You received this message because you are subscribed to the Google Groups "opkg-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to opkg-devel+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
For more options, visit https://groups.google.com/d/optout.
jpdjong | 30 Jun 10:25 2016
Picon

remove packages

Hi All,

what is the expected behavior for removal of a package A for which package B has a dependency?

I was using v0.2.3 before and 'opkg remove A' did not remove it.
With v0.3.2 the same errors:

Removing package A from root...
Collected errors:
 * print_dependents_warning: Package A is depended upon by packages:
 * print_dependents_warning: 	B
 * print_dependents_warning: These might cease to work if package A is removed.
 * print_dependents_warning: Force removal of this package with --force-depends.
 * print_dependents_warning: Force removal of this package and its dependents
 * print_dependents_warning: with --force-removal-of-dependent-packages.

But package A is removed nevertheless....
This sounds as a severe error!

Thanks,
Jaap

André Draszik | 24 Jun 14:18 2016
Picon

[PATCH] release: fix implicit declaration of release_get_sha256()

| ../../opkg-0.3.2/libopkg/release.c: In function ‘release_verify_file’:
| ../../opkg-0.3.2/libopkg/release.c:120:26: warning: implicit declaration of function
‘release_get_sha256’ [-Wimplicit-function-declaration]
|      const char *sha256 = release_get_sha256(release, pathname);
|                           ^
| ../../opkg-0.3.2/libopkg/release.c:120:26: warning: initialization makes pointer from integer
without a cast [-Wint-conversion]
| ../../opkg-0.3.2/libopkg/release.c: At top level:
| ../../opkg-0.3.2/libopkg/release.c:324:13: error: conflicting types for ‘release_get_sha256’
|  const char *release_get_sha256(release_t * release, const char *pathname)
|              ^
| ../../opkg-0.3.2/libopkg/release.c:120:26: note: previous implicit declaration of
‘release_get_sha256’ was here
|      const char *sha256 = release_get_sha256(release, pathname);
|                           ^

At the same time, make it static, too, similar to
release_get_md5().

Signed-off-by: André Draszik <adraszik@...>
---
 libopkg/release.c | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/libopkg/release.c b/libopkg/release.c
index b6aceb4..7db0bd4 100644
--- a/libopkg/release.c
+++ b/libopkg/release.c
 <at>  <at>  -109,6 +109,20  <at>  <at>  static const char *release_get_md5(release_t * release, const char *pathname)
     return '\0';
 }

+#ifdef HAVE_SHA256
+static const char *release_get_sha256(release_t * release, const char *pathname)
+{
+    const cksum_t *cksum;
+
+    if (release->sha256sums) {
+        cksum = cksum_list_find(release->sha256sums, pathname);
+        return cksum->value;
+    }
+
+    return '\0';
+}
+#endif
+
 int release_verify_file(release_t * release, const char *file_name,
                         const char *pathname)
 {
 <at>  <at>  -319,17 +333,3  <at>  <at>  int release_download(release_t * release, pkg_src_t * dist, char *lists_dir,

     return ret;
 }
-
-#ifdef HAVE_SHA256
-const char *release_get_sha256(release_t * release, const char *pathname)
-{
-    const cksum_t *cksum;
-
-    if (release->sha256sums) {
-        cksum = cksum_list_find(release->sha256sums, pathname);
-        return cksum->value;
-    }
-
-    return '\0';
-}
-#endif
-- 
2.8.1

--

-- 
You received this message because you are subscribed to the Google Groups "opkg-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to opkg-devel+unsubscribe@...
For more options, visit https://groups.google.com/d/optout.

Joshua DeWeese | 23 Jun 22:33 2016
Picon

building data.tar.gz for *.ipk files with less fuss

I thought this might be useful for others and worth bringing up here. It seems like nobody has figured out a decent way to build the data.tar.gz file inside of pkg files without alot of fuss (at least from my searching when trying to make pkgs for angstrom and poky). So I thought I'd take a whack at it. Attached is a script which builds tar files with the desired permissions/ownership and a sample control file showing how the output is controlled. It was made in about an hour, and I am already thinking of a better way to implement it in c or python where the tar file could be constructed directly using tar libraries rather in in /tmp as I have done here in shell script. Let me know what you think. If there is interest I will start a proper project.

--
You received this message because you are subscribed to the Google Groups "opkg-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to opkg-devel+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
For more options, visit https://groups.google.com/d/optout.
Attachment (mktar): application/octet-stream, 1665 bytes
Attachment (cntrl_file): application/octet-stream, 104 bytes
Michael Hansen | 21 Jun 20:48 2016
Picon

[PATCH] Check installed status for actual package, not its abstract parent.

This fixes the inverse-case regression caused by my initial fix for 9802.

Signed-off-by: Michael Hansen <michael.j.hansen@...>
---
 libopkg/pkg_hash.c          |  4 ++--
 tests/Makefile              |  1 +
 tests/regress/issue9802b.py | 25 +++++++++++++++++++++++++
 3 files changed, 28 insertions(+), 2 deletions(-)
 create mode 100644 tests/regress/issue9802b.py

diff --git a/libopkg/pkg_hash.c b/libopkg/pkg_hash.c
index 9d731f0..3761514 100644
--- a/libopkg/pkg_hash.c
+++ b/libopkg/pkg_hash.c
 <at>  <at>  -444,8 +444,8  <at>  <at>  pkg_t *pkg_hash_fetch_best_installation_candidate(abstract_pkg_t * apkg,
                     opkg_msg(DEBUG, "%s %s wins by priority.\n",
                              good_pkg_by_name->name, good_pkg_by_name->version);
             } else if (good_pkg_by_name && prefer_installed) {
-                int is_installed = good_pkg_by_name->parent->state_status == SS_INSTALLED
-                                   || good_pkg_by_name->parent->state_status == SS_UNPACKED;
+                int is_installed = good_pkg_by_name->state_status == SS_INSTALLED
+                                   || good_pkg_by_name->state_status == SS_UNPACKED;
                 if (!is_installed)
                     good_pkg_by_name = matching;
             } else
diff --git a/tests/Makefile b/tests/Makefile
index 27d7af1..709e91d 100644
--- a/tests/Makefile
+++ b/tests/Makefile
 <at>  <at>  -67,6 +67,7  <at>  <at>  REGRESSION_TESTS := core/01_install.py \
 		    regress/issue9218.py \
 		    regress/issue9533.py \
 		    regress/issue9802.py \
+		    regress/issue9802b.py \
 		    misc/filehash.py \
 		    misc/update_loses_autoinstalled_flag.py
 RUN_TESTS := $(REGRESSION_TESTS:%.py=run-%.py)
diff --git a/tests/regress/issue9802b.py b/tests/regress/issue9802b.py
new file mode 100644
index 0000000..183320e
--- /dev/null
+++ b/tests/regress/issue9802b.py
 <at>  <at>  -0,0 +1,25  <at>  <at> 
+#!/usr/bin/env python
+
+import os
+import opk, cfg, opkgcl
+
+opk.regress_init()
+
+o = opk.OpkGroup()
+o.add(Package="a", Depends="b")
+o.add(Package="b", Version="1.0")
+o.add(Package="b", Version="2.0")
+o.write_opk()
+o.write_list()
+
+opkgcl.update()
+
+opkgcl.install("b_2.0_all.opk")
+if not opkgcl.is_installed("b", "2.0"):
+    opk.fail("Package 'b' failed to install")
+
+opkgcl.install("a")
+if not opkgcl.is_installed("a"):
+    opk.fail("Package 'a' failed to install")
+if not opkgcl.is_installed("b", "2.0"):
+    opk.fail("Package 'b' downgraded but downgrade was not necessary")
--

-- 
2.6.5


Gmane