unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Julien Lepiller <julien@lepiller.eu>
To: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Cc: 42734@debbugs.gnu.org
Subject: [bug#42734] Export android-platform-system-core
Date: Mon, 10 Aug 2020 09:50:51 -0400	[thread overview]
Message-ID: <C70549E6-836F-4B58-979D-305F6E669AD8@lepiller.eu> (raw)
In-Reply-To: <20200810051949.737d799e@primarylaptop.localdomain>

[-- Attachment #1: Type: text/plain, Size: 3155 bytes --]

I think I confused a few things here. Currently android-platform-system-core is a procedure that takes a version number and returns an origin record (a source). However, that record hard-codes a hash, so if you specify a different version, the source can't be fetcged, as the hash mismatches.

It also includes patches that may not work with other versions, so I'm not sure why we allow to pass a version number in tge first place…

How about this:

android-platform-system-core is renamed to android-platform-system-core-source and takes a version, a hash and a list patch names.

android-platform-system-core is the result of calling this function with the default version, hash anl patch set.

The other source procedures should probably be fixed in the same way.

I also found out that android-liblog didn't install its headers. I'll fix that this evening if I remember.

On 2020年8月9日 23:19:49 GMT-04:00, Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> wrote:
>On Fri, 07 Aug 2020 07:33:03 -0400
>Julien Lepiller <julien@lepiller.eu> wrote:
>
>> Unfortunately, android-platform-core should first be fixed to accept
>> a hash as an argument, otherwise any other version will fail. Don't
>> know why we haven't done that before…
>
>I don't understand what the hash would be here, nor the consequences
>you describe. Do you have some pointers on the documentation or source
>code that I should read to better understand that?
>
>By the way I find it a bit strange to refer to have to manually extract
>
>android-platform-system-core to be able to refer its include path.
>
>Beside the native-input, this results in the following code:
>> #:make-flags (list (string-append "CFLAGS= "
>>                                   "-I core/include "
>> [...]))
>>
>> [...]
>>
>> #:phases
>> (modify-phases %standard-phases
>> (add-after 'unpack 'unpack-core
>>  (lambda* (#:key inputs #:allow-other-keys)
>>   (mkdir-p "core")
>>    (with-directory-excursion "core"
>>     (invoke "tar" "axf" (assoc-ref inputs "android-core")
>>             "--strip-components=1"))
>>   #t))
>> [...])
>
>Instead of just that:
>> #:make-flags (list (string-append "CFLAGS= "
>>                    "-I " (assoc-ref %build-inputs "android-core")
>>                    "/include "))
>> [...]))
>
>Another potential improvement would be to remove the
>android-platform-version argument completely and set version to it in
>android.mk like that:
>> (define-public (android-platform-system-core
>> [...]
>>  (version (android-platform-version))
>> [...]
>
>That would make the native-input look like that:
>> (native-inputs
>>  `(
>>    ("android-core" ,android-platform-system-core)))
>
>And if we need the version 9.0.0_r3 we could define a new package:
>> (define-public android-platform-system-core-9
>>   (package
>>    (inherit android-platform-system-core)
>>     (version "9.0.0_r3"))))
>
>and use it:
>> (native-inputs
>>  `(
>>    ("android-core" ,android-platform-system-core-9)))
>
>Are both proposal a good idea? Or does it have any downsides that I
>didn't think of?
>
>Denis.

[-- Attachment #2: Type: text/html, Size: 4356 bytes --]

      parent reply	other threads:[~2020-08-10 13:52 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-07  0:44 [bug#42734] Export android-platform-system-core Denis 'GNUtoo' Carikli
2020-08-07  2:10 ` [bug#42734] [PATCH 1/2] gnu: android: Export android-platform-version Denis 'GNUtoo' Carikli
2020-08-07  2:10   ` [bug#42734] [PATCH 2/2] gnu: android: Export android-platform-system-core Denis 'GNUtoo' Carikli
2020-08-07  8:24   ` bug#42734: [PATCH 1/2] gnu: android: Export android-platform-version Mathieu Othacehe
2020-08-07 11:33 ` [bug#42734] Export android-platform-system-core Julien Lepiller
2020-08-10  3:19   ` Denis 'GNUtoo' Carikli
2020-08-10  3:27     ` Denis 'GNUtoo' Carikli
2020-08-10  3:46       ` Denis 'GNUtoo' Carikli
2020-08-10 13:50     ` Julien Lepiller [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=C70549E6-836F-4B58-979D-305F6E669AD8@lepiller.eu \
    --to=julien@lepiller.eu \
    --cc=42734@debbugs.gnu.org \
    --cc=GNUtoo@cyberdimension.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).