# 9.0 to 9.1p1 ports update patch failures



## klugja (Mar 12, 2013)

How do I keep patches up to date in the ports directory that I do not write myself?  Is there documentation on how to update FreeBSD supplied patches?

I had problems building individual ports due to patch issues, so I executed the following:


```
portupgrade -afc
  ...
=> motif-2.3.4-src.tgz doesn't seem to exist in /usr/ports/distfiles/.
=> Attempting to fetch http://heanet.dl.sourceforge.net/project/motif/Motif%202.3.4%20Source%2
0Code/motif-2.3.4-src.tgz
motif-2.3.4-src.tgz                           100% of 9303 kB  229 kBps 00m00s
===>  Extracting for open-motif-2.3.4
=> SHA256 Checksum OK for motif-2.3.4-src.tgz.
===>  Patching for open-motif-2.3.4
===>  Applying FreeBSD patches for open-motif-2.3.4
File to patch:
```

Looking at ps and lsof, there is a patch being applied for Makefile.in found in /usr/ports/x11-toolkits/open-motif/files.  Makefile.in does not exist in motif-1.3.4-src.tgz.

Looking at the portupgrade man page, I do not see the word _patch_.

How are the patches updated?  Is it possible to continue the current portupgrade, or do I have to start all over again?


----------



## SirDice (Mar 12, 2013)

portsnap(8)


----------



## Carpetsmoker (Mar 13, 2013)

The patch for Makefile.in was removed about 4 months ago, so you have an outdated ports tree. You'll need to update it.

Portsnap is the recommended (though not only) way to do so, in brief, running [cmd=]portsnap fetch update[/cmd] will do so. The FreeBSD handbook and the manpage list more detailed instructions.

(When you get strange errors, it's always a good idea to use freshports to check if there have been updates to the ports).



			
				SirDice said:
			
		

> portsnap(8)



Your internet connection is being payed by the number of characters you type? Or is there a puzzle game going on I am not aware of?


----------



## klugja (Mar 13, 2013)

I suspect the problem was caused by an archive restore that restored deleted files.

To fix this I did [cmd=]portsnap extract[/cmd] which re-established /usr/ports.


----------



## SirDice (Mar 13, 2013)

Carpetsmoker said:
			
		

> Your internet connection is being payed by the number of characters you type? Or is there a puzzle game going on I am not aware of?


Nah. I have, for the past three days, a headache that just doesn't want to go away. Got out of bed on the wrong side and had a horrible work day. I'm just glad I didn't bite someone's head off.


----------

