The time now is Sat 25 May 2013, 15:48
All times are UTC - 4 |
| Author |
Message |
01micko

Joined: 11 Oct 2008 Posts: 7019 Location: qld
|
Posted: 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
| Code: | | "option2hdinstall") |
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"
Now line 101 reads: [ ! $OLDPVERSION ] && OLDPVERSION=$NEWPVERSION
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.
http://bkhome.org/blog/?viewDetailed=02045
the line 101 remains commented, and the next lines are now this:
| Code: |
if [ "$OLDPVERSION" = "0" ];then #101228 01micko: workaround for weird bug, full hd install.
OLDPVERSION=`expr $NEWPVERSION - 1`
fi |
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.
| Code: |
if [ "$OLDPVERSION" = "0" ];then OLDPVERSION=$NEWPVERSION #01micko 20101227, nasty hack really, routine needs re-evaluation
fi |
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.
| Code: |
else
#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
DEFAULT_DESK_ICONS="JQ8flat"
[ $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
/usr/sbin/indexgen.sh
#Reconstruct configuration files for JWM, Fvwm95, IceWM...
/usr/sbin/fixmenus |
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
Cheers
 |
| Description |
NEW version, use this one
|

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

Download |
| Filename |
rc.update.gz |
| Filesize |
6.68 KB |
| Downloaded |
131 Time(s) |
_________________ keep the faith .. 
|
|
Back to top
|
|
 |
|
|
|
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
|