MyDSL problem


Forum: myDSL Extensions (deprecated)
Topic: MyDSL problem
started by: cbagger01

Posted by cbagger01 on July 08 2005,04:40
I observed the following behavior for DSL version 1.21 USB frugal install:

1) Add an /optional directory to the root directory of /cdrom
2) Add a bunch of optional extensions including alsadebs.dsl and usbview.dsl from the latest myDSL online repository
3) Boot up DSL and choose alsadebs or usbview from the optional menu.
4) The usbview or alsadebs myDSL menu item refuses to appear.

I have not done a lot of testing, but I believe that the "bug" is related to the "eliminate duplicate menu items" code as part of the mydsl-load process.  I think that the script decided that there is already a "usbview" menu item (even though this is not true) and therefore deleted the new menu entry to prevent duplicates.

usbview.dsl is an ideal testing candidate because it is small and doesn't require dependencies like alsadebs.dsl

Hopefully, this behavior can be reproduced and if so, fixed.

Posted by roberts on July 08 2005,05:12
It is that extension, usbview, it has a nameing convention violation and should be fixed.. Try scite, ted, zile. Not a problem.
Posted by ke4nt1 on July 08 2005,05:58
Rebuilt and renamed to USBview.tar.gz

test and feedback..  

It works for me..
ke4nt

Posted by friedgold on July 14 2005,00:46
I also had similar problems. The relvent part of the mydsl-load script is as follows

Code Sample
checkmenu_item(){
  FILE="$MYMENU"/"$APPNAME"
  if [ -f "$FILE" ]; then
     MENUITEM=`awk '{print $2}' $FILE`
     if stringinfile "$MENUITEM" "$DSLMENU"; then
        rm -f "$FILE"
     fi
  fi
}


Suppose the extension includes a menu file which looks like this (I'm using firefox as an example):

Code Sample

[exec] (Firefox) {/opt/firefox/firefox}


Then this is my understanding of what goes on:

awk '{print $2}' $FILE will return "(Firefox)" so MENUITEM="(Firefox)". Therefore stringinfile "$MENUITEM" "$DSLMENU" will be return true since the entry (Firefox) exists in the standard DSL Menu. This means a new menu item won't be created.

A couple of thoughts
1) Why is the fluxbox description being used to check for duplicates? Surely it is more accurate to check the command that is used for running the extension. There are situations where an extension might share a description with something already in the DSL menu. However two different programs cannot use the exact same command. So why not check the command instead? Or why not check for the presence of the entire line (i.e. description and command) - this would guarantee the least false positives.
2) Currently this check has issues with spaces. Suppose I realised the reason my firefox extension didn't have a menu item was because the description matched something already in the menu. I then decide to change the menufile to

Code Sample

[exec] (Firefox 1.0.4) {/opt/firefox/firefox}


And it still doesn't work. This is because awk '{print $2}' $FILE just matches the 2nd field in the menu file and so will return the truncated description "(Firefox" , instead of the full description. Since this string is already in the menu again a menu item will still not be created.

Some possible fixes?

To check the full description (whether it includes spaces or not) change MENUITEM=`awk '{print $2}' $FILE` to MENUITEM="(`echo $FILE|cut -d '(' -f 2|cut -d ')' -f 1`)"

Or to check the command instead of the description use MENUITEM="{`echo $FILE|cut -d '{' -f 2|cut -d '}' -f 1`}"

Or to check the entire line just use MENUITEM="`cat $FILE`"

From the sounds of it 1.3 has some pretty big changes so hopefully this is solved and I've just wasted time writing this all out. But if not maybe the developers might consider this issue

Posted by roberts on July 14 2005,01:07
Simplier fix make the first part of the name unique!  
I know about this and I may rewrite parts to avoid bash overhead of stacking so many commands to process.
I am looking to optimize.  And quite frankly I didn't feel it was that high a priority.
There were things changed/fixed in 1.3 that are of a much larger scale.

Posted by cbagger01 on July 14 2005,02:57
Please don't interpret my observations as a complaint.

I know that there are many more significant changes going on right now, but I just wanted to get the feedback out there to gain a better understanding of the situation and the various solutions.


Ke4nt1, can you fix the alsadebs extension, too when you get a chance?


While I am sure that friedgold's MENUITEM tweak will work (although I have not tested it yet), my personal preference is to figure out a way to test for the presence of the entire line of text that goes into the fluxbox menu rebuild.

In other words, the exec+description+command  as one unique check.

