Bug#298566: java-package: command-line parameter for make-jpkg to set priority

2005-03-31 Thread Markus Schaber
Hi, Jeroen,

Jeroen van Wolffelaar wrote:
 On Tue, Mar 08, 2005 at 03:54:02PM +0100, Rico Schiekel wrote:
 this patch add an command-line parameter to set an alternative priority for
 update-alternatives.
 
 ...
   --email EMAIL  email address used in the maintainer field of the 
 package
   --changes  create a .changes file
   --priority PRIOset the update alternatives priority level
 ...
 
 I primarily use this, cause I have installed sun's jdk 1.5, but want
 ibm's jdk 1.4 as default sdk.
 
 Priorities are not meant to be changed by the user, only by package
 maintainers. You can (should) use update-alternatives --set or --config
 to set alternatives as system administrator, rather than changing the
 packages so that the packages of your preference have the highest
 priority.

Well, as the make-jpkg users actually create the jdk packages, they
could be seen as the jdk package mainainers, and so have the right to
set the priorities for the jdk package.

Imagine a development department or university computer room, where the
admin does not want to have sablevm as the default JVM (which currently
uses 350), but his own self-generated SUN jdk deb. Usually, those have
their own central package repository, and run auto-upgrades via crontab
against this private server.

With the command line parameter, he just has to add this option on
make-jpkg, puts his jdk deb into the repository and everything is fine.
Without, he has to run update-alternatives for N machines and M
installed programs (java, javac, javah, jar etc.). Of course, this is
scriptable, but it opens a maintainance nightmare, especially as all
those alternatives are now switched to manual status, and he must
remember to reset them back to automatic or to his new manual preference
whenever he removes the package.

The admin does indeed create the packages, is fully responsible for the
users complaints and even has his own name and address in the maintainer
field of the package (--full-name and --email), but is not the package
maintainer?

Just my thoughts on this...

Markus


signature.asc
Description: OpenPGP digital signature


Bug#298566: java-package: command-line parameter for make-jpkg to set priority

2005-03-08 Thread Rico Schiekel
Package: java-package
Version: 0.20
Severity: wishlist
Tags: patch


this patch add an command-line parameter to set an alternative priority for
update-alternatives.

...
  --email EMAIL  email address used in the maintainer field of the package
  --changes  create a .changes file
  --priority PRIOset the update alternatives priority level
...

I primarily use this, cause I have installed sun's jdk 1.5, but want
ibm's jdk 1.4 as default sdk.

