Mail Archives: cygwin/2006/06/06/14:41:37
--------------030904030003050701060107
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Hi Yaakov,
I added a function pkgcheck, which checks for duplicate and missing
files comparing inst to the generated binpkg files.
To check if the manually written pkg_names[] array is correct.
This is only useful for splitted packages.
I found it useful for postgresql, which is quite split up.
Maybe you want to look at it.
Note: I allow duplicate /usr/include *.h files, because server and
client libs might want to share these.
--
Reini
--------------030904030003050701060107
Content-Type: text/plain;
name="cygport-0.1.93.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="cygport-0.1.93.diff"
--- /usr/bin/cygport 2006-05-12 01:27:53.000000000 +0000
+++ cygport 2006-06-06 18:29:15.445500000 +0000
@@ -15,7 +15,7 @@
set -e
declare -rx _name=cygport
-declare -r _version=0.1.93
+declare -r _version=0.1.94
if [ -n "${CYGPORT_BOOTSTRAP}" -a -n "${top_srcdir}" ]
then
@@ -903,6 +903,39 @@
done
}
+pkg_pkgcheck() {
+ echo ">>> Checking missing/duplicate files for all binary packages"
+ cd ${D}
+ local tmp1="${T}/tmptar.log"
+ local tmp2="${T}/tmpfind.log"
+ [ -e $tmp1 ] && rm -f $tmp1
+ local n=0
+ while [ -n "${pkg_name[${n}]}" ]
+ do
+ tar tjf ${top}/${pkg_name[${n}]}-${PVR}.tar.bz2 | grep -Ev "/$" >> $tmp1
+ let n+=1
+ done
+ sort < $tmp1 > "$tmp1.sorted"
+ mv "$tmp1.sorted" $tmp1
+
+ cd ${D}
+ find * -type f -o -type l | sort > $tmp2
+ if [ $(diff -u0 "$tmp2" "$tmp1" > /dev/nul) ]
+ then
+ rm $tmp1 $tmp2
+ else
+ # duplicate headers should be silently ignored
+ diff -u0 "$tmp2" "$tmp1" | grep -E -v '^@' > "${T}/pkgcheck.diff"
+ if grep -E '^+usr/include.*\.h$' ${T}/pkgcheck.diff > /dev/null
+ then
+ warning "some files might be missing/duplicate in the distribution"
+ cat ${T}/pkgcheck.diff
+ else
+ echo "some duplicate headers might be ignored"
+ fi
+ fi
+}
+
pkg_diff() {
local default_excludes="-x CYGWIN-PATCHES -x aclocal.m4* \
-x ltmain.sh -x config.* -x depcomp -x install-sh -x missing \
@@ -1075,7 +1108,7 @@
}
# protect functions
-readonly -f pkg_binpkg pkg_diff gpg_sign pkg_srcpkg pkg_dist finish
+readonly -f pkg_binpkg pkg_pkgcheck pkg_diff gpg_sign pkg_srcpkg pkg_dist finish
################################################################################
@@ -1234,7 +1267,12 @@
;;
package|pkg)
__stage Packaging
- (pkg_binpkg && pkg_srcpkg && pkg_dist) | tee ${pkglog} 2>&1
+ (pkg_binpkg && pkg_pkgcheck && pkg_srcpkg && pkg_dist) | tee ${pkglog} 2>&1
+ _status=$?
+ ;;
+ pkgcheck)
+ __stage Package check
+ pkg_pkgcheck
_status=$?
;;
diff|mkdiff|mkpatch)
--------------030904030003050701060107
Content-Type: text/plain; charset=us-ascii
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
--------------030904030003050701060107--
- Raw text -