On Aug 8, 2013, at 3:56 AM, Jacek Konieczny wrote: > > Hi, > > I am building a system image for a PLD-based distribution using poldek. > It used to work well until I have upgraded my RPM from 4.5 to 5.4.12. > Now the packages are installed in wrong order, %post scripts fail and > the whole image build fails. > > poldek --verify=order gives a reasonable order: > > No loops -- OK > Installation order: > 0. FHS-2.3-35.aos1.i686 > 1. filesystem-4.0-11.aos1.i686 > 2. ldconfig-2.15-10.aos1.i686 > 3. libsepol-2.1.4-1.aos1.i686 > 4. libselinux-2.1.9-2.aos1.i686 > 5. setup-2.7.1-1.aos2.i686 > 6. pdksh-5.2.14-56.aos2.i686 > 7. glibc-2.15-10.aos1.i686 > 8. glibc-libcrypt-2.15-10.aos1.i686 > 9. SysVinit-tools-2.88-7.aos1.i686 > 10. zlib-1.2.7-1.aos1.i686 > 11. module-init-tools-3.16-4.aos1.i686 > 12. alsa-lib-1.0.25-1.aos1.i686 > 13. popt-1.16-1.aos1.i686 > 14. attr-2.4.46-1.aos1.i686 > 15. gmp-5.0.5-1.aos1.i686 > 16. libcap-libs-2.22-1.aos1.i686 > 17. libxcrypt-3.0.2-2.aos1.i686 > 18. make-3.81-1.aos2.i686 > 19. mawk-1.3.3-32.aos2.i686 > 20. cracklib-2.8.3-0.2.aos2.i686 > 21. cracklib-dicts-2.8.3-0.2.aos2.i686 > 22. gdbm-1.10-1.aos1.i686 > 23. sed-4.2.1-2.aos1.i686 > 24. pam-libs-1.1.5-7.aos2.i686 > 25. pam-1.1.5-7.aos2.i686 > 26. coreutils-8.16-1.aos1.i686 > [...] > 64. util-linux-2.21.1-1.aos4.i686 > 65. rc-scripts-0.4.5.4-2.aos1.i686 > > But the packages are installed in wrong order by rpm, so e.g. rc-scripts > %post fails, because rc-scripts is installed long before coreutils. > > I guess this could be caused by some dependency problems in my packages. > Poldek reports no loops. RPM 4.5 used to generate useful loop warnings > in case a dependency loop was detected (the message stated exactly what > packages are in the loop). The new RPM reports loops only when debug > output is enabled (-vv), but I am not able to get any useful > information from those messages: > > D: ========== tsorting packages (order, #predecessors, #succesors, > tree, Ldepth, Rbreadth) D: 0 0 287 1 0 0 > +FHS-2.3-35.aos1.i686 D: 1 0 0 3 0 1 > +basesystem-2.99-8.aos1.i686 D: 2 0 0 2 0 2 > +axeos-meta-nagios-vpbx-1.0-aos3.noarch D: 3 1 10 1 1 > 0 +dbus-dirs-1.6.0-1.aos1.i686 D: 4 1 2 1 1 1 > +dhcp-client-dirs-4.0.2-4.aos1.i686 D: 5 1 2 1 1 2 > +mibs-dirs-0.4.8-5.aos1.i686 D: 6 1 1 1 1 3 > +kernel-axeos-pbx-firmware-3.7.9-aos3.i686 D: 7 1 1 1 > 1 4 +axeos-lsp-lib-3.1.4.79-aos1.noarch D: 8 1 1 1 > 1 5 +axeos-package-data-target_dir-3.1.30001-aos1.noarch D: > 9 1 0 1 1 6 +busybox-static-1.19.3-1.aos4.i686 D: > 10 1 0 1 1 7 +dmidecode-2.8-1.aos3.i686 D: 11 > 1 2 1 2 0 +mibs-net-snmp-5.6.1-4.aos3.i686
What follows is a dependency LOOP with exactly the same information as before. > D: LOOP: > D: removing iproute2-3.4.0-1.aos2.i686 "Requires(auto): /bin/sh" from > tsort relations. D: removing pdksh-5.2.14-56.aos2.i686 > "Requires: /usr/share/man/man1" from tsort relations. D: removing > axeos-pbx-api-0.13-aos1.noarch "Requires: /etc/lighttpd/webapps.d" from > tsort relations. D: removing lighttpd-1.4.32-1.aos1.i686 > "Requires(pre): /bin/id" from tsort relations. D: removing > coreutils-8.16-1.aos1.i686 "Requires: /usr/share/locale/es/LC_MESSAGES" > from tsort relations. D: removing openssh-5.8p2-2.aos1.i686 "Requires: > pam >= 0.99.7.1" from tsort relations. D: removing > pam-1.1.5-7.aos2.i686 "Requires: /usr/share/locale/mr/LC_MESSAGES" from > tsort relations. D: removing perl-Dahdi-2.4.1-2.aos2.rel2.i686 > "Requires: dahdi-tools = 2.4.1-2.aos2.rel2" from tsort relations. D: > removing dahdi-tools-2.4.1-2.aos2.rel2.i686 "Requires(auto): /bin/bash" > from tsort relations. D: removing nagios-common-3.0.6-1.aos2.i686 > "Requires(pre): /usr/sbin/usermod" from tsort relations. D: removing > udev-197-4.aos1.i686 "Requires: udev-core = 1:197-4.aos1" from tsort > relations. D: removing udev-core-197-4.aos1.i686 > "Requires: /lib/udev/rules.d" from tsort relations. D: removing > device-mapper-2.02.95-10.aos2.i686 "Requires: /sbin" from tsort > relations. D: removing net-snmp-5.6.1-4.aos3.i686 "Requires(auto): > libnetsnmp.so.25" from tsort relations. D: removing > net-snmp-libs-5.6.1-4.aos3.i686 "Requires(auto): libnl.so.3" from tsort > relations. D: removing libnl-3.0-3.aos2.i686 "Requires(auto): > libc.so.6" from tsort relations. D: removing glibc-2.15-10.aos1.i686 > "Requires: /usr/share/man/fr/man5" from tsort relations. D: removing > nagios-nrpe-2.12-2.aos3.i686 "Requires(post): /sbin/chkconfig" from > tsort relations. D: removing chkconfig-1.3.20-0.4.aos1.i686 > "Requires: /usr/share/locale/uk/LC_MESSAGES" from tsort relations. D: > removing tcpdump-4.1.1-3.aos1.i686 "Requires: libpcap >= 2:1.0.0" from > tsort relations. D: removing libpcap-1.3.0-1.aos1.i686 > "Requires: /usr/share/man/man7" from tsort relations. D: removing > tar-1.26-1.aos1.i686 "Requires: /usr/share/man/pl/man1" from tsort > relations. D: removing rc-scripts-0.4.5.4-2.aos1.i686 "Requires(auto): > libglib-2.0.so.0" from tsort relations. D: removing > glib2-2.34.3-2.aos3.i686 "Requires: /usr/share/locale/am/LC_MESSAGES" > from tsort relations. D: removing axeos-pbx-snmp-0.3-aos1.i686 > "Requires: /lib/systemd/system" from tsort relations. D: removing > filesystem-4.0-11.aos1.i686 "Requires: /usr/share/man/pl" from tsort > relations. > > How should I read those? Where is the loop? > The easiest way to identify if a "fix" is functional is to use this macro to select exactly one edge to ignore in order to break the LOOP. # Relations between package names that cause dependency loops # with legacy packages that cannot be fixed. Relations are # specified as # p>q # where package p has a Requires: on something that package q Provides: # # XXX Note: that there cannot be any whitespace within the string "p>q", # and that both p and q are package names (i.e. no version/release). # %_dependency_whiteout_caos_core \ perl>perl-Filter \ pam>coreutils \ pam>initscripts \ glibc-common>glibc \ glibc>nscd \ filesystem>setup %_dependency_whiteout \ %{?_dependency_whiteout_caos_core} \ %{?_dependency_whiteout_system} \ %{nil} Note that "gibc-common>glibc" ensures that glibc-common is installed before glibc by reboving the edge in the dependency graph where glibc-common has Requires: glibc After identifying which edge to remove, then rearrange the packaging internals to avoid the dependency. E.g. combining 2 packages removes all edges by collapsing into a single package. Other rearrangements work the same way, making sure a Requirement: is matched from within some package internally. hth 73 de Jeff > Greets, > Jacek > _______________________________________________ > pld-devel-en mailing list > pld-devel-en@lists.pld-linux.org > http://lists.pld-linux.org/mailman/listinfo/pld-devel-en _______________________________________________ pld-devel-en mailing list pld-devel-en@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-devel-en