# portupgrade and recursively exlude



## SIFE (Jan 15, 2010)

salamo alikom
i am fixing a problem in my box (missing library) ,so i am rebuilding my packages ,rebuilding it in parts ,ex :

```
portupgrade -rRf lib*
```
now i want to rebuild gtk* with out rebuilding packages that already rebuild it from previus command like this :

```
portupgrade -rR gtk* -xrR lib*
```


----------



## fronclynne (Jan 15, 2010)

AFIK [red]-x[/red] does not work like that.

Further, without [red]-f[/red] it won't rebuild up-to-date ports in any case.  `# portupgrade -fR gtk\*` should almost never be needed, excepting that you're getting unusual gtk errors when trying to run things like firefox or gimp.  Just make sure everything under `% pkg_info -r gtk-2\*` is already up to date, & run `# portupgrade -r gtk\*` (or with the addition of [red]-f[/red], if things break).


----------



## fronclynne (Jan 16, 2010)

I ought to add: what you probably _want_ to do is
`# portupgrade -Rx gtk-2\* gtk-2\* && portupgrade -r -x lib\* gtk\*` 

NB I am not entirely certain this won't grab the *second* match for [red]lib\*[/red] and recursively update that as well, though I would think you will have little to no problem if you just leave out the [red]-x lib\*[/red] bit, in any case.


----------

