Friday, May 27, 2011

KDE 4.6.3 Will Land on Debian Unstable Within a Day or Two

For all those who are waiting for KDE 4.6.3 in unstable (sid), it will be available within this week. Since this is an upgrade 4.4 to 4.6, where 4.5 was completely skipped, and KDE is packaged in a different way now than the previous releases, expect some rough times when upgrading.

Said that, things should not be too tough since several people have already taken this upgrade path qt-kde.debian.net package maintainers might have ironed out all the glitches by now.

I hope the my long awaited kdevelop 4.2 will also be made available with this release.

Please read this before upgrading. I hope my previous experience on upgrading to 4.6.2 via qt-kde would also be useful for anyone  planning for this upgrade.

Note: KDE 4.7 beta1 has been released by the upstream meanwhile.

Sunday, May 15, 2011

Upgrade to Debian KDE 4.6.2 - Issues and Solution

I wanted to upgrade my PC to KDE 4.6.2. It had 4.5.x and sid. qt-kde.debian.net was enabled, and I knew upgrading is not going to be a tough time since so many people have reported that to be smoother than expected.

So, feeling pretty confident, and not being upgraded for 3 months, I just issued the two magical commands.
apt-get update; apt-get dist-upgrade
The upgrade did not go so smooth, it stopped at a certain point reporting some broken pacakages. Luckily it hinted that 'apt-get -f install' may do the trick. So, I followed the hint, and no errors reported after that though I noticed that some packages (konqueror, dolphin, etc) are held back without upgrading. I rebooted my PC as it was upgraded, and was very excited to log into the the new 4.6.2. To my surprise, the login manager did not list KDE as an available session. Only Default, Failsafe, and Fluxbox were listed.

Being disappointed, did some searching and found out that the qt-kde.debian.org repository explicitly mentions not to do what I exactly did above. So, the command I should have given, according to the site is
apt-get -t experimental-snapshots dist-upgrade and NOT apt-get dist-upgrade
 So it was I, being foolish and blind, messed up the system. Now, I tried to remove and re-install kdm suspecting that it might fix the mess. After removing it, it refused to re-install due to broken dependencies. I figured out a newer version was available in the official experimental repository. So, I temporarily enabled it and got kdm installed.

After beating around the bush for an hour, I logged into Debian IRC and asked for some help. My question was exactly which package should be properly configured to get KDE listed in my login manager. MoDaX answered it, and he pointed me to focus on getting kde-standard working. I knew it was a subset of kde-full. So, I decided to focus on getting kde-full installed properly.

I did not want to jumble all the repositories, so disabled the official experimental repository. Then tried the below.
apt-get install -t experimental-snapshots kde-full
 I was expecting to see some broken packages to be reported, and prepared myself for some troubleshooting. But, to my surprise, no broken packages were reported. The process went just fine. And I finally was able to login to KDE 4.6.2 without any issues.

The point is, if I just had read the release announcement before upgrading and given the correct command, I could have got it up and running without all these issues.

I hope someone who does/about to do the same mistake may find this experience useful in someway.

Wednesday, May 11, 2011

To Wait for KDE 4.6 on Debian or Not To Wait?

As being waiting 4.6 to arrive in the official debian repositories, I became pretty curious and tried it in Ubuntu (Installed Ubuntu first, then installed kubuntu-desktop and kde-full).

As I  have seen many Ubuntu KDE users' comments in the forums, I thought of giving it a try, even though my presumption is Kubuntu messes up KDE.

As I am using debian wheezy, I am still in kdevelop 4.0.1. I did not know how to get all phpunit related stuff working in kdevelop. $this->assertions are not popped up by auto-completion. All phpunit related functions are underlined in wavy red. I don't mind it much and keep on using kdevelop 4.0.1. So, my very first try, after installing, was kdevelop 4.2.

Meanwhile, I got a solution for the above from Milian. He says, we can workaround by simply creating a symlink for PHPUnit under the project directory. I jump started by creating the symlink and opening a php project. kdevelop 4.2 in Ubuntu scanned and indexed the project pretty quickly, but alas after reaching 100% of scanning it throws an exception and exits. I tried it multiple times, it is repeatable. I tried the same in debian with kdevelop 4.0.1. It took more time for indexing and scanning, but it did not break. (Although the wavy underlines  are now gone and some unit testing related methods are listed, none of the assertions are still not popped up by auto-completion. I would attribute that to kdevelop rather than debian, as I know there had been some issues with auto-completion which were fixed in later releases)

