Re: smarter way to differ architectures needed?
>>>>> "Philip" == Philip Charles <philipc@copyleft.co.nz> writes:
Philip> **cut <complaint> Seems a good scheme to me, but what
Philip> about the .deb packages? At the moment 30% - 40% of the
Philip> offical Hurd archive is rubbish. It can be installed, but
Philip> is not appropriate to a Hurd system for two reasons.
Sorry, obviously I didn't make this obvious. I was getting carried
away with the more advanced examples (to make sure everything required
was possible), but forgot some of the simpler cases.
Anyway, this is what the "Depends: " field is for. It requires a shift
in thinking from the conventional thinking. For example:
---
typical binary package that can only be installed on Linux (eg
kernel-image, assuming it can't be cross compiled).
1. build-for: %hwarch, os-linux
2. build-depends: %hwarch, os-linux
3. depends: ${hwarch}, os-linux
1. can compiled for every hwarch (except ia86) but only on linux
2. can be compiled on the same hwarch but only on linux
3. output depends on current ${hwarch} at compile time; output
always depends on Linux.
---
typical shell script package that can only be installed on Linux (eg
makedev).
1. build-for: os-linux
2. build-depends:
3. depends: os-linux
1. can compiled once but only for Linux
2. build can occur anywhere.
3. output depends only on Linux.
---
(note: in both examples os-linux could be substituted at compile time
same as ${hwarch}, however I didn't see the point of doing so here).
I have added these examples to my proposal.
For comments on build-for:
- Looking at this further, I can see that Depends: could be
automatically generated in the build process based on the "build-for"
header, so this information does not need to be duplicated.
- If done properly (not sure how) this could have other uses
(eg. automatically build a package based on X and another without X),
but lets not get too carried away just yet.
- My syntax for build-for probably should be improved. I don't like
it. Who knows, maybe something like Gordon's proposed syntax would be
better.
--
Brian May <bam@debian.org>
Reply to: