Myth BOX
The home of guides for Myth TV, IPTables, and other linux based phenomena.
 
HD version
Preamble
Home
News
Spec
General guides
Partitioning
Installation
Firewall
Channel setup
Home automation
Product overview
Other
Useful links
SD version
Preamble
Functionality
Hardware
Software
Screenshots
Gallery
General guides
DVB Card
Myth TV
Broadband modem
Wireless network
Firewall
Network shares
Network IDS
Extra security
Streaming
Gensplash
EPIA specific guides
TV-Out cables
Audio/USB cables
Backplate
Wireless network
EPIA Kernel
Openchrome drivers
Surround sound
VPN
Online store
Prebuilt mythbox
Other
Useful links

Migrating from Xorg 6.8 to Xorg 7.2, MySQL 5.0, PHP 5.2, and the newer GCC 4.1

Given that upgrading Xorg to 7.2 is quite a large upgrade, it is worth upgrading GCC, MySQL, and PHP at the same time. The reason for this is that these packages will likely be a dependency on other required packages in Xorg 7.2 anyhow. Also, it makes sense to keep your system as up-to-date as possible - there's no point doing half of a job.
After the upgrade, you will be able to use the latest Unichrome driver included with Xorg 7.2. Personally, after the update I found my system to be much faster and well worth the effort.
  1. Begin by carrying out the MySQL update if necessary, so that you are running MySQL 5.0. Detailed instruction on how to backup and restore during the upgrade, as well as the upgrade itself, can be found here. However...
  2. After you have created a backup and before you re-import, do a find and replace of your SQL to add DEFAULT CHARSET=latin1 to each of the CREATE TABLE statements. This is to get around the fact that some of the MythTV tables have composite keys which are too big while using the UTF-8 character set.
  3. Now upgrade to PHP 5.2 if you aren't already running it. Details can be found here.
  4. Right, now to upgrade GCC. Execute: emerge --sync; emerge glibc gcc. Then follow the instructions on the GCC upgrading guide here. This will require you to empty the portage tree for system and world, and recompile. Ensure the steps on this guide are followed exactly, including the steps to emerge libstdc++-v3 and repeatedly doing a revdep-rebuild until all broken packages are fixed.
  5. Add xvmc dri curl USE flags to your /etc/make.conf. Also add the LIRC_DEVICES="devinput" entry to the /etc/make.conf for subsequent lirc updates if it isn't in there already.
  6. Now check what version of Xorg is currently installed after carrying out all of the above updates by using emerge -p x11-base/x11-xorg. If you don't have version 7.2, do the following: emerge x11-base/x11-xorg.
  7. Since we are updating our system, we might as well also update all existing dependent packages. Do this using emerge -DuNv system; emerge -DuNv world.
  8. Follow this up with executing revdep-rebuild until it completes successfully without any hickups.
  9. Now re-compile your current kernel with your new version of GCC and install it. This is required so that any kernel modules provided by packages use the same version of GCC as the kernel itself.
  10. Last but not least, ensure that you do a etc-update.
  11. Reboot and enjoy!

Troubleshooting:
  • When importing my MySQL dump, I get an error referring to the max_allowed_packet size being exceeded, but I'm overriding this option on the command line!
    I also had this problem - I'm not sure if this is a bug but the parameter passed on the command line seems to be ignored. Instead, increase the value of all max_allowed_packet references with /etc/mysql/my.cnf.
  • When I issue a revdep-rebuild it can't find the exact package versions and fails.
    If it fails the first time, execute revdep-rebuild -X. This will attempt to match to the closest package versions. If it still fails, you will have to emerge the packages manually.
  • I'm having trouble compiling ffmpeg - the latest unmasked version fails.
    This package has a dependency on imlib and imlib2 that isn't in the ebuild. Just emerge --oneshot imlib imlib2 and try recompiling ffmpeg again.
  • I get error messages while booting that refer to a read-only svcdir variable!
    For some reason the older splashutils package breaks baselayout. Just emerge --oneshot splashutils to solve the problem.
  • The revdep-rebuild script doesn't ever complete successfully.
    Look into the exact versions of the packages that are failing. If emerge can't find the corresponding ebuild, use equery depends <package_name_and_version>. If its an older package and nothing depends upon it, it can be safely unmerged.