FS#9177 - Dependency cycles in core
Attached to Project:
Arch Linux
Opened by Jaroslaw Swierczynski (swiergot) - Saturday, 12 January 2008, 21:10 GMT
Last edited by Allan McRae (Allan) - Sunday, 15 March 2009, 03:57 GMT
Opened by Jaroslaw Swierczynski (swiergot) - Saturday, 12 January 2008, 21:10 GMT
Last edited by Allan McRae (Allan) - Sunday, 15 March 2009, 03:57 GMT
|
Details
Clearly dependencies are calculated incorrectly. First the
following appeared:
resolving dependencies... warning: dependency cycle detected: warning: bash will be installed before its glibc dependency warning: dependency cycle detected: warning: readline will be installed before its glibc dependency warning: dependency cycle detected: warning: ncurses will be installed before its glibc dependency warning: dependency cycle detected: warning: coreutils will be installed before its pam dependency warning: dependency cycle detected: warning: shadow will be installed before its pam dependency Here is a list of packages and commands they miss during their installation: glibc - init, cat, grep, awk, rm, uname filesystem - grep kernel26 - vercmp Now, I'm not sure but several minutes earlier when I installed chroot for the first time, using pacman 3.0, I think I did not see those errors. But at that time I installed only the base group (later also base-devel) so I'm not sure if the second time was pacman's fault or maybe it was because of the additional group. I'm about to try again with pacman 3.1 and only the base group. I'll let you know. |
This task depends upon
We really need to update this package.
I just installed only the base group and here is what I got:
warning: dependency cycle detected:
warning: bash will be installed before its glibc dependency
warning: dependency cycle detected:
warning: readline will be installed before its glibc dependency
warning: dependency cycle detected:
warning: ncurses will be installed before its glibc dependency
warning: dependency cycle detected:
warning: db will be installed before its coreutils dependency
Missing commands were the same as before plus:
gcc-libs - /bin/true
The only difference is that pacman 3.1 now explicitly warn about them.
And for the additional cycles caused by the scriptlet, this is simply unsolvable.
Consider the glibc case. As you said, glibc scritplet needs the following tools:
init, cat, grep, awk, rm, uname
And all these tools need glibc to be run, don't they?
I now remember there is a subtle difference in 3.1, here is the git commit log:
popen does NOT require /bin/sh in a subchroot
I appears that when chrooted, the /bin/sh used by popen is that of the parent
process. This is true until the process forks once chrooted, which we do not
want to do.
As such, this actually makes things nicer. We don't need a /bin/sh in a chroot
to run install scriptlets, and don't need to check for it in the root directory
So with pacman 3.0, until there was a working bin/sh inside the chroot, the scritplets were simply not run! Now, they are all run, but the first ones probably won't have all the tools they need, as you noticed.
Which is why you might want to do 2 passes, as it was recommended on arch wiki :
http://wiki.archlinux.org/index.php/Talk:Install_Arch_from_within_another_distro
- removed glibc dep from bash, coreutils, initscripts, gawk, grep, sysvinit,
- added awk, coreutils, filesystem, grep, initscripts, sysvinit dep to glibc,
- added grep dep to filesystem,
- added pacman dep to kernel26,
- added coreutils dep to gcc-libs.
mkarchroot (base base-devel sudo) ran without a single error. IMHO it makes more sense as this way the dependencies answer *real* needs. After all, dependencies are meant to help, not to cause troubles, they are means, not aims.
BTW, how does this affect Arch installation?
http://archlinux.org/pipermail/arch-general/2007-November/016158.html
However, none of us is a dev, so our opinions don't matter that much :)
What's the real purpose of this report? And what is the next step in resolving it?
warning: dependency cycle detected:
warning: bash will be installed before its glibc dependency
warning: dependency cycle detected:
warning: readline will be installed before its glibc dependency
warning: dependency cycle detected:
warning: ncurses will be installed before its glibc dependency
warning: dependency cycle detected:
warning: db will be installed before its coreutils dependency