diff -Nru pkgutils-5.34.2-orig/pkgmk.8.in pkgutils-5.34.2/pkgmk.8.in
--- pkgutils-5.34.2-orig/pkgmk.8.in	2009-09-11 23:04:55.952842011 +0300
+++ pkgutils-5.34.2/pkgmk.8.in	2009-09-11 23:05:14.167841307 +0300
@@ -43,6 +43,9 @@
 .B "\-if, \-\-ignore\-footprint"
 Build package without checking footprint.
 .TP
+.B "\-in, \-\-ignore\-new"
+Build package, ignore new files in a footprint missmatch.
+.TP
 .B "\-um, \-\-update\-md5sum"
 Update md5sum using the current source files.
 .TP
diff -Nru pkgutils-5.34.2-orig/pkgmk.in pkgutils-5.34.2/pkgmk.in
--- pkgutils-5.34.2-orig/pkgmk.in	2009-09-11 23:04:55.952842011 +0300
+++ pkgutils-5.34.2/pkgmk.in	2009-09-11 23:05:14.183840968 +0300
@@ -21,6 +21,18 @@
 #  USA.
 #
 
+##
+# error codes
+E_GENERAL=1
+E_PKGFILE=2    # invalid Pkgfile
+E_DIR_PERM=3   # (source/build) directory missing or missing read/write permission
+E_DOWNLOAD=4   # error during download
+E_UNPACK=5     # error during unpacking of source file(s)
+E_MD5=6        # md5sum verification failed
+E_FOOTPRINT=7  # footprint check failure
+E_BUILD=8      # error while running 'build()'
+E_INSTALL=9    # error while installing the package via 'pkgadd'
+
 info() {
 	echo "=======> $1"
 }
@@ -49,29 +61,29 @@
 check_pkgfile() {
 	if [ ! "$name" ]; then
 		error "Variable 'name' not specified in $PKGMK_PKGFILE."
-		exit 1
+		exit $E_PKGFILE
 	elif [ ! "$version" ]; then
 		error "Variable 'version' not specified in $PKGMK_PKGFILE."
-		exit 1
+		exit $E_PKGFILE
 	elif [ ! "$release" ]; then
 		error "Variable 'release' not specified in $PKGMK_PKGFILE."
-		exit 1
+		exit $E_PKGFILE
 	elif [ "`type -t build`" != "function" ]; then
 		error "Function 'build' not specified in $PKGMK_PKGFILE."
-		exit 1
+		exit $E_PKGFILE
 	fi
 }
 
 check_directory() {
 	if [ ! -d $1 ]; then
 		error "Directory '$1' does not exist."
-		exit 1
+		exit $E_DIR_PERM
 	elif [ ! -w $1 ]; then
 		error "Directory '$1' not writable."
-		exit 1
+		exit $E_DIR_PERM
 	elif [ ! -x $1 ] || [ ! -r $1 ]; then
 		error "Directory '$1' not readable."
-		exit 1
+		exit $E_DIR_PERM
 	fi
 }
 
@@ -87,7 +99,7 @@
 
 	if [ ! "`type -p wget`" ]; then
 		error "Command 'wget' not found."
-		exit 1
+		exit $E_GENERAL
 	fi
 
 	LOCAL_FILENAME=`get_filename $1`
@@ -129,7 +141,7 @@
 	
 	if [ $error != 0 ]; then
 		error "Downloading '$1' failed."
-		exit 1
+		exit $E_DOWNLOAD
 	fi
 	
 	mv -f "$LOCAL_FILENAME_PARTIAL" "$LOCAL_FILENAME"
@@ -143,13 +155,13 @@
 		if [ ! -e $LOCAL_FILENAME ]; then
 			if [ "$LOCAL_FILENAME" = "$FILE" ]; then
 				error "Source file '$LOCAL_FILENAME' not found (can not be downloaded, URL not specified)."
-				exit 1
+				exit $E_DOWNLOAD
 			else
 				if [ "$PKGMK_DOWNLOAD" = "yes" ]; then
 					download_file $FILE
 				else
 					error "Source file '$LOCAL_FILENAME' not found (use option -d to download)."
-					exit 1
+					exit $E_DOWNLOAD
 				fi
 			fi
 		fi
@@ -177,7 +189,7 @@
 				rm -rf $PKGMK_WORK_DIR
 			fi
 			error "Building '$TARGET' failed."
