dskvr / opkg

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

Unable to open the control file in set_flags_from_control #4

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hi, 
using svn snapshot r198 on OpenWrt for etrax platform I get this error:

$ opkg install strace
Installing strace (4.5.16-2) to root...
Downloading
http://download.tuxfamily.org/crisos/repository/darwinfox/all//strace_4.5.16-2_c
ris.ipk
can't get //usr/lib/opkg/info/strace.control open for read
Configuring strace
Collected errors:
 * Unable to open the control file in  set_flags_from_control

Please note that this happens for any package inside
http://download.tuxfamily.org/crisos/repository/darwinfox/all

The problem appear to affect only this architecture but please don't
discard it as workforme I can provide a lot of information about this bug.

I attach also the full log using strace; on this log at line opkg.log:2513
you can see that opkg try to open control file in RDONLY instead of WRONLY
like happens for list file at line 2518

Regards

Original issue reported on code.google.com by claudyu...@gmail.com on 25 Jan 2009 at 10:46

Attachments:

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Hi ticktock35 

>maybe prefix was wrong. 
>Would you using gdb and try to set breakpoint at
>pkg_extract_control_files_to_dir_with_prefix
>and check the prefix?

I just recompile opkg with the patch previously posted and the little debug 
info:
Index: libopkg/opkg_install.c
===================================================================
--- libopkg/opkg_install.c  (revisione 199)
+++ libopkg/opkg_install.c  (copia locale)
@@ -1466,6 +1466,7 @@
      if (old_pkg)
      remove_obsolete_maintainer_scripts(conf, pkg, old_pkg);
      sprintf_alloc(&prefix, "%s.", pkg->name);
+   printf("%s\n",prefix);
      ret = pkg_extract_control_files_to_dir_with_prefix(pkg,
                            pkg->dest->info_dir,
                            prefix);

The result was:

# opkg install strace
Installing strace (4.5.16-2) to root...
Downloading
http://download.tuxfamily.org/crisos/repository/darwinfox/all//strace_4.5.16-2_c
ris.ipk
strace.
can't get //usr/lib/opkg/info/strace.control open for read
Configuring strace
Collected errors:
 * Unable to open the control file in  set_flags_from_control

As you can see the value of prefix is "strace." after sprintf_alloc.

Original comment by claudyu...@gmail.com on 1 Feb 2009 at 6:44

GoogleCodeExporter commented 8 years ago
Hi Tick,
I have a good news.
Gilles Doffe found the bug, at the end of this discussion [1] you can found the
workaround patch.

Best Regards

[1] http://www.crisos.org/flyspray/index.php?do=details&task_id=10 

Original comment by claudyu...@gmail.com on 6 Apr 2009 at 1:10