wendellchao / opkg

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

opkg-cl hangs trying to overwrite config files #11

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. build a rootfs that has 2 packages with the same files specifed as a
CONFFILE
2.
3.

What is the expected output? What do you see instead?

While doing "bitbake fso-image" opkg-cl waits for input

Downloading
file:/usr/src/openmoko/om-gta02-unstable/deploy/glibc/ipk/armv4t/paroli_0.2.1+gi
tr32+6b9cbe11ab8362d2b3a1ebeae61b33f4b9b3ac10-r9_armv4t.ipk
    Configuration file '/etc/frameworkd.conf'
    ==> File on system created by you or by a script.
    ==> File also in package provided by package maintainer.
       What would you like to do about it ?  Your options are:
        Y or I  : install the package maintainer's version
        N or O  : keep your currently-installed version
          D     : show the differences between the versions (if diff is
installed)
     The default action is to keep your current version.
    *** frameworkd.conf (Y/I/N/O/D) [default=N] ?

What version of the product are you using? On what operating system?

This is with opkg 204 in the fso/milestone5.5 of OE

Please provide any additional information below.

The fso/milestone5.5 branch needs the patch below to show the hang

--- openembedded/packages/openmoko-projects/paroli_git.bb.orig  2009-03-24
08:37:19.000000000 -0600                                           
+++ openembedded/packages/openmoko-projects/paroli_git.bb       2009-03-24
16:23:59.000000000 -0600                                           
@@ -2,13 +2,15 @@                                                         

 SECTION = "x11"                                                          

 LICENSE = "GPL"                                                          

 PV = "0.2.1+gitr${SRCREV}"                                               

-PR = "r0"                                                                

+PR = "r9"                                                                

 SRC_URI = "git://git.paroli-project.org/paroli.git;protocol=http"        

 S = "${WORKDIR}/git"                                                     

 inherit distutils                                                        

+PACKAGES += "${PN}-autostart ${PN}-theme ${PN}-sounds"                   

+                                                                         

 RDEPENDS = "\                                                            

   python-datetime \                                                      

   python-subprocess \                                                    

@@ -17,4 +19,90 @@                                                        

   python-pygobject \                                                     

 "                                                                        

-FILES_${PN} += "${sysconfdir}/dbus-1 ${sysconfdir}/paroli ${datadir}"    

+E_CONFIG_DIR="/home/root/.e/e"                                           

+#E_CONFIG_DIR="/usr/share/enlightenment/data"                            

+                                                                         