-			exit 1
+			exit $E_UNPACK
 		fi
 	done
 }
@@ -224,11 +236,11 @@
 
 			if [ "$PKGMK_CHECK_MD5SUM" = "yes" ]; then
 				error "Md5sum not ok."
-				exit 1
+				exit $E_MD5
 			fi
 
 			error "Building '$TARGET' failed."
-			exit 1
+			exit $E_MD5
 		fi
 	else
 		if [ "$PKGMK_CHECK_MD5SUM" = "yes" ]; then
@@ -236,7 +248,7 @@
 				rm -rf $PKGMK_WORK_DIR
 			fi
 			info "Md5sum not found."
-			exit 1
+			exit $E_MD5
 		fi
 		
 		warning "Md5sum not found, creating new."
@@ -318,9 +330,14 @@
 				sed 's/^+/NEW       /g' | \
 				sed 's/^-/MISSING   /g' > $FILE.footprint.diff
 			if [ -s $FILE.footprint.diff ]; then
-				error "Footprint mismatch found:"
+				if [ "$PKGMK_IGNORE_NEW" = "yes" ] && \
+				   [ -z "$(egrep -l ^MISSING $FILE.footprint.diff)" ] ; then
+					info "New files found:"
+				else
+				        error "Footprint mismatch found:"
+					BUILD_SUCCESSFUL="no"
+				fi
 				cat $FILE.footprint.diff >&2
-				BUILD_SUCCESSFUL="no"
 			fi
 		else
 			warning "Footprint not found, creating new."
@@ -401,7 +418,7 @@
 			touch -r $PKGMK_ROOT/$PKGMK_PKGFILE $TARGET &> /dev/null
 		fi
 		error "Building '$TARGET' failed."
-		exit 1
+		exit $E_BUILD
 	fi
 }
 
@@ -424,7 +441,7 @@
 		info "Installing '$TARGET' succeeded."
 	else
 		error "Installing '$TARGET' failed."
-		exit 1
+		exit $E_INSTALL
 	fi
 }
 
@@ -463,7 +480,7 @@
 update_footprint() {
 	if [ ! -f $TARGET ]; then
 		error "Unable to update footprint. File '$TARGET' not found."
-		exit 1
+		exit $E_FOOTPRINT
 	fi
 	
 	check_file "$PKGMK_FOOTPRINT"
@@ -499,7 +516,7 @@
 		rm -rf $PKGMK_WORK_DIR
 	fi
 	
-	exit 1
+	exit $E_GENERAL
 }
 
 print_help() {
@@ -548,6 +565,8 @@
 				PKGMK_UPDATE_FOOTPRINT="yes" ;;
 			-if|--ignore-footprint)
 				PKGMK_IGNORE_FOOTPRINT="yes" ;;
+			-in|--ignore-new)
+				PKGMK_IGNORE_NEW="yes" ;;
 			-um|--update-md5sum)
 				PKGMK_UPDATE_MD5SUM="yes" ;;
 			-im|--ignore-md5sum)
@@ -565,7 +584,7 @@
 			-cf|--config-file)
 				if [ ! "$2" ]; then
 					echo "`basename $PKGMK_COMMAND`: option $1 requires an argument"
-					exit 1
+					exit $E_GENERAL
 				fi
 				PKGMK_CONFFILE="$2"
 				shift ;;
@@ -577,7 +596,7 @@
 				exit 0 ;;
 			*)
 				echo "`basename $PKGMK_COMMAND`: invalid option $1"
-				exit 1 ;;
+				exit $E_GENERAL ;;
 		esac
 		shift
 	done
@@ -596,7 +615,7 @@
 	for FILE in $PKGMK_PKGFILE $PKGMK_CONFFILE; do
 		if [ ! -f $FILE ]; then
 			error "File '$FILE' not found."
-			exit 1
+			exit $E_GENERAL
 		fi
 		. $FILE
 	done
@@ -690,6 +709,7 @@
 PKGMK_UP_TO_DATE="no"
 PKGMK_UPDATE_FOOTPRINT="no"
 PKGMK_IGNORE_FOOTPRINT="no"
+PKGMK_IGNORE_NEW="no"
 PKGMK_FORCE="no"
 PKGMK_KEEP_WORK="no"
 PKGMK_UPDATE_MD5SUM="no"
