Testing Env: Host: Ubuntu 10.10 x86_64 Kernel: 2.6.35-27-generic Image location: http://autobuilder.yoctoproject.org/nightly/20110305-4/ Commit information: c192fefd868be53c20dfd8bc44e3e815cf53a10a With RC2 qemuarm images, after I installed man-1.6f-r0.armv5te.rpm with RPM command, zypper can not search any packages. ############## root@qemuarm:~# zypper search man Loading repository data... Reading installed packages... S | Name | Summary | Type --+--------------------------+--------------------------------------------------------------------+-------- i | connman | A daemon for managing internet connections within embedded devices | package i | connman-gnome | connman-gnome version 0.5-r4 | package i | connman-plugin-bluetooth | A daemon for managing internet connections within embedded devices | package i | connman-plugin-dnsproxy | A daemon for managing internet connections within embedded devices | package i | connman-plugin-ethernet | A daemon for managing internet connections within embedded devices | package i | connman-plugin-loopback | A daemon for managing internet connections within embedded devices | package i | connman-plugin-wifi | A daemon for managing internet connections within embedded devices | package i | libpixman-1-0 | Pixman: Pixel Manipulation library | package i | pcmanfm | pcmanfm version 0.9.8-r0 | package root@qemuarm:~# root@qemuarm:~# root@qemuarm:~# ls man-1.6f-r0.armv5te.rpm man-dev-1.6f-r0.armv5te.rpm root@qemuarm:~# root@qemuarm:~# root@qemuarm:~# rpm -ivh man-1.6f-r0.armv5te.rpm Preparing... ########################################### [100%] 1:man ########################################### [100%] root@qemuarm:~# root@qemuarm:~# man What manual page do you want? root@qemuarm:~# root@qemuarm:~# root@qemuarm:~# zypper search man Loading repository data... Reading installed packages... No packages found. root@qemuarm:~# root@qemuarm:~# root@qemuarm:~# zypper search kernel Loading repository data... Reading installed packages... No packages found. root@qemuarm:~# ####################### After I installed man-dev-1.6f-r0.armv5te.rpm with RPM command, zypper search package can work again! And the 'man' and 'man-dev' packages can be recognized by zypper ###################### root@qemuarm:~# root@qemuarm:~# rpm -ivh man-dev-1.6f-r0.armv5te.rpm Preparing... ########################################### [100%] 1:man-dev ########################################### [100%] root@qemuarm:~# root@qemuarm:~# root@qemuarm:~# root@qemuarm:~# zypper search man Loading repository data... Reading installed packages... S | Name | Summary | Type --+--------------------------+--------------------------------------------------------------------+-------- i | connman | A daemon for managing internet connections within embedded devices | package i | connman-gnome | connman-gnome version 0.5-r4 | package i | connman-plugin-bluetooth | A daemon for managing internet connections within embedded devices | package i | connman-plugin-dnsproxy | A daemon for managing internet connections within embedded devices | package i | connman-plugin-ethernet | A daemon for managing internet connections within embedded devices | package i | connman-plugin-loopback | A daemon for managing internet connections within embedded devices | package i | connman-plugin-wifi | A daemon for managing internet connections within embedded devices | package i | libpixman-1-0 | Pixman: Pixel Manipulation library | package i | man | Online documentation tools | package i | man-dev | Online documentation tools - Development files | package i | pcmanfm | pcmanfm version 0.9.8-r0 | package root@qemuarm:~# root@qemuarm:~# ######################## And I can remove man-dev package by zypper: ######################## root@qemuarm:~# zypper rm man-dev Warning: No repositories defined. Operating only with the installed resolvables. Nothing can be installed. Loading repository data... Reading installed packages... Resolving package dependencies... The following package is going to be REMOVED: man-dev 1 package to remove. No additional space will be used or freed after the operation. Continue? [y/n/?] (y): y Removing man-dev-1.6f-r0 [done] Additional rpm output: error: cannot create %_repackage_dir /var/spool/repackage/1299357873 root@qemuarm:~# root@qemuarm:~# ########################### However, after I removed 'man-dev' package, zypper search package can not work again! So I can not removed 'man' package by zypper. ########################## root@qemuarm:~# zypper search man Loading repository data... Reading installed packages... No packages found. root@qemuarm:~# root@qemuarm:~# root@qemuarm:~# rpm -qa|grep man connman-plugin-loopback-0.65-r0.armv5te connman-plugin-dnsproxy-0.65-r0.armv5te connman-plugin-bluetooth-0.65-r0.armv5te connman-plugin-wifi-0.65-r0.armv5te connman-plugin-ethernet-0.65-r0.armv5te libpixman-1-0-0.20.2-r0.armv5te pcmanfm-0.9.8-r0.armv5te connman-0.65-r0.armv5te connman-gnome-0.5-r4.armv5te man-1.6f-r0.armv5te root@qemuarm:~# root@qemuarm:~# root@qemuarm:~# man What manual page do you want? root@qemuarm:~# root@qemuarm:~# root@qemuarm:~# zypper rm man Warning: No repositories defined. Operating only with the installed resolvables. Nothing can be installed. Loading repository data... Reading installed packages... 'man' not found in package names. Trying capabilities. No provider of 'man' found. Resolving package dependencies... Problem: This request will break your system! nothing provides requested glibc Have you enabled all requested repositories? Solution 1: ignore the warning of a broken system (requires:glibc) Choose the above solution using '1' or cancel using 'c' [1/c] (c): 1 Resolving dependencies... Resolving package dependencies... Problem: This request will break your system! nothing provides requested glibc Have you enabled all requested repositories? Solution 1: ignore the warning of a broken system (requires:glibc) Choose the above solution using '1' or cancel using 'c' [1/c] (c): c root@qemuarm:~# ####################### I did not add any repositories to zypper when I do these. Reproduce Steps: 1. bootup target with qemuarm sato/sdk image. 2. zypper search man and check the output. 3. download man-1.6f-r0.armv5te.rpm and man-dev-1.6f-r0.armv5te.rpm from http://autobuilder.yoctoproject.org/nightly/20110305-4/rpm/armv5te/, and copy them to target. 4. install man-1.6f-r0.armv5te.rpm with rpm command 4. zypper search man and check the output. 5. install man-dev-1.6f-r0.armv5te.rpm with rpm command. 6. zypper search man and check the output. 7. zypper rm man-dev and check the output. 8. zypper search man and check the output. 9. zypper rm man and check the output.
problem was found that .armv5te.rpm don't appear in "zypper search avahi". If change "arch = qemuarm" to "arch = armv5te" in zypp.conf, these files will be shown.
With the 20110318 build image, when I install package by zypper, there is a similar issue: There are 3 arch directories in qemuarm repository: all, armv5te, qemuarm. After I add this repo in target. Running command "zypper pa", it only list the packages which from qemuarm arch directory : ################### root@qemuarm:~# zypper pa Loading repository data... Reading installed packages... S | Repository | Name | Version | Arch --+------------+----------------+------------+-------- i | rpmrepo | base-files | 3.0.14-r67 | qemuarm | rpmrepo | base-files-dbg | 3.0.14-r67 | qemuarm i | rpmrepo | base-files-dev | 3.0.14-r67 | qemuarm | rpmrepo | base-files-doc | 3.0.14-r67 | qemuarm i | rpmrepo | formfactor | 0.0-r19 | qemuarm | rpmrepo | formfactor-dbg | 0.0-r19 | qemuarm i | rpmrepo | formfactor-dev | 0.0-r19 | qemuarm root@qemuarm:~# #################### And I can install/remove packages list above. If I want to install a package from armv5te directory, e.g man-1.6f-r0.armv5te.rpm, I can not search or install it. ############### root@qemuarm:~# zypper in man Loading repository data... Reading installed packages... 'man' not found in package names. Trying capabilities. No provider of 'man' found. Resolving package dependencies... Nothing to do. root@qemuarm:~# ############### If I change "arch = qemuarm" to "arch = armv5te" in zypp.conf, only packages from armv5te can be shown: ############### root@qemuarm:/etc/zypp# zypper pa Loading repository data... Reading installed packages... S | Repository | Name | Version | Arch --+------------+----------+-----------+-------- | rpmrepo | curl | 7.21.2-r1 | armv5te | rpmrepo | curl-doc | 7.21.2-r1 | armv5te root@qemuarm:~# ############### And I can not install packages from qemuarm arch directory. On qemumips, running command "zypper pa" can list all packages from 3 arch directories: ############## root@qemumips:~# zypper pa Loading repository data... Reading installed packages... S | Repository | Name | Version | Arch --+------------+----------------+--------------+--------- v | mipsrepo | base-files | 3.0.14-r65 | qemumips | mipsrepo | base-files-dbg | 3.0.14-r65 | qemumips v | mipsrepo | base-files-dev | 3.0.14-r65 | qemumips | mipsrepo | base-files-doc | 3.0.14-r65 | qemumips | mipsrepo | encodings | 1:1.0.4-r1.0 | all | mipsrepo | encodings-dbg | 1:1.0.4-r1.0 | all | mipsrepo | encodings-dev | 1:1.0.4-r1.0 | all | mipsrepo | man | 1.6f-r0 | mips | mipsrepo | man-dbg | 1.6f-r0 | mips | mipsrepo | man-dev | 1.6f-r0 | mips | mipsrepo | man-pages | 3.32-r1 | mips | mipsrepo | man-pages-dbg | 3.32-r1 | mips | mipsrepo | man-pages-dev | 3.32-r1 | mips root@qemumips:~# ###################
This matches my observation, and currently arm is the only known arch to have this problem.
The short answer is that there's some dependency between static global intializations across several compilation unit that causes some undefined behavior. The exact spot is at zypp/Repository.cc:32, following is the run path that actually initializes it: const Repository Repository::noRepository; -> zypp::Repository::Repository(); -> zypp::RepoInfo::RepoInfo(); -> zypp::RepoInfo::Impl::Impl(); -> zypp::repo::RepoVariablesUrlReplacer::RepoVariablesUrlReplacer(); -> zypp::repo::RepoVariablesStringReplacer::RepoVariablesStringReplacer(); The definition of the final node on the chain is at zypp/repo/RepoVariables.cc:26 --- RepoVariablesStringReplacer::RepoVariablesStringReplacer() { sysarch = Arch_empty; basearch = Arch_empty; } -- Where Arch_empty is defined in zypp/Arch.cc: -- const Arch Arch_empty ( IdString::Empty ); -- At this point, the initialization order of zypp::Repository::noRepository and zypp::Arch_empty is undefined (which is also referred to as the "static initialization order fiasco"), since they belong to different compilation units (read, .cc file). On x86, we are fortunate that Arch_empty is init'ed before noRepository, but on arm the order is reversed. When the constructor of RepoVariablesStringReplacer runs, Arch_empty is not constructed yet, and it immediately leads to undefined behavior. On g++ 4.5.0, this will result in default constructor of Arch, i.e. Arch::Arch() being called, and then ArchCompatSet::instance(), which leads to the pre-mature construction of the compatibility table. That's why zypper on arm fails.
The original issue is fixed together with bug 490. The new issue is now move to bug 938.
Verify the bug with 20110404 build, it is fixed. The commit number is f897723207b00b4c9dcdb43107891b7b82ce22f3