the patch 'priority.diff' add the functionality to the unpatched
java-package-2.0.
the patch 'priority_ibm.diff' add additional support for ibm
jre's/jdk's and need the patch from #264137.
(http://bugs.debian.org/cgi-bin/bugreport.cgi/ibm_jdk_jre.diff?bug=264137msg=16att=1)

regards,
rico

-- System Information:
Debian Release: 3.1
Architecture: i386 (i686)
Kernel: Linux 2.6.10-as3-fire
Locale: LANG=de_DE, LC_CTYPE=de_DE (charmap=ISO-8859-1)
diff -rNu java-package-0.20.old/blackdown-j2re1.3/install 
java-package-0.20/blackdown-j2re1.3/install
--- java-package-0.20.old/blackdown-j2re1.3/install 2005-02-08 
15:27:58.0 +0100
+++ java-package-0.20/blackdown-j2re1.3/install 2005-03-07 19:12:05.0 
+0100
@@ -1,5 +1,5 @@
 j2se_base=/usr/lib/j2re1.3-blackdown
-priority=313
+test -z $priority  priority=313
 
 if [ ! -e $j2se_base/debian/info ]; then
 exit 0
diff -rNu java-package-0.20.old/blackdown-j2re1.4/install 
java-package-0.20/blackdown-j2re1.4/install
--- java-package-0.20.old/blackdown-j2re1.4/install 2005-02-08 
15:27:58.0 +0100
+++ java-package-0.20/blackdown-j2re1.4/install 2005-03-07 19:12:05.0 
+0100
@@ -1,7 +1,7 @@
 j2se_base=/usr/lib/j2re1.4-blackdown
 
 # due to prior brokenness
-priority=314
+test -z $priority  priority=314
 
 if [ ! -e $j2se_base/debian/info ]; then
 exit 0
diff -rNu java-package-0.20.old/blackdown-j2sdk1.3/install 
java-package-0.20/blackdown-j2sdk1.3/install
--- java-package-0.20.old/blackdown-j2sdk1.3/install2005-02-08 
15:28:00.0 +0100
+++ java-package-0.20/blackdown-j2sdk1.3/install2005-03-07 
19:12:05.0 +0100
@@ -1,5 +1,5 @@
 j2se_base=/usr/lib/j2sdk1.3-blackdown
-priority=313
+test -z $priority  priority=313
 
 if [ ! -e $j2se_base/debian/info ]; then
 exit 0
diff -rNu java-package-0.20.old/blackdown-j2sdk1.4/install 
java-package-0.20/blackdown-j2sdk1.4/install
--- java-package-0.20.old/blackdown-j2sdk1.4/install2005-02-08 
15:28:01.0 +0100
+++ java-package-0.20/blackdown-j2sdk1.4/install2005-03-07 
19:12:05.0 +0100
@@ -1,5 +1,5 @@
 j2se_base=/usr/lib/j2sdk1.4-blackdown
-priority=314
+test -z $priority  priority=314
 
 if [ ! -e $j2se_base/debian/info ]; then
 exit 0
diff -rNu java-package-0.20.old/lib/j2se.sh java-package-0.20/lib/j2se.sh
--- java-package-0.20.old/lib/j2se.sh   2005-02-08 17:40:54.0 +0100
+++ java-package-0.20/lib/j2se.sh   2005-03-07 18:49:00.0 +0100
@@ -72,6 +72,7 @@
 set -e
 
 if [ \$1 = configure ]; then
+priority=$priority
 EOF
cat $lib_dir/$j2se_package/install  $debian_dir/postinst
 
diff -rNu java-package-0.20.old/make-jpkg java-package-0.20/make-jpkg
--- java-package-0.20.old/make-jpkg 2005-01-25 00:07:35.0 +0100
+++ java-package-0.20/make-jpkg 2005-03-07 19:48:53.0 +0100
@@ -30,6 +30,7 @@
   --full-name NAME   full name used in the maintainer field of the package
   --email EMAIL  email address used in the maintainer field of the package
   --changes  create a .changes file
+  --priority PRIOset the update alternatives priority level
 
   --help display this help and exit
   --version  output version information and exit
@@ -71,6 +72,10 @@
maintainer_email=$1
 elif [[ x$1 == x--changes ]]; then
genchanges=true
+elif [[ x$1 == x--priority ]]; then
+   [ $# -le 1 ]  missing_argument $1
+   shift
+   priority=$1
 else
unrecognized_option $1
 fi
diff -rNu java-package-0.20.old/make-jpkg.1 java-package-0.20/make-jpkg.1
--- java-package-0.20.old/make-jpkg.1   2004-10-12 01:10:23.0 +0200
+++ java-package-0.20/make-jpkg.1   2005-03-07 19:49:08.0 +0100
@@ -41,6 +41,9 @@
 .B --changes
 create a .changes file
 .TP
+.B --priority \fIPRIO\fR
+set the update alternatives priority level
+.TP
 .B --help
 display help text and exit
 .TP
diff -rNu java-package-0.20.old/sun-j2re1.3/install 
java-package-0.20/sun-j2re1.3/install
--- java-package-0.20.old/sun-j2re1.3/install   2005-02-08 15:28:03.0 
+0100
+++ java-package-0.20/sun-j2re1.3/install   2005-03-07 19:12:05.0 
+0100
@@ -1,5 +1,5 @@
 j2se_base=/usr/lib/j2re1.3-sun
-priority=313
+test -z $priority  priority=313
 
 if [ ! -e $j2se_base/debian/info ]; then
 exit 0
diff -rNu java-package-0.20.old/sun-j2re1.4/install 
java-package-0.20/sun-j2re1.4/install
--- java-package-0.20.old/sun-j2re1.4/install   2005-02-08 15:28:04.0 
+0100
+++ 

Bug#298566: java-package: command-line parameter for make-jpkg to set priority

2005-03-08 Thread Barry Hawkins
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Rico Schiekel wrote:
[...]
| this patch add an command-line parameter to set an alternative
priority for
| update-alternatives.
|
| ...
|   --email EMAIL  email address used in the maintainer field of the
package
|   --changes  create a .changes file
|   --priority PRIOset the update alternatives priority level
| ...
|
| I primarily use this, cause I have installed sun's jdk 1.5, but want
| ibm's jdk 1.4 as default sdk.
|
| the patch 'priority.diff' add the functionality to the unpatched
| java-package-2.0.
| the patch 'priority_ibm.diff' add additional support for ibm
| jre's/jdk's and need the patch from #264137.
|
(http://bugs.debian.org/cgi-bin/bugreport.cgi/ibm_jdk_jre.diff?bug=264137msg=16att=1)
|
| regards,
| rico
[...]
Rico,
~I am currently testing your patch from Bug# 264137 for all the
current IBM JDKs on PowerPC and x86 before committing.  Please contact
me individually and let's talk so as to coordinate your effort and
valuable contribution.  Also, you may like to join us on IRC at
irc.freenode.net, channel #debian-java.  My nick is barryh.
~Joerg will have to approve any mods to update-alternatives, but that
certainly sounds like a useful option..
Regards,
- --
Barry Hawkins
All Things Computed
site: www.alltc.com
weblog: www.yepthatsme.com
Registered Linux User #368650
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.0 (GNU/Linux)
iD8DBQFCLcM27bZ6kUftWZwRAqjdAJ9iKAgjDOEXq0Ks51vj/FU4W+jBWQCg2aOc
9cn9sq8JqvQ96GrCE2YFaI4=
=IPb0
-END PGP SIGNATURE-
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]