X-Spam-Check-By: sourceware.org Message-ID: <44867B35.8020802@x-ray.at> Date: Wed, 07 Jun 2006 09:07:33 +0200 From: Reini Urban User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de-AT; rv:1.8.0.4) Gecko/20060516 SeaMonkey/1.0.2 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: cygport pkgcheck References: <4485CC6E DOT 5060800 AT x-ray DOT at> <44861BA3 DOT 2050509 AT users DOT sourceforge DOT net> In-Reply-To: <44861BA3.2050509@users.sourceforge.net> Content-Type: multipart/mixed; boundary="------------010701030008080503090500" X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com --------------010701030008080503090500 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Yaakov S (Cygwin Ports) schrieb: > Reini Urban wrote: >> 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. > > OK, sounds interesting. > >> Note: I allow duplicate /usr/include *.h files, because server and >> client libs might want to share these. > > I don't understand; if a file is present in more than one package, then > you get all sorts of problems with clobbering, missing files, etc. This > is a limitation of setup.exe that we have to deal with. A given file > should be in one and only one package, period. > > Unless I misunderstood you, could you please make a new patch without > that part of the code. Agreed. Attached is the new version. No ChangeLog, ... entries. -- Reini --------------010701030008080503090500 Content-Type: text/plain; name="cygport-0.1.93-2.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="cygport-0.1.93-2.diff" --- /usr/bin/cygport 2006-05-12 01:27:53.000000000 +0000 +++ cygport 2006-06-07 06:50:03.648625000 +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,44 @@ done } +pkg_pkgcheck() { + echo ">>> Checking missing/duplicate files for all binary packages" + cd ${D} + local _status=0 + 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/null + then + rm $tmp1 $tmp2 && true + else + # detect duplicates and missing files + diff -u0 "$tmp2" "$tmp1" | grep -E -v '^@' > "${T}/pkgcheck.diff" + if grep -E '^\+[^\+]' ${T}/pkgcheck.diff > /dev/null + then + warning "duplicate files in the distribution:" + grep -E '^\+[^\+]' ${T}/pkgcheck.diff + fi + if grep -E '^-[^\-]' ${T}/pkgcheck.diff > /dev/null + then + warning "missing files in the distribution:" + grep -E '^-[^\-]' ${T}/pkgcheck.diff + fi + false + 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 +1113,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 +1272,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) --------------010701030008080503090500 Content-Type: text/plain; name="cygport-README-0.1.93-2.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="cygport-README-0.1.93-2.diff" --- /usr/share/doc/cygport-0.1.93/README.orig 2006-05-12 01:28:05.000000000 +0000 +++ /usr/share/doc/cygport-0.1.93/README 2006-06-07 06:58:55.523625000 +0000 @@ -167,6 +167,7 @@ list - create a file listing suitable for the Cygwin README deps - list direct dependencies of all executables dist - copy packages into a directory structure suitable for upload + pkgcheck - check the binary packages for missing and duplicate files For compatibility, the sole arguments --help or --version may also be passed to cygport. --------------010701030008080503090500 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/ --------------010701030008080503090500--