So, my first expectation broken, I continued with using the system. And within two hours I saw the system breaking at least 4 times. Rekonq, and Konqueror are breaking miserably as of now.

I just made my mind that waiting for 4.6 in debian is worth, rather than hurrying for something else. Let those debian developers take their time and come up with something usable. May Allah bless them.

Update:  I upgraded my debian sid to 4.6.2 (using qt-kde.debian.net repository) and using it for 2 days. I have enabled desktop search (nepomuk and strigi) and desktop effects. No single crash so far. That's why I place my trust on debian than Kubuntu when it comes to debian.

Configuring PHPUnit with XAMPP in Windows

Installing and configuring phpunit is a trivial task in Linux environment. If you are a debian/Ubuntu user, just 'sudo apt-get install phpunit' will install it. If the installation reports any php extension as missing try 'sudo apt-get install php5-theExtensionThatWasMissing'.  It is as simple as that.

But getting it configured it in XAMPP in Windows environment involves some additional complexities. The reasons are
1. It comes with phpunit already installed which is 2.x.y. It may take some time to realize that this is not the latest phpunit, though this is the latest XAMPP
2. pear -V will show that it is 1.7.2 whereas 1.9.1 or higher is needed to install the latest phpunit. This is the first and foremost task.

If you have multiple php versions running, sorting out any path related issues before proceeding will save a lot of hardships and unnecessary confusions.



Steps to Install PHPUnit:
I am going to write down the steps that I had to follow to get it installed in my laptop.

1. cd c:\xampp\php
2. pear upgrade pear
The above command gave the following error
ERROR: failed to mkdir C:\php\pear\docs\Archive_Tar\docs
ERROR: unable to unpack C:\Users\Home539\AppData\Local\Temp\pear\download\Structures_Graph-1.0.4.tgz
ERROR: failed to mkdir C:\php\pear\docs\PEAR
3. mkdir c:\php
4. pear upgrade pear (again)
It upgraded. Now, the version is 1.9.2
Important: If this is not successful, there is no point in continuing further in this direction. If this step is blocking and could not continue, try some alternatives. I have listed some below.
a. Try installing pear freshly. Download and save this as  go-pear.php under c:\xampp\php and run 'php go-pear.php' from there. This should work.
b. Consider installing phpunit without pear as the final option if nothing works

5. Followed the commands in the official site. But, instead of  'pear install phpunit/PHPUnit' execute 'pear install --alldeps phpunit/PHPUnit'
This should install phpunit without any issues. phpunit --version now shows 3.5.13 now in my machine.

It is also recommended to enable xdebug (required for code coverage generation) and curl.

Enabling cURL:
1. Remove ';' from extension=php_curl.dll in php.ini (uncomment)
2. Ensure that  ssleay32.dll and libeay32.dll are in Windows/system32.(copy these from c:\xampp\php to windows\system32)
3. Copy php_curl.dll into Windows\System32 as well.(copy this from c:\xampp\php\ext to windows\system32)

Enabling XDebug:
1. Find the section [XDebug] in php.ini
2. Uncomment the following line (remove ; from the beginning of the line)
zend_extension = "C:\xampp\php\ext\php_xdebug.dll"
3. Copy php_xdebug.dll into Windows\System32 as well.(copy this from c:\xampp\php\ext to windows\system32)

Note: Since XDebug is configured as a zend_extension in the above section, we need to make sure that it is not loaded as a dynamic extension. So, find and comment the following line, if it is their.
extension=php_xdebug.dll

Note: If your Windows is 64 bit, you need to copy the dlls to Windows/SysWOW64 Folder




Tuesday, May 3, 2011

KDE 4.6.2 Has Landed on Debian Experimental

The Debina KDE community was anticipating 4.6.2 in one of the official repositories in April. Though the release was expected in the official repositories, it made its way to the semi-official qt-kde.debian.net.

I just had a check and found that 4.6.2 is in the official Experimental repository today. kdebindings has not been packaged yet. This means it might take some more time for the release to reach unstable (sid) and testing (wheezy) repositories.

Update: Updating to qt-kde.debian.net is a stabler option than the official Experimental. As per the sources, debian Experimental and qt-kde.debian.net are almost the same but the latter may contain more packages. qt-kde.debian.net also seems more active than the Experimental. As we are expecting KDE 4.6.3 within this week, we can expect that to reach unstable (sid) rather than 4.6.2.