Here is a straightforward method to fix the somewhat broken update-notifier in BT4 pre-final (for a more detailed problem description, please see above).
This Fix addresses the following issues:
- update-notifier in BT4 pre-final isn't usable as root user
- there's a local diversion of apt-check
- update-notifier won't work with KDE's autostart mechanism
Step 1: Remove the local diversion of apt-check
--- begin additional informationCode:# dpkg-divert --remove /usr/lib/update-notifier/apt-check
EDIT: After investigating this part for quite a long time, I'd like to share my findings, i.e. an explanation why there's a local diversion of apt-check in BT4 pre-final. This one was really hard to find out, but I finally got it. The local diversion of apt-check is due to the casper boot process in BT4 pre-final. There's a script at /usr/share/initramfs-tools/scripts/casper-bottom/31disable_update_notifier where all the magic takes place. Let me cite the interesting part of that script
This is the reason the local diversion gets re-introduced upon every reboot (this is a very important finding). To BT devs: If you'd decide to introduce my Fix to BT4 final, I'd like to encourage you "fixing" casper appropriately as well (I've done this now - see UPDATE2)# For GNOME, we divert away apt-check to avoid a regular 'apt-get update'
# equivalent in the live session. We want to run update-notifier for crash
# report handling.
chroot /root dpkg-divert --add --rename --quiet \
ln -s /bin/true /root/usr/lib/update-notifier/apt-check
--- end additional information
Step 2: Install update-notifier from BT4 repos to pull dependencies
Step 3: Download my custom update-notifier packages and install them utilizing dpkg (I bumped the version number to address the conflict with the original update-notifier from BT4 repos)Code:# apt-get install update-notifier
The update-notifier will be autostarted from now on with your KDE session - no user-interaction is required at all. Have fun!Code:# wget http://piranha.klashed.net/private/BT4-pre-final/update-notifier/update-notifier-common_0.71.8.1_all.deb # dpkg -i update-notifier-common_0.71.8.1_all.deb # wget http://piranha.klashed.net/private/BT4-pre-final/update-notifier/update-notifier_0.71.8.1_i386.deb # dpkg -i update-notifier_0.71.8.1_i386.deb
UPDATE: Community, I'm sorry, but there's still an issue with the local diversion of apt-check after rebooting the system (see additional information above). This update-notifier/casper combination seems to be a REAL beast - WTF? I made some progress here, but JFYI, this part is still not 100% solved. Will post updates as available though.
UPDATE2: After another round of investigating I come closer to the conclusion that I'm trying to solve an un-solvable problem (awesome, is it?). While this is just loud thinking, from my perspective it's as follows: The script /usr/share/initramfs-tools/scripts/casper-bottom/31disable_update_notifier (part of the casper deb package) is responsible for the re-creation of the local diversion of apt-check upon reboot. So far so good. Therefore I rebuilt casper without that script, BUT (and now it comes) as I'm working in a persistent LiveUSB environment this would never work out. Why? The script in question is an initramfs script and gets executed pretty early during the boot process - even too early for the aufs overlay to show up (that's my current estimation), thus an upgrade to a modified casper deb package without the initramfs script doesn't help too much to get rid of the local diversion of apt-check - at least not in a live environment (not without rebuilding the ISO). While this is all speculation at this point, I ASSUME that it COULD work (install a modified casper deb package) in a harddrive installation environment though. Interested parties could try this kind of Fix if desired - modified casper deb packages are uploaded already
If this works out (please tell me if you tried it - I would obviously be damn interested in the outcome) you're a lucky guy as you (most likely) reached the long-awaited end of the update-notifier Fix (cannot verify this though - no harddrive installation available).Code:# wget http://piranha.klashed.net/private/BT4-pre-final/casper/ubiquity-casper_1.152.1_all.deb # dpkg -i ubiquity-casper_1.152.1_all.deb # wget http://piranha.klashed.net/private/BT4-pre-final/casper/casper_1.152.1_i386.deb # dpkg -i casper_1.152.1_i386.deb
Another ASSUMPTION in regard of a harddrive installation would be that you don't have to deal with the re-creation of the local diversion of apt-check upon reboot at all as casper is just part of a Live environment. Please be patient with me - I just have no harddrive installation available.
I'm focusing on an init script solution now - be patient and watch out for UPDATE3 (hopefully the last one)
I'd appreciate very much if that Fix would be considered by BT devs for BT4 final - if you'd decide to do so, I'd be happy to provide the particular changes to the update-notifier sourcecode and explain these if desired. Let me know!