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 Tue 22 May 2018, 23:51
All times are UTC - 4
 Forum index » House Training » Bugs ( Submit bugs )
Full Install hack-fix
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [1 Post]  
Author Message

Joined: 11 Oct 2008
Posts: 8671
Location: qld

PostPosted: Mon 27 Dec 2010, 03:27    Post subject:  Full Install hack-fix
Subject description: avoids the puppy 2 dependencies in puppy 500 plus

Full install bug

[Note, this post edited on 20101228 at 09:16 AEST]

I decided to post my attempt to fix the full install bug for 5 series puppies here.

What was happening, if you had a clean linux partition on your hard drive and wanted to do a full install
you would get an xmessage informing that puppy 2 dependencies were missing. Not good for a new user.

Note: This is different to selecting "wipe" in the universal installer.

Line 58 in /etc/rc.d/rc.update is called from /usr/sbin/puppyinstaller

It defines 2 variables NEWFILESMNTPT="/srcmntpt" and OLDFILESMNTPT=""

Now you have to consider that /scrmntpt is mounted in a chroot in the target partition see /usr/sbin/puppyinstaller

Consider this line:
line 100- [ -f $OLDFILESMNTPT/etc/DISTRO_SPECS ] && OLDPVERSION=`grep '^DISTRO_VERSION' $OLDFILESMNTPT/etc/DISTRO_SPECS | cut -f 2 -d '=' | cut -f 1 -d ' '`

Now, OLDFILESMNTPT="" we are told, so you would think that OLDPVERSION=""

But for some strange reason that I can't explain it is assigned "0" , that is OLDPVERSION="0"


If OLDPVERSION were truly undefined, or not exist, then that line would be fine, but since it got this
value of zero then the next part of the script (to my way of thinking) runs where it shouldn't

New stuff

Barry has accepte my alteration upstream , but slightly changed, the effect is less dramatic, understandable with Wary due soon.


the line 101 remains commented, and the next lines are now this:

if [ "$OLDPVERSION" = "0" ];then #101228 01micko: workaround for weird bug, full hd install.

The "else" statement around line 318 is now not added

See first attachment

End: New stuff


Old stuff

line 103: if [ $NEWPVERSION -gt $OLDPVERSION ];then (large block of code to line 318 follows)

My hack is to comment line 101 and insert the following.


if [ "$OLDPVERSION" = "0" ];then OLDPVERSION=$NEWPVERSION #01micko 20101227, nasty hack really, routine needs re-evaluation

It saves checking all these non-existant dependencies, making it much faster, but there is a catch. The icons are not updated
and fixmenus then needs to be run.
Solution: at the end of that large 'if' statement an else argument is added, running the relevant stuff.


  #we are in a clean (chroot) full install to empty partion, we update icons and run fixmenus, that's it 01micko, 20101227
  echo -n " desk-icons" >/dev/console
  [ $NEWPVERSION -ge 500 ] && DEFAULT_DESK_ICONS="JQ8flat"
  [ ! -d /usr/local/lib/X11/themes/JQ8flat ] && DEFAULT_DESK_ICONS="Stardust"
  [ -f /etc/desktop_icon_theme ] && DEFAULT_DESK_ICONS="`cat /etc/desktop_icon_theme`" #w477
  /usr/sbin/icon_switcher_cli $DEFAULT_DESK_ICONS
  #master help index has to be updated... don't know if we need this
  #Reconstruct configuration files for JWM, Fvwm95, IceWM...

That seems to fix the issue.

END: Old stuff


How did I test?

First of all, I have recently produced 2 spups, 051 and 052 from woof.

I renamed the 051 version in woof to 515 and rebuilt that distro without the new /etc/rc.d/rc.update file inserted in the woof tree.
I booted that pfix=ram, wiped clean a partition with gparted and proceeded to do a full install, and I got the xmessage error requiring the
puppy 2 dependencies.
I rebuilt the same version with my newly hacked /etc/rc.d/rc.update file and booted that, formatted the partition with gparted
then did the full install. It worked no error message. I booted the install and it was sane.

I then had to perform sanity checks making sure I didn't break other functionality, such as the "wipe" option in universal installer
and the upgrade option. I rebooted the 515 iso pfix=ram and proceeded with the universal installer again, this time without formatting
with gparted. I chose the "wipe" option and that worked successfully. The fresh full install was sane.

I then updated my spup-052 to 516, there were some significant differences between 051 and 052 so it was a true upgrade scenario.
I booted 516 pfix=ram and used the universal installer to upgrade the 515 full install to 516. It went correctly.

How is the attached file used?

The attached file is for developers, or if you want to remaster you can try at your own risk.
Note that the bug is a non fatal bug anyway so it is probably better if you wait until this hack, or a better fix filters upstream.

Note: Use the NEW one, I left the old there just for perusal, test at own risk

Description  NEW version, use this one

Filename  rc.update.gz 
Filesize  6.59 KB 
Downloaded  189 Time(s) 
Description  OLD version

Filename  rc.update.gz 
Filesize  6.68 KB 
Downloaded  199 Time(s) 

Puppy Linux Blog - contact me for access
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 1 of 1 [1 Post]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Bugs ( Submit bugs )
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.0582s ][ Queries: 13 (0.0066s) ][ GZIP on ]