FS#20165 - Add mkinitcpio to SyncFirst in pacman.conf
Attached to Project:
Pacman
Opened by Tomas Mudrunka (harvie) - Tuesday, 13 July 2010, 16:53 GMT
Last edited by Thomas Bächler (brain0) - Wednesday, 18 August 2010, 08:54 GMT
Opened by Tomas Mudrunka (harvie) - Tuesday, 13 July 2010, 16:53 GMT
Last edited by Thomas Bächler (brain0) - Wednesday, 18 August 2010, 08:54 GMT
|
Details
Summary and Info:
-SyncFirst = pacman +SyncFirst = pacman mkinitcpio When mkinitcpio and kernel26 are updated at the same time, it seems to be good idea to sync mkinitcpio first before using it to update kernel26. If i will have old mkinitcpio it CAN make some unexpected troubles a make both kernel26 and kernel26 fallback unbootable... |
This task depends upon
Closed by Thomas Bächler (brain0)
Wednesday, 18 August 2010, 08:54 GMT
Reason for closing: Won't implement
Additional comments about closing: Wait for pacman hooks support.
Wednesday, 18 August 2010, 08:54 GMT
Reason for closing: Won't implement
Additional comments about closing: Wait for pacman hooks support.
A proper solution would be to make it possible to delay certain post_install tasks to the end of the install process, after all packages have been upgraded - however, no work has been done in that direction.
Repository : core
Name : kernel26
...
Depends On : coreutils linux-firmware module-init-tools
mkinitcpio>=0.5.20
mkinitcpio should always install first if both that and kernel26 are in the same transaction.
> pacman -S kernel26 mkinitcpio
warning: kernel26-2.6.34.1-1 is up to date -- reinstalling
warning: mkinitcpio-0.6.7-1 is up to date -- reinstalling
resolving dependencies...
looking for inter-conflicts...
Targets (2): mkinitcpio-0.6.7-1 kernel26-2.6.34.1-1
Total Download Size: 0.00 MB
Total Installed Size: 109.44 MB
Proceed with installation? [Y/n] n
So this appears to be working as it should...
In the past with klibc this was even worse ... I have actually not seen any of these problems since mkinitcpio 0.6, but I still like my proposal. On critical machines, I still run mkinitcpio manually after -Syu has finished, just to be safe.
harvie, have you actually had such a problem recently?
if test -d "$dir"; then
for script in "$dir"/*; do
test -x "$script" && "$script"
done
fi
imho there should be also some prototypes for frequently hooked operations... simplest eg.:
restart_service() {
/etc/rc.d/"$1" restart;
}
and some deduplication, so one service will not be restarted twice.
most hated feature is reloading icon database each time some desktop app is installed (several times during one transaction).
this can be done using three methods:
1.)
echo update-desktop-database >> hooks/dedup;
echo update-desktop-database >> hooks/dedup;
echo update-desktop-database >> hooks/dedup;
cat hooks/dedup | sort -u | bash
rm hooks/dedup
2.)
echo update-desktop-database > hooks/update-desktop-database
echo update-desktop-database > hooks/update-desktop-database
echo update-desktop-database > hooks/update-desktop-database
run-hooks
rm hooks/*
3.) using some hash array...
what means to add error into pacman.conf? there is some error message detection system? i have anything similar in my pacman.conf...
(if you are now familiar with solving this in pacman.conf)
The only way this can be fixed is when we implement hooks. It only has a rough design document so far... (http://wiki.archlinux.org/index.php/User:Allan/Pacman_Hooks)
>
>
FS#20165- Add mkinitcpio to SyncFirst in pacman.conf> User who did this - Allan McRae (Allan)
>
> Reason for denial:
> kernel26 depends on mkinitcpio so a new mkinitcpio is always installed before kernel26.
Well. so why initrd wasn't build properly at the first try (but second performed well)? maybe some of mkinitcpio hooks wasn't ready during the upgrade... how can we handle this?
Maybe mkinitcpio should not be in SyncFirst, but kernel26 should be in "SyncLast" (which is currently nonexistent feature :-)