From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1GbCln-0001CV-Uo for garchives@archives.gentoo.org; Sat, 21 Oct 2006 09:03:56 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.13.8/8.13.6) with SMTP id k9L92cwS021458; Sat, 21 Oct 2006 09:02:38 GMT Received: from gw02.mail.saunalahti.fi (gw02.mail.saunalahti.fi [195.197.172.116]) by robin.gentoo.org (8.13.8/8.13.6) with ESMTP id k9L92b7p003921 for ; Sat, 21 Oct 2006 09:02:37 GMT Received: from mrp1.mail.saunalahti.fi (mrp1.mail.saunalahti.fi [62.142.5.30]) by gw02.mail.saunalahti.fi (Postfix) with ESMTP id BE6981391FA for ; Sat, 21 Oct 2006 12:02:37 +0300 (EEST) Received: from [192.168.150.87] (a88-112-194-247.elisa-laajakaista.fi [88.112.194.247]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mrp1.mail.saunalahti.fi (Postfix) with ESMTP id 5240333C002 for ; Sat, 21 Oct 2006 12:02:36 +0300 (EEST) Message-ID: <4539E226.5080701@gentoo.org> Date: Sat, 21 Oct 2006 12:02:30 +0300 From: =?UTF-8?B?UGV0dGVyaSBSw6R0eQ==?= User-Agent: Thunderbird 1.5.0.7 (X11/20060930) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-java@gentoo.org MIME-Version: 1.0 To: gentoo-java@lists.gentoo.org Subject: [gentoo-java] Making the --jar argument to dolauncher optional X-Enigmail-Version: 0.94.0.0 OpenPGP: url=http://users.tkk.fi/~praty/public.asc Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig54A3B94716CF44E9C24D1648" X-Archives-Salt: f74fecc4-921c-46ce-9c65-666f5ebf82e6 X-Archives-Hash: 8aac1ccbc9f08978d6048181f042a021 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig54A3B94716CF44E9C24D1648 Content-Type: multipart/mixed; boundary="------------050307030200020001040403" This is a multi-part message in MIME format. --------------050307030200020001040403 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable When a package only install one jar that has the Main-class attribute set there should not be any need to specify the --jar argument to java-pkg_dolauncher so I made the --jar argument optional. Regards, Petteri --------------050307030200020001040403 Content-Type: text/x-patch; name="java-utils-2.eclass.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline; filename="java-utils-2.eclass.patch" Index: java-utils-2.eclass =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /var/cvsroot/gentoo-x86/eclass/java-utils-2.eclass,v retrieving revision 1.24 diff -u -r1.24 java-utils-2.eclass --- java-utils-2.eclass 27 Sep 2006 21:35:54 -0000 1.24 +++ java-utils-2.eclass 21 Oct 2006 08:59:59 -0000 @@ -563,8 +563,10 @@ echo "#!/bin/bash" > "${target}" [[ -n "${pre}" ]] && [[ -f "${pre}" ]] && cat "${pre}" >> "${target}" echo "gjl_package=3D${JAVA_PKG_NAME}" >> "${target}" - cat "${var_tmp}" >> "${target}" - rm -f "${var_tmp}" + if [[ -f "${var_tmp}" ]]; then + cat "${var_tmp}" >> "${target}" + rm -f "${var_tmp}" + fi echo "source /usr/share/java-config-2/launcher/launcher.bash" >> "${tar= get}" =20 if [[ -n "${target_dir}" ]]; then --------------050307030200020001040403 Content-Type: text/x-patch; name="launcher.bash.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline; filename="launcher.bash.patch" Index: launcher.bash =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- launcher.bash (revision 3104) +++ launcher.bash (working copy) @@ -25,7 +25,13 @@ elif [[ -n ${gjl_jar} ]]; then request=3D"${request} --get-jar ${gjl_jar}" else - abort "Need main or jar to start" + # Check if the installed package has only one jar and use that + jars=3D$(java-config --classpath=3D${gjl_package}) + if [[ "${jars/:}" =3D "${jars}" ]]; then + request=3D"${request} --get-jar ${jars}" + else + abort "Need main or jar to start" + fi fi =20 if [[ -z ${GENTOO_VM} ]]; then --------------050307030200020001040403-- --------------enig54A3B94716CF44E9C24D1648 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFOeIqcxLzpIGCsLQRAiecAJ9LiVw5Zd2+h7qiSFtoRWBHTaaP9gCfUcyi PfV51etM2ekwPPNVJiuyukQ= =EXg2 -----END PGP SIGNATURE----- --------------enig54A3B94716CF44E9C24D1648-- -- gentoo-java@gentoo.org mailing list