Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=pacman-g2.git;a=commitdiff;h=7005408ad6b9c45c309015644a0fa84e3444183d
commit 7005408ad6b9c45c309015644a0fa84e3444183d Author: Michel Hermier <herm...@frugalware.org> Date: Sun Jul 10 23:37:55 2011 +0200 makepkg: change depends and makedepends installation order. * This patch change the installation order of the depends and makedepends packages. While I agree this may seems odd at first place, this order give us the oportunity to use some finer control on what is used at compile time and what is used at build time. When doing a regular build depends and makedepends usually do not interfere. But there are some case where you might want to compile library with a different package than the one that will get finally installed by the user. The real case that make me investigate the issue: we need ffmpeg 0.6 and 0.8 to be installed at the same time (because of some abandoned projects). But some libraries that use ffmpeg don't allways expose it directly, and rather hide it in a plugin system (xine-lib by example). The problem is that this lib is used by a project that requires the other version to compile, and you are doomed. The solution was to split ffmpeg in such ways we can have both versions of the binaries, but only one compiletime requirements at a time (both providing the same package). Since we want to have automagically the latest compiletime installed (to not break existing packages and their FB), we need to tell in the makedepends that we require the old version. But the current system will not allow that, since the default provider package is allready installed resulting in an error. Inverting depends and makedepends resolve the issue by giving the FB a chance to install the 'provides' packages before the 'depends' are resolved, by simply adding them to 'makedepends'. There should be no side effects on this change, since the two inverted operations are done one after the other and are pretty atomic on the tree representation. In addition it should not introduce package breakage: if depends and makedepends conflicted the FB would have been unbuildable, changing the order does not change the situation at build time. But it give us a finer control of what is installed at build and run time, by allowing to use a specific non default 'provide' package at build time, and use the default or user 'provide' at runtime. diff --git a/scripts/makepkg b/scripts/makepkg index aef5ef0..dc872b7 100755 --- a/scripts/makepkg +++ b/scripts/makepkg @@ -1225,28 +1225,28 @@ msg "Making package: $pkgname $pkgver-$pkgrel (`date`)" unset deplist makedeplist if [ `type -p $PACMAN` -a "$NODEPS" = "0" ]; then - msg "Checking Runtime Dependencies..." - deplist=`checkdeps ${depends[@]}` - handledeps $deplist + msg "Checking Buildtime Dependencies..." + makedeplist=`checkdeps ${makedepends[@]}` + handledeps $makedeplist if [ $? -gt 0 ]; then exit 1 fi # check deps again to make sure they were resolved - deplist=`checkdeps ${depends[@]}` + deplist=`checkdeps ${makedepends[@]}` if [ ! -z "$deplist" ]; then - error "Failed to install missing dependencies." + error "Failed to install missing buildtime dependencies." exit 1 fi - msg "Checking Buildtime Dependencies..." - makedeplist=`checkdeps ${makedepends[@]}` - handledeps $makedeplist + msg "Checking Runtime Dependencies..." + deplist=`checkdeps ${depends[@]}` + handledeps $deplist if [ $? -gt 0 ]; then exit 1 fi # check deps again to make sure they were resolved - deplist=`checkdeps ${makedepends[@]}` + deplist=`checkdeps ${depends[@]}` if [ ! -z "$deplist" ]; then - error "Failed to install missing buildtime dependencies." + error "Failed to install missing dependencies." exit 1 fi elif [ "$NODEPS" = "1" ]; then _______________________________________________ Frugalware-git mailing list Frugalware-git@frugalware.org http://frugalware.org/mailman/listinfo/frugalware-git