adelcast / opkg_old

Automatically exported from code.google.com/p/opkg
0 stars 0 forks source link

API function of libopkg opkg_install_package return error #145

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Build /pase/opkg-0.2.2/tests/libopkg_test 
2. Start /pase/opkg-0.2.2/tests/libopkg_test as 
libopkg_test install package_name.ipk
3.opkg_install_package return -1 with error ERROR, "Couldn't find package 
package_name.ipk

What is the expected output? What do you see instead?
Package suposed to be installed. 

What version of the product are you using? On what operating system?
opkg-0.2.2 on YocTo

Please provide any additional information below.
I tried analyse issue and find out that hash table is not initialized by the 
package I tried to install.. So when it is suposed to be retrieved from there 
hash table is empty

Original issue reported on code.google.com by alex5693...@gmail.com on 2 Sep 2014 at 8:18

GoogleCodeExporter commented 8 years ago
So how can it be fixed. Probably I have to use some previous version without 
this bug or to install opkg some different way or something else... Thank you 
ahead...

Original comment by alex5693...@gmail.com on 2 Sep 2014 at 8:22

GoogleCodeExporter commented 8 years ago
This usage of opkg_install_package should work with opkg built from git master. 
It hasn't worked in any v0.2.x release or earlier to my knowledge.

A call to opkg_prepare_url_for_install was added before the call to 
pkg_hash_fetch_installed_by_name, which allows the function to handle a file 
name or URI as well as a package name.

The libopkg API is deprecated and libopkg_test has been removed from git master 
though.

If you want to use a file name or URI with opkg_install_package in opkg-0.2.x, 
the relevant commit to backport is 6954434: 
http://git.yoctoproject.org/cgit/cgit.cgi/opkg/commit/libopkg/opkg.c?id=6954434f
2f0bb12202b3301ebc3e65e5828c410b

Original comment by paul.betafive on 2 Sep 2014 at 8:39

GoogleCodeExporter commented 8 years ago
Sorry, bad URL. That should have been 
http://git.yoctoproject.org/cgit/cgit.cgi/opkg/commit/?id=6954434f2f0bb12202b330
1ebc3e65e5828c410b

Original comment by paul.betafive on 2 Sep 2014 at 8:40

GoogleCodeExporter commented 8 years ago
Thank you a lot... This is the way i thougt to fix this issue...))) But why the 
libopkg API is deprecated . . .

Original comment by alex5693...@gmail.com on 2 Sep 2014 at 8:56

GoogleCodeExporter commented 8 years ago
???

Original comment by alex5693...@gmail.com on 2 Sep 2014 at 8:57

GoogleCodeExporter commented 8 years ago
Currently there is much duplicate code between libopkg/opkg.c and 
libopkg/opkg_cmd.c. Each operation has two entry points (eg. 
opkg_install_package and opkg_install_cmd) which don't share code. Those 
functions differ slightly and each have their quirks so it's not possible to 
just have opkg_install_cmd call opkg_install_package.

The split between opkg and libopkg is terrible as well, much of the command 
line handling is in libopkg/opkg_cmd.c and is built into the library.

Therefore the current API has been deprecated. After the v0.3 release, the 
split between opkg and libopkg will be cleaned up, with a new and improved API 
being defined. That API won't match the previous API though.

Original comment by paul.betafive on 2 Sep 2014 at 9:01

GoogleCodeExporter commented 8 years ago
Ok. Thank you for the answers...

Original comment by alex5693...@gmail.com on 2 Sep 2014 at 9:07