[opkg] "Cannot install package package.tar.gz"

Gilles Ganault gilles.ganault at free.fr
Fri Jun 24 19:41:20 CEST 2011


On Fri, 24 Jun 2011 17:11:56 +0200, Thomas Zimmermann
<ml at vdm-design.de> wrote:
>A opkg package is ar package not a tar.gz. So just package it the right way 
>and it should work.

Thanks Thomas, that did it:
============
root:/var/tmp> ./opkg-cl install package.opk
Installing opkg-hello (0.0.1) to root...

The name of this script is
"/tmp/opkg-4Oa1dd/opkg-hello-MjJMjr/preinst".

Configuring opkg-hello.
The name of this script is "//usr/lib/opkg/info/opkg-hello.postinst".
============
root:/var/tmp> ls -al /bin/hello

-rwxr-xr-x    1 root     root          4968 Jun 24  2011 /bin/hello
root:/var/tmp> hello

Hello World
============

So the two following documents...

http://inportb.com/2010/10/19/making-an-opkg-package/
www.oesf.org/index.php?title=Pdaxrom:_Create_An_Ipk_Howto

... include two errors:

1. After compiling control.tar.gz and data.tar.gz, a package is not
created either with tar" or "ar", or "tar" followed by "ar", but
simply with "ar -r mypackage.opk control.tar.gz data.tar.gz
debian-binary"

2. Control files must not be located in ./CONTROL/ but rather at the
root; Otherwise, "opkg-cl install" triggers "pkg_init_from_file:
Malformed package file package.opk"

This won't work either: "tar czvf control.tar.gz CONTROL/*". Maybe
"tar" offers an option to leave out the path leading to the files.
Bottom line: control.tar.gz must NOT include paths.

Thanks for the help.




More information about the community mailing list