# How to sys wide ignore port?



## Seeker (Oct 12, 2012)

I would like to prevent port from installing/upgrading in 1 place (make.conf?), so make and all other port management tools would obey it.


----------



## jb_fvwm2 (Oct 12, 2012)

Makefile.local: (un re-tested)

```
.if ${ARCH} == i386
# modify the above line if not i386
BROKEN= Forum_method
.endif
# just one way, IGNORE etc exist... afaik. The first one I used that worked.
```
Howsoever, sometimes the port management tools will require restart rather than simply ignore it, after you exclude it specifically from a more-inclusive list of ports being upgraded. Also, it should be replaced if you remove your ports tree for the cvsup > svn (or...) change.
BTW you can also put PORTVERSION= , PORTREVISION= , DISTVERSION= variables (with numbers) in that file to [possibily] add functionality [or some other result...] , maybe even removing the BROKEN line, but that would require more testing/work etc... even after each cvsup/svn/...


----------



## SirDice (Oct 12, 2012)

Any specific port? There are quite a few 'global' options you can use, WITHOUT_X11 or WITHOUT_HAL for example.


----------



## Seeker (Oct 13, 2012)

Yes, audio/oss is in question.
Newer version of it, doesn't work, so I want to prevent it, from updating.

I just updated my ports via:

```
# portupgrade -a -x audio/oss
```

But that is not the way, I want to do it.


----------



## ondra_knezour (Oct 13, 2012)

Portugrade and related tools will honor (even empty) file/var/db/pkg/insert_port_name/+IGNOREME. I found also some discussions in lists about portmaster and this file. However I don't know, on which level is this file searched/processed, especially if make commands in ports directories will take its existence in account. Some greping in global Makefiles for ports may give answer.

You may also define HOLD_PKGS in pkgtools.conf, but this is only portupgrade related, not system wide, as you asked.

Using globally defined KNOBS, as SirDice stated, or if clausule shown by jb_fvwm2 in /etc/make.conf[.local] are only system wide methods known to me.


----------



## jb_fvwm2 (Oct 13, 2012)

That was /usr/ports/audio/oss/Makefile.local, not a make.conf.


----------



## zeissoctopus (Oct 14, 2012)

According to optionsng syntax, you may system wide deselect a option by insert a OPTIONS_UNSET+= line in /etc/make.conf.

To deselect OSS in whole system wide in port option, you may add a line in /etc/make.conf

```
OPTIONS_UNSET+=OSS
```


----------



## Seeker (Oct 14, 2012)

*jb_fvwm2*: => I want to avoid touching/editing/populating port's tree and writing Makefile's code lines.
Just 1 Makefile *var*, on 1 line must do the trick.


*BOTH's*

*ondra_knezour's* approach:

```
# touch /var/db/pkg/oss-4.2.b2006_3/+IGNOREME
```
*AND*
*zeissoctopus's* approach:

```
# echo 'OPTIONS_UNSET+=OSS' >> /etc/make.conf
```
*Failed* for:

```
# portupgrade -a
```
*AND* for:

```
# cd /usr/ports/audio/oss && make
```
As both started upgrade to 4.2.b2007 from 4.2.b2006_3


----------

