Hello,
Note: My solution only applies to those who have previously installed and/or upgraded OS X on another Mac, or on the same Mac you´re having issues with. You will also need a complete Time Machine backup. If you have, read on.
I was having this particular issue, and I was connected to WiFi and internet the whole time, but it didn´t make any difference. However, I solved it by using the Migration Assistant app, located in
/Applications/Tools
I had problems upgrading from Lion, because that´s the OS version I installed first, and that´s why the rescue partion got "stuck" on Lion as well - which ultimately resulted in the error message we all know.
But anyway - I opened up the Migration Assistant, and plugged in my external Time Machine drive.
I chose to transfer my user details, Documents, "Other Files" (which includes a "receipts" folder, with a register of almost everything I´ve downloaded from App Store, and that´s the important stuff I believe. Don´t take my word on it, I may be wrong).
Lastly I selected "Downloads", although I doubt that one made any significance 😀
With Firewire (this was on my oldest Macbook Pro), the whole deal took about 1 hour. Then I ran the installer for Yosemite (the one that previously resulted in the error message), and after a minor hiccup, everything went smooth from there.
Hope it helps someone.
Andreas 🙂