On Thu, 10 May 2007 13:45:54 +0200 "Hector Oron" <hector.oron@gmail.com> wrote: > cross-get has been supercedded by apt-cross > $ sudo apt-get install apt-cross > :-) Correct. > > Does that go as far as saying "cross-get --arch arm libavformat-dev" No. The dependency tracking in apt-cross is limited - I hope to improve it in the future. Currently, it is not able to resolve very long dependency trees. It is intended to provide incremental support for cross-building packages NOT parsing an entire tree or converting an entire subsystem via dpkg-cross. If you have an Emdebian toolchain installed, apt-cross can install dpkg-cross versions of what you might call 'first or second tier' packages: packages that can be built directly on top of the toolchain with no other dependencies and those that can be built directly on top of that first tier. apt-cross is not currently able to resolve some of the dependencies underpinning Gtk+/X11 due to problems in the debconf and perl dependencies. > > and it also getting the cross versions of libogg and the other many > > things it depends on? edos-debcheck is more suitable there and will always be a LOT faster (and more accurate) than apt-cross can ever hope to achieve. You will need a some new code as well as edos-debcheck to solve the problem but I am working on that because I need similar functionality. The pseudo code is as follows: 1. Get the Packages file for the base system that is your start point. This could be, e.g., the Emdebian ARM target repository. 2. Add Debian package data to the Packages file for missing or interesting packages: apt-cache show foo >> Packages 3. Edit the Packages file to play what-if with things like replacing debconf with cdebconf or preceding each debconf dependency with cdebconf |. 4. edos-debcheck -explain -failures < Packages produces a report of what is missing - add those packages as above. (Also, consider building some of them with emdebian-tools). 5. Now add the top level package that you want to use to the Packages file, as before. 6. Continue rerunning edos-debcheck to add and modify dependencies and missing packages until you get a complete list of packages that are needed to get from your base repository to the target package. 7. Using that list, parse the dependencies of each package to identify which can be built directly on top of your chosen base system, which need to be built on top of those packages and which need to be left until the bitter end (when dependencies may well have altered). 8. All the while, keep track of changes to all dependencies (including Pre-Depends, Build-Depends, Build-Cross-Depends, Provides, Replaces and Conflicts) via edos-debcheck (possibly with adaptations to cope with the problems of cross-dependencies) as you build packages and modify the dependencies. This was the remit of 'empath' but that code is not as capable as edos-debcheck and some more awkward dependencies would give the wrong results in empath (it also has severe problems with circular dependencies, as does apt-cross). edos-debcheck uses some quite advanced maths (to me anyway) and I'm undecided whether the best course is to try to extend edos-debcheck to cope with cross-building or to fork code from edos-debcheck into a program like empath that can load the apt-cache data directly instead of relying on a Packages file via stdin. I have got a shell/perl wrapper for edos-debcheck but it is not capable of doing the full task above and a C/C++ application that can handle Packages via libapt-pkg (i.e. as discrete objects) will be far more successful and far more efficient than any script wrapper. Efficiency is absolutely pivotal here, dependency trees are incredibly complex and edos-debcheck itself only works because the potentially insolvable mathematics is constrained by Debian Policy into a form that is solvable. (See man edos-debcheck). It can take several minutes at 90% CPU to parse the Debian tree just once - the operations above may involve dozens of iterations as well as user interaction to remove unwanted Packages, obtain Package data from the Debian cache and edit the dependencies to reflect Emdebian or cross-building purposes. If anyone fancies a bit of practical mathematics, feel free to take on this task. It has a significant overlap with a Google Summer of Code project that was proposed for Emdebian but was not accepted. -- Neil Williams ============= http://www.data-freedom.org/ http://www.nosoftwarepatents.com/ http://www.linux.codehelp.co.uk/
Attachment:
pgp90WGJU52eI.pgp
Description: PGP signature