It would be very useful to the new Cache::Apt::* module code if toolchain packages of the form: gcc-4.2-arm-linux-gnu stored the value "arm" or "arm-linux-gnu" in the debian/control fields (e.g. Cross-Architecture: ) because it is actually quite hard to automate the detection of such triplets in package names once the package is in the repository. The only distinguishing feature of all triplets is the hyphens and many packages already include those. Not all triplets end in gnu, not all supported triplets are concerned with the linux kernel . . . The only method I have found so far is to create a list of supported triplets and laboriously check the package name against each possible triplet. When preparing data from the entire apt cache this can add a significant amount of processing time - even for a small repository like the Emdebian toolchain repository. e.g. for gcc-4.2-arm-linux-gnu-4.2.foo_i386.deb : Architecture: i386 Cross-Architecture: arm or Cross-Architecture: arm-linux-gnu How is this best implemented? It could actually be gcc specific in many ways. (It may have to be X-Cross-Architecture until a suitable field is acceptable within the rest of the Debian tools.) I don't really mind what the field is called as long as the value from TARGET= is incorporated into the debian/control of the final package. It is trivial to detect dpkg-cross versions but the same field could easily be implemented there to remove any possible problems if someone creates a Debian package that ends in -foo-cross. Is there some other way of detecting the triplet without pattern matching every single package name against every possible triplet? -- Neil Williams ============= http://www.data-freedom.org/ http://www.nosoftwarepatents.com/ http://www.linux.codehelp.co.uk/
Attachment:
pgp_owM3mWhoK.pgp
Description: PGP signature