Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
emerge --sync [only firefox?]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
xodarap
n00b
n00b


Joined: 20 Dec 2004
Posts: 23

PostPosted: Sun Aug 07, 2005 11:19 pm    Post subject: emerge --sync [only firefox?] Reply with quote

I have a dial-up connection, so running emerge --sync often is not a practical option for me. I was attempting to install mozilla firefox using an old portage tree, I was wondering whether I can just sync the firefox part of the portage tree? How do I go about doing this/ what command do I have to type? Or how do I install the latest version of firefox without using emerge --sync prior to doing this, but still using emerge instead of uncompressing etc.?
Back to top
View user's profile Send private message
yabbadabbadont
Advocate
Advocate


Joined: 14 Mar 2003
Posts: 4791
Location: 2 exits past crazy

PostPosted: Sun Aug 07, 2005 11:44 pm    Post subject: Reply with quote

I don't think that you can only sync part of the tree. :-(

When I was using dial-up, I found that syncing every day worked better. Very little changes (usually) from one day to the next, so the amount of data downloaded was minimal for any one sync.
Back to top
View user's profile Send private message
lnxz
Guru
Guru


Joined: 03 Jul 2005
Posts: 472
Location: Earth

PostPosted: Mon Aug 08, 2005 2:41 am    Post subject: Reply with quote

You *could* exclude everything not related to firefox in /etc/portage/rsync_excludes.
If you want to do that, the best soloution would be to have a file called rsync_excludes_firefox, and everytime you want to just update firefox you make a symlink like this:
ln -s /etc/rsync_excludes_firefox /etc/rsync_excludes, then run emerge --sync, when done with that remove the symlink.
Not very effective, but that's the only way I can think of that enables you to only sync parts of the tree.

The best and most effective way imho is to go to for example gentoo-portage.com, look up mozilla-firefox, click the link to the latest ebuild, put the ebuild in your tree/overlay, digest it and run emerge -vua mozilla-firefox.
Repeat these steps for all dependencies that need to be updated.
Back to top
View user's profile Send private message
yabbadabbadont
Advocate
Advocate


Joined: 14 Mar 2003
Posts: 4791
Location: 2 exits past crazy

PostPosted: Mon Aug 08, 2005 3:00 am    Post subject: Reply with quote

Cool!

I didn't know about those options.
I've been away from Gentoo for a while. (but I'm feeling much better now) :-)
Back to top
View user's profile Send private message
lnxz
Guru
Guru


Joined: 03 Jul 2005
Posts: 472
Location: Earth

PostPosted: Mon Aug 08, 2005 8:08 am    Post subject: Reply with quote

Quick and dirty draft for a wrapper for the first method I mentioned. Never tested this, so I don't know if will run at all and it's probably full of errors, so please don't copy and paste unless you really don't care what happens to your system.
I doubt running this will cause any harm, though, but you never know with computers. Needless to say I take no responsibility if you do choose to try it unedited.

Code:

#!/bin/bash

excludelink=/etc/portage/rsync_exludes

if [ "$1" = "" ]
then
  echo "Usage: $0 <profile>(firefox, f.ex.) <opts>(-sudo)"
  exit 1
fi

if [ "$1" = "firefox" ]
then
  excludefile=/etc/portage/rsync_excludes_firefox
fi

makelink() {
 ln -s $excludefile $excludelink
}

presync() {
 if [[ `cat /etc/make.conf|grep RSYNC_EXCLUDEFROM` != "$excludelink" ]]
 then
   echo "RSYNC_EXCLUDEFROM not set in make.conf or it's not set to $excludelink. Critical failure."
   exit 1
 fi

 if [ ! -e $excludefile ]
 then
   echo "$excludefile doesn't exist. Critical failure."
   exit 1
 fi

 if [ ! -e $excludelink ]
 then
   makelink
 fi
}

sync() {
 if [ "$2" = "-sudo" ]
 then
   sudo emerge --sync
 else
   emerge --sync
 fi
}

postsync() {
   rm -f $excludelink
   exit 0
}

presync
sync
postsync


And here's an example /etc/portage/rsync_exclude_firefox file. This is also not tested, although I have used exclude files before I've never used this particular example.

Code:

+ net-client/mozilla-firefox
+ metdatada/cache/net-client/mozilla-firefox
- *
Back to top
View user's profile Send private message
xodarap
n00b
n00b


Joined: 20 Dec 2004
Posts: 23

PostPosted: Tue Aug 09, 2005 2:04 am    Post subject: Thanks Reply with quote

Thanks lnxz, that was a helpful trick especially for someone who has access through the internet at ridiculously slow dial-up speeds.

regards...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming 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