Added the IDE category and Eclipse Luna framework.

Hi,

this is the first pass, and isn't ready to merge yet.

To download Eclipse, we use a direct link to file which redirects to the best mirror. This link is accessible from the right sidebar at https://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/luna/R/eclipse-standard-luna-R-linux-gtk-x86_64.tar.gz and I think is unlikely to change, so it's safe to hard-code. The MD5 is fetched similarly. Since we don't need to parse anything, I just use the first hook (download_provider_page) to do everything.

This works properly as far as I can tell. What is missing:

* the CLI status indicator doesn't change from 0%. Although for me this doesn't work for Eclipse-ADT either. Status updates are sent though (this is handled in DownloadCenter).
* there are no tests (yet)
* there is no support for 32-bit (yet)

I'll be away for a few days before I can continue working on this. Comments welcome!
Le 24/09/2014 21:20, Tin Tvrtković a écrit :
>
> In udtc/frameworks/ide.py:
>
> > +                         description=_("Pure Eclipse Luna (4.4)"),
> > +                         category=category, only_on_archs=['i386', 'amd64'],
> > +                         download_page=None,
> > +                         dir_to_decompress_in_tarball='eclipse',
> > +                         desktop_filename='eclipse-luna.desktop',
> > +                         packages_requirements=['openjdk-7-jdk'])
> > +
> > +    def download_provider_page(self):
> > +        """First, we need to fetch the MD5, then kick off the proceedings.
> > +
> > +        This could actually be done in parallel, in a future version.
> > +        """
> > +        logger.debug("Preparing to download MD5.")
> > +
> > +        arch = platform.machine()
> > +        if arch == 'i386':
>
> I replied to this comment via email but looks like GitHub is having 
> none of it. Here's a copy/paste:
>
Same, I don't see yours on github, so replying in CCing you.
>
> Ugh, was going by 
> https://docs.python.org/3.4/library/platform.html#platform.machine, 
> their example shows 'i386'. Definitely needs some tests.
>
Yeah, that was my first thought as well. However, I did test with the 
ubuntu kernel, where we enable i686 extensions (so strictly speaking, 
i386 pure system aren't supported for a couple of years, knowing that 
they all ceased production since the end of the 90s), so that probably 
influence this value.
>
> What's get_current_arch(), Google is being unhelpful?
>
Yeah, normal that Google isn't helpful as it's in udtc/tools.py ;) 
Basically, I'm basing on debian arch naming convention spawning 
dpkg-architecture and storing it. Then, this value is used when enabling 
eventually multi-arch, using dpkg, and so on. That's what python3-apt is 
already calling, so we store the value and cache it (I don't think the 
architecture will change while udtc is running… Well, I hope not or we 
have a bigger issue ;))

Hoping that helps!
Cheers,
Didier