+do_install_append() {                                                    

+               # install paroli theme                                    

+               install -d ${D}${E_CONFIG_DIR}/config/illume/             

+               install ${S}/data/module.illume.cfg
${D}${E_CONFIG_DIR}/config/illume/                                        

+               install ${S}/data/e.cfg ${D}${E_CONFIG_DIR}/config/illume/

+               install -d ${D}${E_CONFIG_DIR}/themes                     

+       install ${S}/data/illume.edj ${D}${E_CONFIG_DIR}/themes           

+       install -d ${D}${datadir}/elementary/themes                       

+       install ${S}/data/default.edj ${D}${datadir}/elementary/themes    

+       install -d ${D}/etc/enlightenment/                                

+       echo 'E_PROFILE="-profile illume"' >
${D}${sysconfdir}/enlightenment/default_profile                           

+                                                                         

+               # install autostart                                       

+       install -d ${D}${E_CONFIG_DIR}/applications/all                   

+       cp ${D}/usr/share/applications/paroli.desktop
${D}${E_CONFIG_DIR}/applications/all                                      

+       install -d ${D}${E_CONFIG_DIR}/applications/startup               

+               echo "paroli.desktop" >>
${D}${E_CONFIG_DIR}/applications/startup/.order                           

+                                                                         

+       install -d ${D}${sysconfdir}/freesmartphone/oevents               

+       install ${S}/data/rules.yaml
${D}${sysconfdir}/freesmartphone/oevents/rules.yaml                       

+       install ${S}/data/frameworkd.conf ${D}${sysconfdir}/frameworkd.conf

+                                                                         

+       install -d ${D}${sysconfdir}/freesmartphone/opreferences/conf/phone

+       install ${S}/data/default.yaml
${D}${sysconfdir}/freesmartphone/opreferences/conf/phone/default.yaml     

+                                                                         

+       install -d ${D}${datadir}/sounds                                  

+       install ${S}/data/sounds/* ${D}${datadir}/sounds                  

+                                                                         

+}                                                                        

+                                                                         

+pkg_postinst_${PN}-autostart() {                                         

+#!/bin/sh                                                                

+# post installation script                                               

+echo "*******************************************"                       

+echo "Deactivating zhone autostart"                                      

+echo "*******************************************"                       

+chmod -x ${sysconfdir}/X11/Xsession.d/80zhone || true                    

+exit 0                                                                   

+}                                                                        

+                                                                         

+pkg_postinst_${PN}() {                                                   

+#!/bin/sh                                                                

+# post installation script                                               

+#mv ${sysconfdir}/frameworkd.conf ${sysconfdir}/old_frameworkd.conf      

+#cp ${sysconfdir}/frameworkd_paroli.conf ${sysconfdir}/frameworkd.conf   

+#mv ${sysconfdir}/freesmartphone/oevents/rules.yaml
${sysconfdir}/freesmartphone/oevents/old_rules.yaml                       

+#cp ${sysconfdir}/freesmartphone/oevents/paroli_rules.yaml
${sysconfdir}/freesmartphone/oevents/rules.yaml                           

+exit 0                                                                   

+}
+
+pkg_postinst_${PN}-sounds() {
+#!/bin/sh
+# post installation script
+#mv ${sysconfdir}/freesmartphone/opreferences/conf/phone/default.yaml
${sysconfdir}/freesmartphone/opreferences/conf/phone/old_default.yaml
+#cp
${sysconfdir}/freesmartphone/opreferences/conf/phone/paroli_default.yaml
${sysconfdir}/freesmartphone/opreferences/conf/phone/default.yaml
+exit 0
+}
+
+FILES_${PN} += " \
+           ${sysconfdir}/dbus-1 \
+           ${sysconfdir}/paroli \
+           ${sysconfdir}/freesmartphone/oevents \
+           ${sysconfdir}/frameworkd.conf \
+           ${datadir} \
+           "
+
+FILES_${PN}-theme = " \
+                 ${E_CONFIG_DIR}/themes \
+                 ${E_CONFIG_DIR}/config \
+                 ${sysconfdir}/enlightenment \
+                 "
+
+FILES_${PN}-autostart = "${E_CONFIG_DIR}/applications"
+
+FILES_${PN}-sounds = " \
+                  ${datadir}/sounds/ \
+                 
${sysconfdir}/freesmartphone/opreferences/conf/phone/default.yaml \
+                  "
+
+CONFFILES_${PN} += " \
+               ${sysconfdir}/frameworkd.conf \
+               ${sysconfdir}/freesmartphone/oevents/rules.yaml \
+               "
+CONFFILES_${PN}-sounds += " \
+               ${sysconfdir
+"

Original issue reported on code.google.com by angus.ai...@gmail.com on 31 Mar 2009 at 5:47

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
+-- [ http://bugs.openembedded.net/show_bug.cgi?id=5133#c4 ]
|
| I think the proper fix for this will be for bitbake to error out. 
| --force-defaults will just mask the problem.  We need to be made aware of the
| underlying problem in the recipes and fix them.
|
+--

I guess what we need from opkg is a non-interactive mode.  If turned on, opkg 
should
fail rather than ask questions in those cases.  This would make do_rootfs in OE 
fail
as well instead of hanging forever (consuming 100% CPU, btw).

Original comment by rolf.leg...@gmail.com on 23 Jun 2009 at 7:28

GoogleCodeExporter commented 9 years ago
Trunk now installs new conflicting config files with a -opkg postfix and 
informs the user of this action.

This prevents hanging at a prompt, but doesn't provide bitbake/oe users with 
any easy mechanism to determine that recipes 
need to be fixed. Perhaps a new option e.g. --maintainer-checks should error 
out in cases like these?

Original comment by graham.g...@gmail.com on 21 Dec 2009 at 12:38

GoogleCodeExporter commented 9 years ago
I'm going to close this bug. The initial hanging problem has been resolved and 
OpenEmbedded can use its log_check facility to find conflicting conf files by 
looking for the following pattern:

Collected errors:
  * resolve_conffiles: Existing conffile /etc/foo is different from the conffile in the new package. The new conffile will be placed at /etc/foo-opkg

Original comment by graham.g...@gmail.com on 8 Jun 2010 at 1:55