# Portmaster Vs. Portupgrade



## CodeBlock (Aug 6, 2009)

Not trying to start a big debate here, but wondering what the major differences between portmaster and portupgrade are. I see both used quite a bit, and folks on irc told me that they recommend portmaster, which I have been using.

Along with this, what flags do you personally use with each, I usually just `portmaster -a`, are there any other interesting flags (yeah I know,... "read the man page")...but just wondering what other people use.

Also as far as portmaster, is there anything like #1 on http://forums.freebsd.org/showthread.php?t=6033 for portmaster (that updates the terminal title with the number of ports left to upgrade)?

Thanks for any opinions.


----------



## Voltar (Aug 7, 2009)

The main difference that I know of is portupgrade has a Ruby dependency as it is a Ruby script, whereas portmaster is a shell script. I've used both, but I used portupgrade first when I was first learning FreeBSD, so I'm still partial to it.


----------



## fronclynne (Aug 7, 2009)

I've fallen back on portmaster when ruby or ruby-bdb broke portupgrade, and I love that portmaster is: 
	
	



```
> head -n1 `which portmaster`
#!/bin/sh
>
```
but I am used to portupgrade and I like the way it does -r & -R (maybe more recent versions of portmaster do that now, too.  I'll have to see).

Frankly, if you mostly just run -a, portmaster won't steer you wrong and definitely saves on the whole ruby + database thing.


----------



## dennylin93 (Aug 7, 2009)

Portupgrade is a suite of tools to manage your ports. Portmaster is simply one shell script. Either of them will work fine.

With portmaster, I usually use `# portmaster -Bdw port-name` to update ports (-B prevents the creation of the backup package, -d cleans out the distfiles, -w saves old shared libraries). The -a flag can also be used to check all installed ports for updates. The flags --check-depends and --check-port-dbdir will check the dependencies and other info. There's also --clean-distfiles or --clean-distfiles-all for cleaning obsolete distfiles.

With portugprade, `# pkgdb -F` checks dependencies and other info while `# portsclean -DD` cleans out obsolete distfiles.

What I like about portmaster is that there's no need to install Ruby. The advantage of portuprade is that it uses a cache/database.


----------



## gilinko (Aug 7, 2009)

You are forgetting portmanager, which is the tool I use. 

I started with portupgrade, but it failed on me a litte to much. I wanted a "smarter" program, and portmanager became that tool. It's not as "fast" as the others, but in my view it's the fact that it build packages that has me loving it. Mainly because I have several identical computers, and I use the packages build on one fast server to update the lower end computers.


----------



## ale (Aug 7, 2009)

portupgrade can build packages too, using -p option


----------



## dennylin93 (Aug 7, 2009)

For portmaster, -g creates a package of the new port.


----------



## gilinko (Aug 7, 2009)

ale said:
			
		

> portupgrade can build packages too, using -p option



And so can portmaster(though I'm guessing). But as a good sysadmin, I'm lazy, and if I can drop a option/switch for default behaviour well that's what I'm going to do 

And as I stated, I have had a lot of problems with portupgrade and moved on to something that suited me...


----------



## dave (Aug 12, 2009)

```
portmaster -dbaH
```


----------



## bdacus (Jan 9, 2011)

*portmaster -b or -g*

Don't I want a package of the new port? *-g*  where do I save time in having *-b* the old port?


----------



## Fred (Jan 11, 2011)

gilinko said:
			
		

> And so can portmaster(though I'm guessing). But as a good sysadmin, I'm lazy, and if I can drop a option/switch for default behaviour well that's what I'm going to do.



Edit portmaster.rc.


----------



## Nevering (Mar 10, 2011)

*Installed programs*

Being new to portmaster and such. I was wonder if these will also update an installed program to the current release, such as apache and powerdns .. providing these are in the ports tree ?

thanks


----------



## wblock@ (Mar 10, 2011)

Nevering said:
			
		

> Being new to portmaster and such. I was wonder if these will also update an installed program to the current release, such as apache and powerdns .. providing these are in the ports tree ?



That is what they do, the reason they exist, their purpose in life.  See portmaster(8).


----------



## Nevering (Mar 11, 2011)

*Thanks*

Thought so but I was wondering why Apache was not getting updated. I ran a `portmaster apache` and it updated. I did a `portmaster -Da` and it went through several but failed on one child and aborted. I'm guessing there is an option to not abort and will search now. 

However all of these are still not updated


```
ORBit2                              <
aspell                              <
atk                                 <
bash                                <
bdftopcf                            <
bison                               <
bugzilla                            <
cairo                               <
dbus                                <
dbus-glib                           <
emacs                               <
font-bh-ttf                         <
font-misc-ethiopic                  <
font-misc-meltho                    <
freetype2                           <
gconf2                              <
gettext                             <
gio-fam-backend                     <
glib                                <
gobject-introspection               <
gtk                                 <
gtk-engines2                        <
help2man                            <
hs-darcs                            <
hs-haddock                          <
hs-hashed-storage                   <
hs-haskeline                        <
libSM                               <
libXaw                              <
libXfont                            <
libXmu                              <
libXt                               <
libgcrypt                           <
libgpg-error                        <
libgsf                              <
libotf                              <
librsvg2                            <
libxslt                             <
m17n-db                             <
m17n-lib                            <
mkfontdir                           <
mkfontscale                         <
neon29                              <
p5-GD                               <
pango                               <
pear                                <
pear-MDB2                           <
pear-MDB2_Driver_mysql              <
php52                               <
php52-ctype                         <
php52-dom                           <
php52-extensions                    <
php52-filter                        <
php52-gettext                       <
php52-hash                          <
php52-iconv                         <
php52-imap                          <
php52-json                          <
php52-mbstring                      <
php52-mysql                         <
php52-openssl                       <
php52-pcre                          <
php52-pdo                           <
php52-pdo_sqlite                    <
php52-pgsql                         <
php52-posix                         <
php52-pspell                        <
php52-session                       <
php52-simplexml                     <
php52-spl                           <
php52-sqlite                        <
php52-tokenizer                     <
php52-xml                           <
php52-xmlreader                     <
php52-xmlrpc                        <
php52-xmlwriter                     <
pixman                              <
polkit                              <
postfixadmin                        <
postgresql-client                   <
postgresql-server                   <
roundcube                           <
sbcl                                <
shared-mime-info                    <
subversion                          <
tiff                                <
wget                                <
xorg-fonts-truetype                 <
xz                                  <
```


----------



## troberts (Mar 11, 2011)

Nevering said:
			
		

> Thought so but I was wondering why Apache was not getting updated. I ran a `portmaster apache` and it updated. I did a `portmaster -Da` and it went through several but failed on one child and aborted. I'm guessing there is an option to not abort and will search now.
> 
> However all of these are still not updated


I think the one "disadvantage" of portmaster is that it does not skip aborted compiles.

I do not like to use the '-a' switch, especially if there are many ports to update. What I do is look for a port that will have multiple dependencies to minimize the number of times I have to run portmaster. You can also include multiple ports and use the asterisk to group related ports.


----------



## wblock@ (Mar 11, 2011)

It's safer to stop when a port build fails.  The ports farther down the line might depend on it.  There may be logic in portmaster to detect that and only stop if necessary, but I don't know.


----------

