<div dir="ltr">Hi,<div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><span style="font-size:12.8px">[1]: </span><a href="https://github.com/Aallam/debian_google-android-platform-installers/commit/00d725ba57670d3c2730f8c5b17e5e6384118f19#commitcomment-18311035" rel="noreferrer" style="font-size:12.8px">https://github.com/Aallam/debian_google-android-platform-installers/commit/00d725ba57670d3c2730f8c5b17e5e6384118f19#commitcomment-18311035</a></blockquote><div><br></div><div>For this one, my first intuition was indeed to make one single `templates` file for them all, but that was not possible because when I create a single templates file, only the first package uses it, the other package does not use it and the error message is something like: "templates file is not found", so was forced to make a corresponding <package>.templates to every <package>.config</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><br style="font-size:12.8px"><span style="font-size:12.8px">[2]: </span><a href="https://github.com/Aallam/debian_google-android-platform-installers/commit/00d725ba57670d3c2730f8c5b17e5e6384118f19#commitcomment-18311048" rel="noreferrer" style="font-size:12.8px">https://github.com/Aallam/debian_google-android-platform-installers/commit/00d725ba57670d3c2730f8c5b17e5e6384118f19#commitcomment-18311048</a></blockquote><div><br></div><div>Here there is two risks/problems why I've done it like this:</div><div>1-  the platform zip contains always a folder with a different name than the wanted one (for example for platform-24 zip have file android-N and but in the install folder it should be android-24, for platform-23 it's android-5.1.1.. install folder should be android-23 and so on), so if I unzip directly there, it must be `mv` anyway.</div><div>2- 2nd this is: if it must be mv anyway, why not do it in the cache folder just in case, for example, the unzipping is interrupted (ctrl+c), or any other issue, with unzipping in the cache, and mv only when the unzipping is complete, I make sure to have a folder with all correct files.</div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><span style="font-size:12.8px">What I thought was the script could be for us developers</span></blockquote><div><br></div><div>I think this may be more reasonable and easy to do, but we may have some small issues (for example, platform-24_r01.zip after unzipping the folder name is android-N, how can you get this information ?  (not available in the XML, and available for versions <= 23)</div><div><br></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><i>Mouaad Aallam</i></div></div></div>
<br><div class="gmail_quote">On Wed, Jul 20, 2016 at 5:44 PM, Chirayu Desai <span dir="ltr"><<a href="mailto:chirayudesai1@gmail.com" target="_blank">chirayudesai1@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<span class=""><br>
On Wed, Jul 20, 2016 at 7:43 PM, Mouaad Aallam <<a href="mailto:mouaad@aallam.com">mouaad@aallam.com</a>> wrote:<br>
> Hello<br>
><br>
>> I left a few comments on the commit [1].<br>
>> This could be less hardcoded, and a bit more generic.<br>
>> You could also create and put some templates like<br>
>> google-android-platform-N-installer.postinst, with some variables<br>
>> inside the file. So to add a new version we could just run sed on<br>
>> those and replace the values, basically make it easier to script this<br>
><br>
><br>
> Yes, thank you, I've checked your comments :)<br>
> I've taken them into consideration and I've pushed to the git to fix some<br>
> things.[1]<br>
</span>Thanks, it looks like most of them have been addressed.<br>
<br>
What do you think about [1], and [2]?<br>
<br>
[1]: <a href="https://github.com/Aallam/debian_google-android-platform-installers/commit/00d725ba57670d3c2730f8c5b17e5e6384118f19#commitcomment-18311035" rel="noreferrer" target="_blank">https://github.com/Aallam/debian_google-android-platform-installers/commit/00d725ba57670d3c2730f8c5b17e5e6384118f19#commitcomment-18311035</a><br>
[2]: <a href="https://github.com/Aallam/debian_google-android-platform-installers/commit/00d725ba57670d3c2730f8c5b17e5e6384118f19#commitcomment-18311048" rel="noreferrer" target="_blank">https://github.com/Aallam/debian_google-android-platform-installers/commit/00d725ba57670d3c2730f8c5b17e5e6384118f19#commitcomment-18311048</a><br>
<br>
There's also the case of trying to use the substvars for the<br>
description as well, to avoid copy pasting that big glob of test<br>
everytime.<br>
<span class="">> And yes, the finality is to make a generic package as much as possible, the<br>
> package was just a scratch ;)<br>
><br>
>> I could make the script, given I'll be already making more for the<br>
>> upstream updates / uploads.<br>
>><br>
>> Or should I let him get the script done as well?<br>
><br>
><br>
> I already had the idea of making a parsing script but didn't know if it is<br>
> "acceptable" to do so for debian packages because the package will be<br>
> dependent on google's XML file, but now that's I see that it is acceptable I<br>
> can do it (for the package I'm working on at least).<br>
</span>What I thought was the script could be for us developers, put in a<br>
scripts repo (I already have one locally for the upstream update<br>
script), and we would run it to generate most of the google-* source<br>
packages as needed. Which is why I asked you to add templates. It<br>
would make life easier than trying to add new versions manually (which<br>
would be error prone as well), and we can do any final changes /<br>
commit the update manually.<br>
<br>
I didn't think about putting the script itself on the source package<br>
because that might make it more complex, and would also make the<br>
script more complex - the above would be a simple xml parser that<br>
would spit out a few values.<br>
I could do it in python, as I haven't ever used or learnt perl. What<br>
do you think?<br>
<br>
And I would say that it should be generic, just take the xml and print<br>
out a list of everything we care about (i.e. platforms greater than a<br>
set version, matching sdk docs, and so on).<br>
<div class="HOEnZb"><div class="h5">><br>
> [1]: <a href="https://github.com/Aallam/debian_google-android-platform-installers" rel="noreferrer" target="_blank">https://github.com/Aallam/debian_google-android-platform-installers</a><br>
><br>
> Mouaad Aallam<br>
><br>
> On Wed, Jul 20, 2016 at 7:54 AM, Chirayu Desai <<a href="mailto:chirayudesai1@gmail.com">chirayudesai1@gmail.com</a>><br>
> wrote:<br>
>><br>
>> Hi,<br>
>><br>
>> I left a few comments on the commit [1].<br>
>> This could be less hardcoded, and a bit more generic.<br>
>> You could also create and put some templates like<br>
>> google-android-platform-N-installer.postinst, with some variables<br>
>> inside the file. So to add a new version we could just run sed on<br>
>> those and replace the values, basically make it easier to script this.<br>
>><br>
>> [1]:<br>
>> <a href="https://github.com/Aallam/debian_google-android-platform-installers/commit/00d725ba57670d3c2730f8c5b17e5e6384118f19" rel="noreferrer" target="_blank">https://github.com/Aallam/debian_google-android-platform-installers/commit/00d725ba57670d3c2730f8c5b17e5e6384118f19</a><br>
>><br>
>> On Wed, Jul 20, 2016 at 3:34 AM, Mouaad Aallam <<a href="mailto:mouaad@aallam.com">mouaad@aallam.com</a>> wrote:<br>
>> > Here is a start for the package android-google-platform-installers[1]<br>
>> > which<br>
>> > generate installers for platform 24, 23 and 22 (I think it's easy to add<br>
>> > older platforms). I will try to improve this even more following the<br>
>> > suggestions and discussions we had.<br>
>> ><br>
>> > [1]: <a href="https://github.com/Aallam/debian_google-android-platform-installers" rel="noreferrer" target="_blank">https://github.com/Aallam/debian_google-android-platform-installers</a><br>
>> ><br>
>> > Mouaad Aallam<br>
>> ><br>
>> > On Tue, Jul 19, 2016 at 9:59 PM, Hans-Christoph Steiner <<a href="mailto:hans@at.or.at">hans@at.or.at</a>><br>
>> > wrote:<br>
>> >><br>
>> >><br>
>> >> I think making the source package use a python or perl script to parse<br>
>> >> the Google repo XML makes sense.  Then we can just build the source<br>
>> >> package, and it would generate all of the latest binary packages<br>
>> >> needed.<br>
>> I could make the script, given I'll be already making more for the<br>
>> upstream updates / uploads.<br>
>> >><br>
>> >> I'll let Mouadd take the lead on this one since he's been doing the<br>
>> >> work<br>
>> >> on it so far.<br>
>> Or should I let him get the script done as well?<br>
>> I tried to do a bit of the generic packaging myself yesterday [2], and<br>
>> it was useful in understanding how this kind of package works. I'll<br>
>> let him take over though (and try to do code review), and focus on the<br>
>> scripts.<br>
>><br>
>> [2]:<br>
>> <a href="https://gitlab.com/cde/debian_android-tools_google-android-platform-installer" rel="noreferrer" target="_blank">https://gitlab.com/cde/debian_android-tools_google-android-platform-installer</a><br>
>> >><br>
>> >> .hc<br>
>> >><br>
>> >> Chirayu Desai:<br>
>> >> > On Mon, Jul 18, 2016 at 8:40 PM, Hans-Christoph Steiner<br>
>> >> > <<a href="mailto:hans@at.or.at">hans@at.or.at</a>><br>
>> >> > wrote:<br>
>> >> >><br>
>> >> >> I thought about enabling `android update sdk` in the Debian<br>
>> >> >> package's<br>
>> >> >> version of `android`, but now I'm thinking that it would be better<br>
>> >> >> to<br>
>> >> >> do<br>
>> >> >> it all with Debian packages.  I think a primary use case of the<br>
>> >> >> Debian<br>
>> >> >> packages will be to set up a system to build Android apps in an<br>
>> >> >> automated way (e.g. via Chef, Puppet, Ansible, CI script, etc).<br>
>> >> >> It'll<br>
>> >> >> be a lot easier to do that if all of the components of the SDK can<br>
>> >> >> be<br>
>> >> >> directly `apt-get install`ed.  `android update sdk` is a really<br>
>> >> >> crappy<br>
>> >> >> package manager, and I've spent quite a bit of time fighting with it<br>
>> >> >> when automating things like CI builds.<br>
>> >> > I would agree here. It shouldn't take long for us to add the newer<br>
>> >> > versions to the contrib packages (for future releases)<br>
>> >> >><br>
>> >> >> I think it could make a lot of sense to have a single<br>
>> >> >> google-android-platform-installer source package that then makes<br>
>> >> >> multiple google-android-platform-*-installer binary pacakges for<br>
>> >> >> each<br>
>> >> >> platform number.  It might even make sense to have a single source<br>
>> >> >> package for all of these installer binary packages.  The source<br>
>> >> >> package<br>
>> >> >> would just contain basically a template, then the build process<br>
>> >> >> would<br>
>> >> >> generate lots of binary packages based on replacing things in the<br>
>> >> >> template using a list of values for all of the Google binary<br>
>> >> >> packages<br>
>> >> >> that we want to support, e.g.<br>
>> >> >><br>
>> >> >> * docs<br>
>> >> >> * platform-*<br>
>> >> >> * sys_img-*<br>
>> >> >> * build-tools-*<br>
>> >> ><br>
>> >> > I'm working on creating the google-android-platform-installer package<br>
>> >> > right now.<br>
>> >> > Experimenting reading up a bit on how to best use templates, and<br>
>> >> > things like deb-substvars.<br>
>> >> > A single source package for all the google binary packages could work<br>
>> >> > too. Maybe we could even have something which parses the repository<br>
>> >> > xml, and creates packages for things we want. Not sure if we want to<br>
>> >> > do XML parsing though. If we do though, I have some past experience<br>
>> >> > with python which could be helpful.<br>
>> >> ><br>
>> >> > I can continue with the platform-installer package, or get started<br>
>> >> > with a generic google binary downloader, whatever suits us the best.<br>
>> >> ><br>
>> >> >><br>
>> >> >> .hc<br>
>> >> >><br>
>> >> >> Chirayu Desai:<br>
>> >> >>> Hi,<br>
>> >> >>><br>
>> >> >>> This idea sounds good, and should make us able to have an android<br>
>> >> >>> app<br>
>> >> >>> building shortly.<br>
>> >> >>> The "proper" SDK could come later, lots of work to do there still.<br>
>> >> >>><br>
>> >> >>> There's one thing which has discussed at DebConf (informal<br>
>> >> >>> conversation at some random place) - what we could do is use the<br>
>> >> >>> components we have building and working currently right now, and<br>
>> >> >>> then<br>
>> >> >>> grab the rest from google / use contrib packages. However, it might<br>
>> >> >>> be<br>
>> >> >>> tricky to combine files from multiple packages, I hadn't really<br>
>> >> >>> thought about that before. Still putting this thought here, if it<br>
>> >> >>> turns out to be helpful.<br>
>> >> >>><br>
>> >> >>> One more thing, do we want to have some sort of integration with<br>
>> >> >>> the<br>
>> >> >>> SDK Manager ('android' command) and debian packages? I.e., user can<br>
>> >> >>> pick SDK platform 23 and get the platform package Mouaad created<br>
>> >> >>> installed. If he picks emulator, he can get the emulator images<br>
>> >> >>> downloaded directly from Google if they're not in a debian package.<br>
>> >> >>> It<br>
>> >> >>> would involve some code changes though, but I'm not sure exactly<br>
>> >> >>> how<br>
>> >> >>> much work would that be, and if it would be worth it to do that<br>
>> >> >>> right<br>
>> >> >>> now for the installer packages.<br>
>> >> >>> It could still be useful later though, when we have platform<br>
>> >> >>> packages<br>
>> >> >>> built from source.<br>
>> >> >>> And either way, part of this was discussed earlier as well, where<br>
>> >> >>> the<br>
>> >> >>> user should still be able to install his own packages / add custom<br>
>> >> >>> stuff / install the missing packages from Google easily in a way<br>
>> >> >>> that<br>
>> >> >>> works with the existing debian packages.<br>
>> >> >>><br>
>> >> >>> I'm just getting back to work after the DebConf trip, lots of<br>
>> >> >>> catching<br>
>> >> >>> up to do - I did read all of the e-mails when there, just didn't<br>
>> >> >>> get a<br>
>> >> >>> chance to send a proper reply until today.<br>
>> >> >>><br>
>> >> >>> Regards,<br>
>> >> >>> Chirayu Desai<br>
>> >> >>><br>
>> >> >>> On Tue, Jul 12, 2016 at 11:15 PM, Mouaad Aallam <<a href="mailto:mouaad@aallam.com">mouaad@aallam.com</a>><br>
>> >> >>> wrote:<br>
>> >> >>>> A start package for Google Android SDK Platform 24[1]<br>
>> >> >>>><br>
>> >> >>>> [1]:<br>
>> >> >>>><br>
>> >> >>>> <a href="https://github.com/Aallam/debian_google-android-platform-24-installer" rel="noreferrer" target="_blank">https://github.com/Aallam/debian_google-android-platform-24-installer</a><br>
>> >> >>>><br>
>> >> >>>> Mouaad Aallam<br>
>> >> >>>><br>
>> >> >>>> On Mon, Jul 11, 2016 at 4:29 PM, Mouaad Aallam <<a href="mailto:mouaad@aallam.com">mouaad@aallam.com</a>><br>
>> >> >>>> wrote:<br>
>> >> >>>>>><br>
>> >> >>>>>> This approach would make the packaging simpler, but I think we<br>
>> >> >>>>>> would<br>
>> >> >>>>>> provide a much better experience to users who are installing the<br>
>> >> >>>>>> platforms if there was one Debian package per platform package.<br>
>> >> >>>>>> That's<br>
>> >> >>>>>> how the platforms are represented using the `android list sdk`<br>
>> >> >>>>>> command<br>
>> >> >>>>>> line tool, and the `android` GUI package installer.  That's what<br>
>> >> >>>>>> Android<br>
>> >> >>>>>> devs are used to.<br>
>> >> >>>>>><br>
>> >> >>>>>> I think it also provides a more Debian-ish experience, I need X<br>
>> >> >>>>>> so<br>
>> >> >>>>>> I do<br>
>> >> >>>>>> `apt-get install X`.<br>
>> >> >>>>><br>
>> >> >>>>><br>
>> >> >>>>> Alright then, that was just an idea I had :D, let's do it the way<br>
>> >> >>>>> you just<br>
>> >> >>>>> discribed then.<br>
>> >> >>>><br>
>> >> >>>><br>
>> >> >>>><br>
>> >> >>>> _______________________________________________<br>
>> >> >>>> Android-tools-devel mailing list<br>
>> >> >>>> <a href="mailto:Android-tools-devel@lists.alioth.debian.org">Android-tools-devel@lists.alioth.debian.org</a><br>
>> >> >>>><br>
>> >> >>>><br>
>> >> >>>> <a href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/android-tools-devel" rel="noreferrer" target="_blank">http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/android-tools-devel</a><br>
>> >> >>><br>
>> >> >>> _______________________________________________<br>
>> >> >>> Android-tools-devel mailing list<br>
>> >> >>> <a href="mailto:Android-tools-devel@lists.alioth.debian.org">Android-tools-devel@lists.alioth.debian.org</a><br>
>> >> >>><br>
>> >> >>><br>
>> >> >>> <a href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/android-tools-devel" rel="noreferrer" target="_blank">http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/android-tools-devel</a><br>
>> >> >>><br>
>> >> >><br>
>> >> >> _______________________________________________<br>
>> >> >> Android-tools-devel mailing list<br>
>> >> >> <a href="mailto:Android-tools-devel@lists.alioth.debian.org">Android-tools-devel@lists.alioth.debian.org</a><br>
>> >> >><br>
>> >> >><br>
>> >> >> <a href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/android-tools-devel" rel="noreferrer" target="_blank">http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/android-tools-devel</a><br>
>> >> ><br>
>> >> > _______________________________________________<br>
>> >> > Android-tools-devel mailing list<br>
>> >> > <a href="mailto:Android-tools-devel@lists.alioth.debian.org">Android-tools-devel@lists.alioth.debian.org</a><br>
>> >> ><br>
>> >> ><br>
>> >> > <a href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/android-tools-devel" rel="noreferrer" target="_blank">http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/android-tools-devel</a><br>
>> >> ><br>
>> >><br>
>> >> _______________________________________________<br>
>> >> Android-tools-devel mailing list<br>
>> >> <a href="mailto:Android-tools-devel@lists.alioth.debian.org">Android-tools-devel@lists.alioth.debian.org</a><br>
>> >><br>
>> >><br>
>> >> <a href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/android-tools-devel" rel="noreferrer" target="_blank">http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/android-tools-devel</a><br>
>> ><br>
>> ><br>
>> ><br>
>> > _______________________________________________<br>
>> > Android-tools-devel mailing list<br>
>> > <a href="mailto:Android-tools-devel@lists.alioth.debian.org">Android-tools-devel@lists.alioth.debian.org</a><br>
>> ><br>
>> > <a href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/android-tools-devel" rel="noreferrer" target="_blank">http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/android-tools-devel</a><br>
>><br>
>> _______________________________________________<br>
>> Android-tools-devel mailing list<br>
>> <a href="mailto:Android-tools-devel@lists.alioth.debian.org">Android-tools-devel@lists.alioth.debian.org</a><br>
>><br>
>> <a href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/android-tools-devel" rel="noreferrer" target="_blank">http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/android-tools-devel</a><br>
><br>
><br>
><br>
> _______________________________________________<br>
> Android-tools-devel mailing list<br>
> <a href="mailto:Android-tools-devel@lists.alioth.debian.org">Android-tools-devel@lists.alioth.debian.org</a><br>
> <a href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/android-tools-devel" rel="noreferrer" target="_blank">http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/android-tools-devel</a><br>
<br>
_______________________________________________<br>
Android-tools-devel mailing list<br>
<a href="mailto:Android-tools-devel@lists.alioth.debian.org">Android-tools-devel@lists.alioth.debian.org</a><br>
<a href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/android-tools-devel" rel="noreferrer" target="_blank">http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/android-tools-devel</a><br>
</div></div></blockquote></div><br></div>