basically, I can --src to get up2date to fetch the srpm, but I'd love a code path where up2date could see that I need X rpm's for building said source rpm and at least fetch if not install them (if not already installed) Installing /tmp/php-4.1.2-7.src.rpm error: failed build dependencies: apache-devel is needed by php-4.1.2-7 gdbm-devel is needed by php-4.1.2-7 imap-devel >= 2000-9 is needed by php-4.1.2-7 krb5-devel is needed by php-4.1.2-7 mysql-devel is needed by php-4.1.2-7 openssl-devel is needed by php-4.1.2-7 postgresql-devel is needed by php-4.1.2-7 pam-devel is needed by php-4.1.2-7 freetype-devel >= 2.0.0 is needed by php-4.1.2-7 gd-devel is needed by php-4.1.2-7 libjpeg-devel is needed by php-4.1.2-7 libpng-devel is needed by php-4.1.2-7 zlib-devel is needed by php-4.1.2-7 unixODBC-devel is needed by php-4.1.2-7 pspell-devel is needed by php-4.1.2-7 curl-devel >= 7.9 is needed by php-4.1.2-7 bzip2-devel >= 1.0 is needed by php-4.1.2-7 mm-devel is needed by php-4.1.2-7 gmp-devel is needed by php-4.1.2-7 expat-devel is needed by php-4.1.2-7 ucd-snmp-devel is needed by php-4.1.2-7 libxml2-devel >= 2.4 is needed by php-4.1.2-7 libstdc++-devel is needed by php-4.1.2-7 imap-devel is needed by php-4.1.2-7 openldap-devel is needed by php-4.1.2-7 I may just be missing the code - admittedly I didn't fetch php from up2date since it was too much hassle to uninstall it and its deps :)
there is no code path for doing that currently. It would need it's own depSolver since the deps for bin packages work differently. Could be useful though
as you may have noticed, this is effectively defferred, so just making it official
apt-get has the "build-dep" command which when run as root against a SRPM file calculates BuildRequires and pulls in all necessary dependencies. There are however two things that may stop this. 1) Many RH/Fedora packages have missing or even wrong BuildRequires, this are being constantly fixed over time. File Bugzilla reports if you are 100% sure that you have found errors in specs. 2) It has certain problems dealing with some types of virtual provides. This is being investigated. In any case this is not a good solution because you should NEVER build packages as root. You may want to look into the mach buildroot tool that creates chroots from scratch and builds packages within that environment, after using its own parser and dependency resolution for pulling in BuildRequires.