You can't paint over flaking paint. Doing so only adheres the new pait to the old paint, and since the old paint is flaking, so will your new paint.
You need to remove the flaking paint. Scraping is likely best, along with the appropriate safety gear (Lead approved face masks, lead approved filters for the shop vac, etc.)
If it's only going to stand for another 5 years, though, I'm not sure I'd worry about it too much--unless you have children playing in there.
In my experience in painting my own house over 50 years I only sand when necessary, that is when the paint is loose, or, the surface is glossy. I just repainted some trim on my house that has Semi-Gloss paint. And, I sanded it first. I did this to improve the adhesion of the new paint. But, most of my house has flat paint, and I never sand it unless I'm blending an area where I had to remove some loose paint.
Update, 11/14/13: I re-read this today, including all the posts. It's interesting to see the different opinions about this subject. No wonder you had a question after searching the net.
My take on this is that if you are a perfectionist, you'll decide to remove it all. If you're just painting to resell, you'll scrape the loose off and paint. If you're going to keep it and use common sense, you'll scrape, sand where you need to feather edges for aesthetics, and paint. That's assuming its flat paint. For glossy finishes, you really better sand it to ensure the new paint sticks permanently. Incidentally, I always clean before scraping with Tide and bleach solution and brush hooked to expandable pole, and sometimes with a power washer to quickly knock off loose paint. Also, after sanding, I blow off the sanded surfaces with a blower, or brush it with a big paintbrush, or wipe it with rubbing alcohol or water.
Recently I used the tool below to "sand" the loose paint off my deck before repainting and was very impressed with it's efficiency. I like how it gets down into the cracks between the paint and wood and smooths out the ridges, as well as how quickly its use is. You might want to pick one of these up and give it a try.
Finally, one last tip. You can always do a test by painting a small area, waiting several days, then trying to scrape it off. That's how I learned how important sanding is for glossy paint.
Best Answer
I usually lightly sand and use standard Sheetrock mud, after it is dry I sand again if I think this looks good I then use a can of spray texture and blend some new texture with the old, after the spray texture is dry and a fresh coat of paint when we’ll done you really won’t see the repair. Never tape off an area when using spray texture that makes lines that stand out after painting (one of the best DIY repairs I have seen was spoiled because they taped off the area instead of blending.