DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 18th June 2008
bsdnewbie999 bsdnewbie999 is offline
Package Pilot
 
Join Date: May 2008
Posts: 145
Thanked 0 Times in 0 Posts
Default Should i install 2 ports at same time ?

Can i install 2 or more ports at the same time? Or it is better to install port 1 at a time?
Because I'm thinking that port A might related to port B and install together may effect the result. Is that true?
Reply With Quote
  #2   (View Single Post)  
Old 18th June 2008
Carpetsmoker's Avatar
Carpetsmoker Carpetsmoker is offline
Real Name: Martin
Old man from scene 24
 
Join Date: Apr 2008
Location: Eindhoven, Netherlands
Posts: 2,064
Thanked 198 Times in 156 Posts
Default

If you are compiling porta and portb which both depend on portc then an error may occur if both ports try to compile portc at the same time.
This is nothing serious, you can just restart the build, on a rare occasion you may need to manually remove a corrupted object file.

On systems with one core, the total amount of time taken to install two ports in parallel is longer than it takes when you build then serially ... On multi-core systems parallel builds (or make -j) is faster
__________________
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things.
Reply With Quote
  #3   (View Single Post)  
Old 18th June 2008
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 3,612
Thanked 214 Times in 189 Posts
Default

The OpenBSD Project recommends that you install packages, unless packages are unavailable due to licensing or flavor. Ports are more complex. The consensus among the more experienced users agrees with the Project.
Reply With Quote
  #4   (View Single Post)  
Old 18th June 2008
Oko's Avatar
Oko Oko is offline
Fsck Surgeon
 
Join Date: May 2008
Location: Kosovo, Serbia
Posts: 762
Thanked 36 Times in 32 Posts
Default

It is possible to make many ports at once but they should not be installed
simultaneously as parallel running processes.
To install many ports at once create the subdirectory /usr/ports/myports
in which you will list the names of all ports you want to install and their flavours.

For instance

Code:
graphics/gimp
editors/emacs,no_x11
print/texlive
Then

Code:
# make  BUILD=yes SUBDIRLIST=/usr/ports/myports install
Do not forget to clean after yourself.

Code:
# make  BUILD=yes SUBDIRLIST=/usr/ports/myports clean
# make  BUILD=yes SUBDIRLIST=/usr/ports/myports clean=depends
If your list is long make sure you have enough disk space on /usr since you will create
lots of garbage before you clean. For instance when I build all my desktop ports automatically (which is usually about 20 ports) I need at least 12 GB to do it. Once when I clean it they are no more than 2-3GB in total.
Be also smart about making many ports at once. It is enough to list xsane and sane-backends will be installed as dependences. I have a careful choice of 15-20 ports which in turn will install all other ports I use as dependence.

The above process might take a very long time. In the spirit of OpenBSD project you should actually try to use packages
instead of ports whenever possible. The question is how to you install many packages at once.
You can make a simple very crude script

Code:
#!/bin/sh
pkg_add gimp(full name of the package)
pkg_add emacs21
pkg_add texlive
which you can execute as a root or with sudo. Good thing is that you do not have to worry about the space now necessary for build. The better thing would be to create a file with the packages you want to install and then write a small awk or perl program which will accomplish installation.
Many packages do come with OpenBSD specific messages and they require some post installation actions. For instance if you install CUPS you need to execute the script which will replace LPD spooling system with CUPS, alter some permissions, edit /etc/rc.local and /etc/group files. Those can be automatized as well.

Last edited by Oko; 18th June 2008 at 04:17 AM.
Reply With Quote
  #5   (View Single Post)  
Old 18th June 2008
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 2,873
Thanked 190 Times in 160 Posts
Default

Quote:
Originally Posted by bsdnewbie999 View Post
Or it is better to install port 1 at a time?
Yes, this is prudent.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't Print (Fresh First Time install) BSD newb Xero FreeBSD Installation and Upgrading 4 15th February 2009 07:11 PM
cannot install wireshark from ports ccc FreeBSD Ports and Packages 1 1st February 2009 05:52 PM
Trying to install elinks via ports. Not having luck. Need help. unixdude FreeBSD Ports and Packages 2 11th November 2008 08:21 AM
Can't install opera from ports erno FreeBSD Ports and Packages 2 25th June 2008 10:25 AM
Install ports from cd? xCipherx OpenBSD Packages and Ports 5 2nd June 2008 06:35 PM


All times are GMT. The time now is 05:36 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick