# portinstall vs make



## nORKy (Nov 26, 2008)

Someone can explain my the difference between portinstall and make ??
Because :
portinstall gimp -> install firefox 2 before gimp
cd /usr/ports/graphics/gimp ; make install clean ; -> don't install firefox2


Thanks you


----------



## graudeejs (Nov 26, 2008)

portinstall is external utility to manage ports.

you can do everything with make, but it's faster using port managers, like portinstall or portmaster....


However i recommend portmaster, because it's written in sh, and doesn't require additional ports to be installed (unlike portinstall)


i don't know about portinstall but portmaster will 1st build port and if he can build it successfully it'll uninstall old port, then install new one.

it's easier to mess things up with make.


----------



## nORKy (Nov 27, 2008)

Ok,

but no idea why portinstall build firefox 2 and make don't ??

it's... 'curious'


----------



## Andrius (Nov 27, 2008)

killasmurf86 said:
			
		

> i don't know about portinstall but portmaster will 1st build port and if he can build it successfully it'll uninstall old port, then install new one.
> 
> it's easier to mess things up with make.



make build deinstall install clean

Its easy to mess up things with everything if you don't know what you're doing.


----------



## Djn (Nov 27, 2008)

You might even want to do a make clean first, in case there's leftovers from something you've done earlier in there.

And what's the error you get when you try using make?


----------



## Ole (Dec 8, 2008)

nORKy said:
			
		

> Someone can explain my the difference between portinstall and make ??
> Because :
> portinstall gimp -> install firefox 2 before gimp
> cd /usr/ports/graphics/gimp ; make install clean ; -> don't install firefox2
> ...



portinstall using "make args"-command in the own work - it not replacement for "make" command in the ports tree. Portinstall - is additional functionality. Like ezjail -  tools for management jails easy, is not provide jail.

For example some utilities from portupgrade:


> pkg_which <path_to_file>


print what the port producing file if ports installed correctly (with pkg-plist files and setting /var/db/pkg registry)

example:


> pkg_which /usr/local/etc/php.ini-dist
> php5-5.2.6_2



pkgdb - check package database registry  for inconsistent or depending problem (with tracking /usr/ports/MOVED for reason)

for example:


> pkgdb -F
> --->  Checking the package registry database
> [Updating the pkgdb <format:bdb_btree> in /var/db/pkg ... - 107 packages found (-0 +1) . done]
> Stale origin: 'devel/php5-pcre': perhaps moved or obsoleted.
> ...




and, of course a pleasing features from portupgrade - you may set all customization flags for all "Makefile or configure"-files once upon a time and in the future distribute pkgtools.conf for all you host and compile/upgrade soft with not be afraid    of loosing some key for some ports and loose some functionality when upgrade ports.

for example part of my pkgtools.conf for portupgrade:


> ENV['PKG_BACKUP_DIR'] = '/var/pkg'
> 
> IGNORE_CATEGORIES = [
> 'chinese',
> ...


thats ignoring ports from "/usr/ports/{chinese,french,german,hebrew,japanese',...} directories 
and
compile soft with necessary for me defines. Also describe BACKUP directory (when doing portupgrade -b, portupgrade doing "make package" of previous version and save it here), execute external script /root/bin/ports/bash.sh with content


> #!/bin/sh
> 
> cp /usr/local/bin/bash /bin/bash
> cp /etc/shells /tmp
> ...


 when i installing/upgrading bash and more cool features (set php4 as default instead by php5 if package require php, or held OpenOffice for upgrade, because recompile of huge OO - is little stress for you system.. and more..)

...
and i mean this is key for you question.
make in the ports-tree using result of "make config" and apply (with storing config in  /var/db/ports/* )
portinstall - using pkgtools.conf for override /var/db/ports.

IMHO dependency for firefox sets internal helpbrowser. Try 


> cd /usr/ports/graphics/gimp; make config;


and after change checkbox execute


> make pretty-print-run-depends-list


----------