I haven't spent any time to figure out how to do this yet, but I am sure that it is do-able.

Something to add to the longer term to-do list, perhaps?

Or maybe make friedgold's tweak as a short term fix for 1.3.1 until an alternative solution is found.

Just my $0.02

Posted by ke4nt1 on July 14 2005,05:09
cbagger01?

What is the issue with alsadebs.dsl ?

Is that the one where I need to change the menuname from
Install Alsa     to    Alsa Install   ??

73
ke4nt

Posted by roberts on July 14 2005,05:43
cbagger, No complaint heh, but your conculsion says otherwise.

The nameing "convention" has served us well (over 325 extensions in the libraries).
Can things be improved?  Sure. Always, in fact. Did I say, I was looking to optimize?  Yes.
With 325 extensions complying with this convention, I see no need to issue a 1.3.1 per your conculsion.

I purposely write everyting in script, so you can read it and change what you want.

You can please some of the people some of the time, but you will never please everyone all the time.

Posted by cbagger01 on July 14 2005,17:33
ke4nt1,

The issue with alsadebs.dsl is the same as usbview.dsl
The Install ALSA menu item does not appear after loading from /optional

roberts,

I still don't completely understand what the differences are between the "correct" and the "incorrect" naming conventions.  The information has probably been explained somewhere but I may have missed it while I was out of the picture recently for a few weeks.

As for my 1.3.1 statement, once again I create more confusion by not expressing my thoughts clearly.

What I meant to say is:

Maybe friedgold's tweak can be wrapped into 1.3.1 (or whatever the next version of DSL will be called).  So it would be rolled into the next version as an "oh by the way" item.  I did not mean to suggest that this one little issue is worthy of an emergency release just to address it.  I just assumed that at some point a 1.3.1 will be issued for other reasons and this tweak could be "piggy-backed" on to it.

I apologize for the misunderstanding.

Posted by cbagger01 on July 15 2005,05:09
ke4nt1,

FYI, I downloaded and tested the new USBview.tar.gz extension that was placed in /optional on my newly rebuilt DSL 1.3 USBHDD frugal install and the same behavior is observed:

USBview appears in the myDSL optional menu.  I click on it and it installs the extension.  But the run usbview menu item never appears.

FYI, I also observed some strange behavior on my USBHDD frgual w/backup&restore.

The myDSL optional menu failed to reappear after doing a Reboot of the system.  The console startup messages did mention the usual myDSL optional extension stuff, but when Xwindows appeared, there was no myDSL or myDSL optional menu.

I repeated this a few times to make sure that it was not just a one-time fluke.

I then manually added

home/.fluxbox/menu

to my

.xfiletool.lst

file and then rebooted and the myDSL menu started working again.

I am not quite sure what is happening, but I think that myDSL does not like the fact that the fluxbox/menu file gets automatically backed up by default.

When you get a free moment, please test and see if you can duplicate my results.

Posted by ke4nt1 on July 15 2005,05:35
On my Frugal grub install, USBview functions flawlessly..
I have the run option in the top of myDSL menu after installing.
Click on the name, USBview, and the app window pops up onscreen.

I run my frugal toram, so I never use an /optional area.
When I tried this, I got doubled 'myDSL' menus, with others non-functional.
Root placed extensions continue to function correctly at boottime.

I have been using a directory called '/storage' , which mirrors the mirrors.

I will test without the /toram' option, and feedback...

Likewise, please test alsadebs.dsl for proper loading,
and the 'ALSA Install" feature working in your myDSL menu.

73
ke4nt

Posted by roberts on July 15 2005,06:04
Let me try to explain how it is currently setup.
Lets start with a working example:
Extension name scite.dsl

rule 1. Given an extension name the menu item must be the same basename i.e,
/tmp/mydsl.menu/scite

Now the following rules apply to the internal menu label i.e.,
[exec] (Scite) {.......}

rule 2. Must be different from the menu item name from rule 1 else optional loading will fail.

rule 3. The leftmost word of the menu label must be unique. Use _ to achive result if necessary.

---------------------------------------------------------------------------------

Now for extension USBview.tar.gz
menu item is /tmp/mydsl.menu/USBview - passes rule 1.
internal menu name is USBview -  result fails rule 2.

----------------------------------------------------------------------------------

Suggestion for new firefox, use menu label such as Firefox_1.0.4 will make it unique and obvious to the user which version it is.

-----------------------------------------------------------------------------------
This has been this way since version 0.7.1
Hope this clears things up.

Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.