FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo Development

 
 
LinkBack Thread Tools
 
Old 12-16-2007, 01:08 AM
Petteri Räty
 
Default Adding pkg_preinst to java-utils-2 for QA purposes

I wrote a patch to add pkg_preinst to java-utils-2 to check the jars in
the images for problems in the jars but it can later be used for other
stuff too. If there are no objections we will need to modify the
following ebuilds as not to change their behavior. I will do this in
behalf of the maintainers in question so that all the changes go in at
the same time.

betelgeuse@pena /mnt/checkouts/java/scripts $ bash
find-function-usage-in-inheriting-ebuilds.sh --can-add --no-default
java-pkg-2 pkg_preinst
perl-module.eclass: dev-perl/Inline-Java/Inline-Java-0.50.ebuild
perl-module.eclass: dev-perl/Inline-Java/Inline-Java-0.51.ebuild
perl-module.eclass: dev-perl/Inline-Java/Inline-Java-0.52.ebuild

betelgeuse@pena /mnt/checkouts/java/scripts $ bash
find-function-usage-in-inheriting-ebuilds.sh --can-add --no-default
java-pkg-opt-2 pkg_preinst
perl-module.eclass: app-pda/pilot-link/pilot-link-0.12.2.ebuild
perl-module.eclass: dev-util/subversion/subversion-1.3.2-r3.ebuild
perl-module.eclass: dev-util/subversion/subversion-1.3.2-r4.ebuild

The script can be found in
https://overlays.gentoo.org/svn/proj/java/scripts/find-function-usage-in-inheriting-ebuilds.sh

Regards,
Petteri
Index: java-utils-2.eclass
================================================== =================
RCS file: /var/cvsroot/gentoo-x86/eclass/java-utils-2.eclass,v
retrieving revision 1.100
diff -u -r1.100 java-utils-2.eclass
--- java-utils-2.eclass 28 Nov 2007 02:03:48 -0000 1.100
+++ java-utils-2.eclass 16 Dec 2007 01:57:29 -0000
@@ -293,7 +295,6 @@
java-pkg_do_write_
}

-
# ------------------------------------------------------------------------------
# @internal-function depend-java-query
#
@@ -833,6 +830,30 @@
}

# ------------------------------------------------------------------------------
+# @eclass-pkg_preinst
+#
+# Checks jars in the image for problems.
+#
+# ------------------------------------------------------------------------------
+
+java-utils-2_pkg_preinst() {
+ debug-print-function ${FUNCNAME} "${@}"
+ is-java-strict || return
+
+ for jar in $(find "${D}" -name "*.jar"); do
+ for dep in $(unzip -p "${jar}" META-INF/MANIFEST.MF | egrep "^Class-Path:" | cut -d ":" -f 2); do
+ local dir=$(dirname "${jar}")
+ einfo "${dir}/${dep}" "${ROOT}${dir#${D}}/${dep}"
+ if [[ ! -e "${dir}/${dep}" && ! -e "${ROOT}${dir#${D}}/${dep}" ]]; then
+ eerror "${jar}"
+ eerror "has Class-Path entry in Manifest pointing at ${dep}"
+ eerror "but that file does not exist in image or ROOT=${ROOT}"
+ fi
+ done
+ done
+}
+
+# ------------------------------------------------------------------------------
# @section-end install
# ------------------------------------------------------------------------------

@@ -2729,6 +2760,8 @@
return $?
}

+EXPORT_FUNCTIONS pkg_preinst
+
# ------------------------------------------------------------------------------
# @eclass-end
# ------------------------------------------------------------------------------
 

Thread Tools




All times are GMT. The time now is 09:27 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org