Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Wed 17 Sep 2014, 19:42
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
How to make my .pet download the correct Java version?
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [7 Posts]  
Author Message
elroy


Joined: 02 Feb 2012
Posts: 374

PostPosted: Fri 24 Aug 2012, 12:22    Post subject:  How to make my .pet download the correct Java version?
Subject description: Package manager issues
 

Hi,

This is a package-manager issue concerning Saluki/wary. Hopefully someone can help me with this because it’s driving me crazy. I suspect that I’m overlooking something very simple, but I can’t quite wrap my head around it. So here it goes...

I have a problem with a .pet I’ve created. It requires a version of java that’s greater than or equal to a said version; upon install (while downloading - trying to locate missing deps) it insists on downloading an earlier version. I’ve tried everything I can think of - &ge, &eq, and even &lt (just for s-and-g’s). The following are the Pet-specs of the two versions of the java Pets in question, the first is the older, undesirable version, and the second is the version I would like downloaded (at the minimum):
Code:
jre-1.6u30-i586|jre|1.6u30-i586||BuildingBlock|110080K||jre-1.6u30-i586.pet||java runtime environment|puppy|wary5||

Code:
jre-1.7.0-06|jre|1.7.0-06||BuildingBlock|139124K||jre-1.7.0-06.pet||Java Web Start|puppy|wary5||

And here’s the Pet specs of the package in question, with the &ge flag set:
Code:
tuxguitar-1.2|tuxguitar|1.2||Multimedia|8640K||tuxguitar-1.2.pet|+fluidsynth,+jack-audio-connection-kit,+jre&ge1.7.0-06|Write/play-back guitar tablature|puppy|wary5||

Regardless which flags I choose, it only offers to download the older 1.6u30-i586 version.

Any help would be greatly appreciated. Thank you in advance.
Back to top
View user's profile Send private message 
Monsie


Joined: 01 Dec 2011
Posts: 633
Location: Kamloops BC Canada

PostPosted: Sun 26 Aug 2012, 04:55    Post subject: How to make my .pet download the correct Java version?  

Hi elroy,

This is an interesting problem...

I looked at some of the source code and I see that the tuxguitar shell script searches for the version of Java that you have installed on your system... and even tries to guess at other locations than those found in various operating systems. Having found this, here is what I would do:

    install or load Java 1.7x
    edit tuxguitar.sh in the source code to include the path and variables for Java 1.7x
    re-compile Tux Guitar from source, then build your pet from that


It looks like you might also have to have to include the path for SeaMonkey in the tuxguitar shell script.

Hope this helps,
Monsie

_________________
My username is pronounced: "mun-see". Derived from my surname, it was my nickname throughout high school.
Back to top
View user's profile Send private message 
npierce

Joined: 28 Dec 2009
Posts: 858

PostPosted: Mon 27 Aug 2012, 09:41    Post subject:  

elroy wrote:
Regardless which flags I choose, it only offers to download the older 1.6u30-i586 version.

I do not know why it does not offer to download the specified version. When I try the specs you supplied, PPM offers to download either version.

So I do not have an answer for that.

But the other problem -- the fact that it is offering to download a version that doesn't meet the specification -- appears to be a bug. See Some PPM versioning problems
Back to top
View user's profile Send private message 
elroy


Joined: 02 Feb 2012
Posts: 374

PostPosted: Wed 29 Aug 2012, 12:51    Post subject:  

Thank you for the replies, gentlemen. You've given me some great ideas to try and sort this out. I'll update this thread if I do indeed find an answer.
Back to top
View user's profile Send private message 
elroy


Joined: 02 Feb 2012
Posts: 374

PostPosted: Sat 01 Sep 2012, 18:10    Post subject:  

My solution, which actually doesn't solve the problem but does create a workable work-around, is to create a script that does nothing if java is installed, but nags the user, and exits, if it isn't...

Code:
onError()
{
   yad --title="TuxGuitar" --button="gtk-close:0"  --text="Java must be installed before running TuxGuitar."
   exit 0
}

command -v java >/dev/null 2>&1 || onError
/usr/share/tuxguitar-1.2/tuxguitar &
exit 0


In this way, if java is installed, the app works as expected. If java isn't installed, or it has been removed at some point, upon trying to run TuxGuitar an error message appears and the application exits.

The whole impetus to download the desired version of java was the fact that the said older version of java completely wiped out the /usr/lib/firefox folder when loaded as a pet. When loaded as an sfs (it's offered as both pet/sfs in the Saluki repository, and the sfs is exactly the same as the pet, just repackaged as an sfs) it doesn't display this behavior. Odd...you'd think it'd overlay in both cases, but this is not the case when used as a pet. If I could use an sfs as a dependency I would have done so as I wouldn't have had to create a newer version of java that did not display this behavior when loaded as a pet. But that is what I indeed had to do. That was why it was so frustrating that the repo wouldn't download the newer version of java by default. I didn't want Firefox users to be inconvenienced by having their .desktop file rendered useless when using the older jave pet.

So, in closing, this isn't the perfect solution. I ended up creating a newer version of java as a pet that doesn't destroy the /usr/lib/firefox folder. But in the end it's up to the end user to download the correct version. However, I believe it'd be better if this whole process was more 'idiot-proof'. The ability of dependencies to be sfs' would be nice, as would the ability of pets to run install/uninstall scripts would be key, too. Perhaps something to consider in future versions of Puppy Linux.

This is the solution I used. If you have a better idea, then please let me know.

Thank you,
elroy
Back to top
View user's profile Send private message 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7047
Location: Perth, Western Australia

PostPosted: Sat 01 Sep 2012, 18:35    Post subject:  

npierce wrote:
elroy wrote:
Regardless which flags I choose, it only offers to download the older 1.6u30-i586 version.

I do not know why it does not offer to download the specified version. When I try the specs you supplied, PPM offers to download either version.

So I do not have an answer for that.

But the other problem -- the fact that it is offering to download a version that doesn't meet the specification -- appears to be a bug. See Some PPM versioning problems


The solution from npierce has been implemented in Woof, so will be in future puppies (such as the next Precise Puppy beta5):

http://bkhome.org/blog/?viewDetailed=02978

_________________
http://bkhome.org/news/
Back to top
View user's profile Send private message Visit poster's website 
elroy


Joined: 02 Feb 2012
Posts: 374

PostPosted: Sat 01 Sep 2012, 18:50    Post subject:  

Thank you, Barry. Am looking forward to the future Smile
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [7 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Users ( For the regulars )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0699s ][ Queries: 12 (0.0075s) ][ GZIP on ]