Aaargh! Aaaaaargh! Aaaaaaarrrgggh!

Puppy related raves and general interest that doesn't fit anywhere else
Post Reply
Message
Author
User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

Aaargh! Aaaaaargh! Aaaaaaarrrgggh!

#1 Post by BarryK »

Oh man, this is an awful bug!

Running the createpuppy script in Unleashed, I created a iso
file, burnt it to CD, then found some icons were missing.

The icon ROX-Filer.xpm for the ROX window, for example.

So, I looked at the createpuppy script.
These lines copy the icon, well this is the essence:

Code: Select all

#!/bin/sh

ONEPKG="rox_filer-1.2.2"

cp-FULL -a --remove-destination packages/$ONEPKG/* rootfs-complete/
The rox_filer-1.2.2 folder has root0/, usr/, and 2 files: keyword and ROX-Filer.xpm.
The last one is a symlink.

Now for the awful bug: the symlink ROX-Filer.xpm does not get copied.

Note that symlinks in subdirectories in rox_filer-1.2.2 do get copied.
Using the Busybox "cp" gives the same bug.
Taking out --remove-destination makes no difference.

/bin/sh is a symlink to Busybox. If I change the first line to /bin/bash,
the script works!
With Bash, both cp-FULL and the Busybox cp work.

So, the big question is, how is the Busybox Ash shell messing things up?
It's really insidious, as the symlink icons in some packages ARE copied.
Furthermore, it was working just a few days ago.
I'm currently testing in 1.0.5alpha2 and get this bug.

Now here is the really interesting bit:
ROX-Filer.xpm is a broken symlink. It points to a non-existent file,
that won't exist until the complete filesystem is built.
If I make it into a non-broken symlink, guess what, the symlink then
gets copied.
BUT WHY OH WHY did it work before, with broken symlink?
AND WHY OH WHY should using Busybox Ash or the full Bash make any
difference?

Thinking about what was different when it was working... I think I
ran createpuppy from Pup 1.0.4... ah, 1.0.4 uses glibc 2.3.2
(from Mandrake 9.2) whereas 1.0.5alpha is using glibc 2.3.4 from
Vector 5.0STD.
So, I recompiled Busybox for glibc 2.3.4, as I couldn't recall whether
had done so before. Nup, still got the bug.

Just to check, I booted up 1.0.4, and ROX-Filer.xpm copies fine, no problem.

I was going to work on PCCC tonight, but the entire night has been taken
up with this crap.

It's stuff like this that makes me consider giving it up... and take
up gardening.

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#2 Post by Lobster »

:?

It is at times like this that some words of comfort and wisdom are required. Until they arrive you will have to make do with my rambling . . .

I am reminded of the 4 Noble Truth of Programming which the Buddha formulated:

1. Programming is Suffering (and then it gets worse)
2. The Cause of this distress is trying to achieve goals - rather than enjoying the ride
3. There is always Gardening . . .
4. The 8 Fold Path of Gardening (which strangely involves a way of programming yourself)

more here:
http://pages.britishlibrary.net/lobster ... arden.html

I think gardening is a good way of dissipating some of that screaming energy . . .
Incidently Ian created a page on the wiki called "Vent your spleen" which might be worth considering for those "Dark Side" moments . . .

Hope it all works out . . .
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

EarlSmith
Posts: 198
Joined: Fri 06 May 2005, 03:23
Location: Chelsea, Alabama, USA

#3 Post by EarlSmith »

Gardening is not the way to go - I know.....been there, done that.
Bugs is the garden are never ending. Then you have too much rain;not enough rain;.... and a thousand other things totally beyond your control.
The are no mind numbing things that have no drawbacks.
Do what I did to my Commodore VIC -20 . Put it on the floor and jump up and down on it in combat boots --- SATISFACTION .....

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#4 Post by Lobster »

Thanks Earl for your pearls of wisdom.
I am thinking that perhaps this is the way to go.

Is perhaps a slegehammer kept by the keyboard and a few hefty swings also worth considering? m m m . . . maybe both? Swings with sledgehammer and then boots and jumping for the remnants?

We seem to be creating some top tips for developers here . . .
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

EarlSmith
Posts: 198
Joined: Fri 06 May 2005, 03:23
Location: Chelsea, Alabama, USA

#5 Post by EarlSmith »

Lobster, it is always fun to read your posts. I truly like the SH approach. Sometimes it may be the only solution.

Guest

#6 Post by Guest »

if sh is a link to bash is there any difference

if the script statrs with #!/bin/ash is there any difference

Sometimes how the shell is invoked can affect how it works, so to say.


I'm still searching to see if I can find anything

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#7 Post by BarryK »

bladehunter wrote:if sh is a link to bash is there any difference

if the script statrs with #!/bin/ash is there any difference

Sometimes how the shell is invoked can affect how it works, so to say.


I'm still searching to see if I can find anything
I didn't try those, just the sh link to busybox and the direct bash.

Anyway, I cannot see why the choice of shell will affect the cp program.

I took the easy way out and used #!/bin/bash as that works.

It's the never ending API (library) upgrades (like glibc, gtk) that cause so much
trouble. In a recent interview, the developer of Peanut Linux (now aLinux) pleaded with API developers to stop upgrading, freeze their APIs for a couple of years and just do bug fixes (like Microsoft does).

GuestToo
Puppy Master
Posts: 4083
Joined: Wed 04 May 2005, 18:11

#8 Post by GuestToo »

i've tried using cp -a a few times, for example, when i made an icewm package so it would not overwrite someones personal config files

i did some testing with some test files in some test dirs, and found it just was not doing what i thought it should be doing

in particular, i tried copying one dir to another, deleting a few files in the destination dir so there was no file there to write over ... it often would not even copy to replace the file that i deleted

i was spending too much time on it, so i just gave up and did it another way ... i do not use cp -a, because it does not do what i expect it to do

Post Reply