Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Want to download packages while other packages build?
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
Grammarian
n00b
n00b


Joined: 01 May 2003
Posts: 13

PostPosted: Tue Aug 26, 2003 9:19 pm    Post subject: Want to download packages while other packages build? Reply with quote

Then please help me test a program I've been working on. What it does is it downloads packages for you while building ones that have been downloaded already. This way you should spend less time overall when emerging a list of packages.

The program is called mtemerge. It is a multi-threaded application (my first :D) that works by downloading applications in a separate thread by calling emerge with the --fetchonly option. As packages are downloaded, they are built by the main thread by calling emerge. Since the program works by calling emerge, it needs to be run as a user with access to emerge. Please consult the source code if you're worried, I've tried to comment everything well. If you run as root, make sure to run the program with the command ./mtemerge from the directory you built it in.

Any option flags you pass to the program are passed to every emerge command, both for the build and download passes. The program doesn't recognize any option flags for itself at this point. I'm not sure how, or even if I'm going to do that.

New: There seems to be a bug in Portage that causes passing the --fetchonly flag to fail whenever the package you're emerging has (at least) the ">=" flag preceding it, as is common when updating rsync. A workaround is to include the category with the package name. With rsync, the correct command would be
Code:
mtemerge net-misc/rsync


Installation instructions (after downloading from one of the links below):
Code:
$ tar xvjf mtemerge-0.1.0.tar.bz2
cd mtemerge-0.1.0
make


If you're having problems, please create the debug version by removing mtemerge if necessary, then adding the test-debug flag when you type make. It will generate a lot more output, which you can capture like so:
Code:
./mtemerge list-of-packages > debug-output 2>&1


I will try to check in on this thread often. For more pressing issues, please e-mail me at pynm0001 (AT) comcast.net, and include "mtemerge" somewhere in the subject line.

Download links:
http://grammarian.homelinux.net/mtemerge-0.1.0.tar.bz2
http://www.unf.edu/~pynm0001/mtemerge-0.1.0.tar.bz2

Example command:
./mtemerge MozillaFirebird gtk+ ncurses

Caveats
1. The code as written isn't suitable for inclusion into Portage directly, since it is written in C. There may already exist patches due to go into Portage to add this functionality anyways, but until then, there is this program.
2. I'm not a security guru, but the system() call that is used executes /bin/sh, so make sure it's not trojaned. ;)
_________________
I can't believe I still had the password to this account...
Back to top
View user's profile Send private message
chrisis
Tux's lil' helper
Tux's lil' helper


Joined: 22 May 2003
Posts: 112
Location: Auckland

PostPosted: Fri Sep 19, 2003 2:50 am    Post subject: Re: Want to download packages while other packages build? Reply with quote

Grammarian wrote:

2. I'm not a security guru, but the system() call that is used executes /bin/sh, so make sure it's not trojaned. ;)


Why don't you create an md5sum for the download. That way we can be sure it isn't trojaned! :-)
_________________
But the situation seemed to call for witty repartee. "Huh?" I said.
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