Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
how to build packages on fast dual-p4 for emerge on slow p3?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
flying_walus
n00b
n00b


Joined: 07 Sep 2002
Posts: 58

PostPosted: Sat Dec 21, 2002 6:29 pm    Post subject: how to build packages on fast dual-p4 for emerge on slow p3? Reply with quote

I've just finished setting up a dual p4 machine, and would like to use it's superior compiler speed to compile the packages i need to install on my p3 laptop.

i see that "emerge package" should generate a binary package, but it looks as though it also tries to install said package on the machine that's doing the compiling.

i very much do not want to install packages compiled wth "march=pentium3" on my p4 machine, so how to _just_ package, no install?

thanks
Back to top
View user's profile Send private message
rac
Bodhisattva
Bodhisattva


Joined: 30 May 2002
Posts: 6553
Location: Japanifornia

PostPosted: Sat Dec 21, 2002 7:28 pm    Post subject: Reply with quote

ebuild package will do that. However, another option you might want to consider is making a chroot environment with P3 compiler flags on the P4.
_________________
For every higher wall, there is a taller ladder
Back to top
View user's profile Send private message
craftyc
Guru
Guru


Joined: 23 May 2002
Posts: 443
Location: Behind You.

PostPosted: Sat Dec 21, 2002 11:56 pm    Post subject: Reply with quote

Wouldn't the --buildpkg option work for this? Or does emerge install the package as well as creating an archive of the binaries?
_________________
Postcount ++
Back to top
View user's profile Send private message
rac
Bodhisattva
Bodhisattva


Joined: 30 May 2002
Posts: 6553
Location: Japanifornia

PostPosted: Sun Dec 22, 2002 5:30 am    Post subject: Reply with quote

It installs after it builds the package - "emerge" always merges to the live filesystem. "ebuild package" is the only way I know of to just get a binary package, without installing it.
_________________
For every higher wall, there is a taller ladder
Back to top
View user's profile Send private message
Zadeh
Tux's lil' helper
Tux's lil' helper


Joined: 31 Oct 2002
Posts: 131

PostPosted: Sun Dec 22, 2002 4:52 pm    Post subject: Reply with quote

# export CFLAGS="-march=pentium3 ..."
# ebuild </path/to/package> package

After you're done, to reset your previous CFLAGS, just:
# source /etc/make.conf

Some more native options would be nice though. After installing a whole system it'd be neat if you could just do something like:
# emerge --package-system CFLAGS="-march=pentium3 ..." PKGDIR=${All}/pentium3
Back to top
View user's profile Send private message
flying_walus
n00b
n00b


Joined: 07 Sep 2002
Posts: 58

PostPosted: Sun Dec 22, 2002 6:19 pm    Post subject: what i ended up doing Reply with quote

Since i was doing basically the same things to both systems, i wrote a script that created a pIII package for every port i'd installed on the p4, waited a couple of hours, and then used them to build the pIII system.

It would be nice if you didn't need to specify the exact path for each ebuild file, but hey - the actual install took less than an hour, so i'm not complaining.

Script: (in retrospect, i could have saved a couple of cycles by not hopping from directory to directory, but then, that's why i've got hyperthreading, right?)
Code:

#! /bin/bash
export BASE=/var/db/pkg
export PORTAGE=/usr/portage

cd ${BASE}
for AREA in $( ls )
  do
    cd ${BASE/${AREA}
    for PKG in $( ls )
      do
        WHERE=$( echo "${AREA}/${PKG}}" | sed 's/-[0-9].*$//' )
        WHAT = "${PKG}.ebuild"
        cd ${PORTAGE}/${WHERE}
        ebuild ${WHAT} package
        rm -rf /var/tmp/portage
      done
done

Back to top
View user's profile Send private message
tedj
n00b
n00b


Joined: 10 Jul 2003
Posts: 49

PostPosted: Tue Oct 24, 2006 6:38 pm    Post subject: Reply with quote

(Thank god for Google search of forums.gentoo.org)

Here's my script for rebuilding kde for redeployment.

Code:
#!/bin/bash
export BASE=/var/db/pkg/kde-base
export PORTAGE=/usr/portage/kde-base

cd ${BASE}
for AREA in $( ls )
  do
    cd ${BASE/${AREA}}
    for PKG in $( ls )
      do
        WHERE=$( echo "${AREA}/${PKG}" | sed 's/-[0-9].*$//' )
        WHAT="${PKG}.ebuild"
        cd ${PORTAGE}/${WHERE}
        ebuild ${WHAT} package
        rm -rf /var/tmp/portage
      done
done
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum