dskvr / opkg

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

API function opkg_install_package return -1 when change the version of package in the name of file manually (and when additionaly inside too) #150

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

1.Our code install bison-locale-da_2.3-r1_cortexa9-vfp-neon.ipk using libopkg 
opkg_install_package function SUCCESSFULLY!
2.Then I changed version in name of 
bison-locale-da_2.3-r1_cortexa9-vfp-neon.ipk as 
bison-locale-da_3.3-r1_cortexa9-vfp-neon.ipk and opkg_install_package returns 
-1 
3.The same effect when I changed version not only in name of ipk file but 
inside of package in control file opkg_install_package returns -1 
4.opkg_install_package also returns -1 fo cases in steps 2 and 3

What is the expected output? What do you see instead?
I expect both packages have to be instaled successfully.
I see opkg_install_package  return -1 in step 2 and 3

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

Please provide any additional information below.

Original issue reported on code.google.com by alex569....@gmail.com on 5 Nov 2014 at 9:15

Attachments:

GoogleCodeExporter commented 8 years ago
in steps 4 means opkg_upgrade_package not opkg_install_package 

Original comment by alex569....@gmail.com on 5 Nov 2014 at 9:18

GoogleCodeExporter commented 8 years ago
What arguments are you passing to opkg_install_package? Are you passing the 
path to the package file or just the package name (which would be 
"bison-locale-da" in this case)?

Original comment by paul.betafive on 5 Nov 2014 at 10:30

GoogleCodeExporter commented 8 years ago
I pass full path as following 
/media/disk/bison-locale-da_3.3-r1_cortexa9-vfp-neon.ipk

Original comment by alex569....@gmail.com on 5 Nov 2014 at 11:05

GoogleCodeExporter commented 8 years ago
opkg_install_package() only supports the use of package names not full paths to 
package files. The current libopkg API is deprecated so I'm not planning to add 
this support.

You should however be able to call opkg_prepare_url_for_install to load the 
package file and get the package name. For example, this might work:

    char *pkg_name;
    opkg_prepare_url_for_install(pkg_path, &pkg_name);
    opkg_install_pkg(pkg_name);
    free(pkg_name);

The old API has a lot of problems like this which is why it is deprecated. I'd 
recommend you interact with opkg via the command line interface until a new 
libopkg API arrives in opkg v0.4.0 or later.

Original comment by paul.betafive on 9 Nov 2014 at 5:23

GoogleCodeExporter commented 8 years ago
Sorry, that should be opkg_install_package(pkg_name, ...) not opkg_install_pkg. 
The API even confuses me!

Original comment by paul.betafive on 9 Nov 2014 at 5:24