A SAVE-session to directory option added for PUPs [REOPENED]
Just wondering about something.
I see a lot of the word "folder" being used.
Should this be "directory"?
AS a "save directory"
This is Linux.
I see a lot of the word "folder" being used.
Should this be "directory"?
AS a "save directory"
This is Linux.
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected
YaPI(any iso installer)
When I was a kid I wanted to be older.... This is not what I expected
YaPI(any iso installer)
drive icons - AppRun script
Would someone please tell me what I need to change to get "patched" "AppRun" scripts generated for the drive icons on the desktop?
As mentioned before, when a "save directory" is used instead of a "save file", there is a problem with the left clicking the drive icon for "/mnt/home". This can be fixed by directly editing the "AppRun" script for that particular icon, but I would much prefer to fix this at the source.
gyro
As mentioned before, when a "save directory" is used instead of a "save file", there is a problem with the left clicking the drive icon for "/mnt/home". This can be fixed by directly editing the "AppRun" script for that particular icon, but I would much prefer to fix this at the source.
gyro
It's /usr/local/bin/drive_all.Would someone please tell me what I need to change to get "patched" "AppRun" scripts generated for the drive icons on the desktop?
RE: folder vs. directory
Maybe we could use "foldir"?
Greetings!
[color=red][size=75][O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource[/size][/color]
[b][color=green]Omnia mea mecum porto.[/color][/b]
[b][color=green]Omnia mea mecum porto.[/color][/b]
directory vs folder:
"directory" is the fundamental term once you look at down at kernel and libc, and also most commonly used in command line prograns. "folder" is a "GUI object" that represents directory in a GUI. Thus, "cd to /usr/lib64 directory", but "open /usr/lib64 folder in Rox-filer".
As for "save directory" or "save folder" - either one is fine. I use "save directory", but "save folder" is fine too because we can expect that most people will access that directory through a GUI file manager - thus most access it as a "folder" rather than a "directory" (I know I do).
"directory" is the fundamental term once you look at down at kernel and libc, and also most commonly used in command line prograns. "folder" is a "GUI object" that represents directory in a GUI. Thus, "cd to /usr/lib64 directory", but "open /usr/lib64 folder in Rox-filer".
As for "save directory" or "save folder" - either one is fine. I use "save directory", but "save folder" is fine too because we can expect that most people will access that directory through a GUI file manager - thus most access it as a "folder" rather than a "directory" (I know I do).
Fatdog64 forum links: [url=http://murga-linux.com/puppy/viewtopic.php?t=117546]Latest version[/url] | [url=https://cutt.ly/ke8sn5H]Contributed packages[/url] | [url=https://cutt.ly/se8scrb]ISO builder[/url]
I believe drive_all just calls pmount.SFR wrote:It's /usr/local/bin/drive_all.Would someone please tell me what I need to change to get "patched" "AppRun" scripts generated for the drive icons on the desktop?
RE: folder vs. directory
Maybe we could use "foldir"?
Greetings!
pmount also brakes with savefolders but this little patch is fixing it
Code: Select all
--- a/usr/sbin/pmount 2014-02-26 09:36:01.000000000 +0200
+++ b/usr/sbin/pmount 2014-05-07 21:43:10.613321599 +0300
@@ -510,7 +510,7 @@
ONEFS="`echo -n "$ONEPART" | cut -f 2 -d '|'`"
DEVPATTERN="^${ONEDEV} "
- ONEMNTPT="`mount | grep "$DEVPATTERN" | cut -f 3 -d ' '`"
+ ONEMNTPT="`mount | grep "$DEVPATTERN" |grep -v pup_rw| cut -f 3 -d ' '`"
[ "$ROOTDEV2" != "" ] && [ "$ROOTDEV2" = "$ONEDEV" ] && ONEMNTPT='/' #v3.96
#in some cases prevent unmounting...
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==
Replacingwithin either the "AppRun" script for the icon for "/mnt/home" partition, or in "/usr/local/bin/drive_all",
worked for me.
gyro
Code: Select all
#mounted...
MNTPT="`df | grep "$dPATTERN" | tr -s ' ' | cut -f 6 -d ' '`"
Code: Select all
#mounted...
MNTPT="`df | grep "$dPATTERN" | grep -v 'pup_rw' | tr -s ' ' | cut -f 6 -d ' '`"
worked for me.
gyro
I have patched Dpup Exprimo puppy_squeeze_5.X.3.4.12 to use save directories, and finally got it working for me.
The "init" script has a few less instances of "`mount ", since it does not have support for adrv, ydrv etc.
At first, any reboot or shutdown did not complete. X would shutdown but I was left at a command prompt.
So, I exported a few lines of code from Dpup wheezy "rc.shutdown".
I have attached diff files for the "init" script and "rc.shutdown"
Edit:
I think the difference between this and the previous 2 puppies, is that this is a pre woof-ce puppy, both the others were built with woof-ce.
gyro
The "init" script has a few less instances of "`mount ", since it does not have support for adrv, ydrv etc.
At first, any reboot or shutdown did not complete. X would shutdown but I was left at a command prompt.
So, I exported a few lines of code from Dpup wheezy "rc.shutdown".
I have attached diff files for the "init" script and "rc.shutdown"
Edit:
I think the difference between this and the previous 2 puppies, is that this is a pre woof-ce puppy, both the others were built with woof-ce.
gyro
- Attachments
-
- squeeze_rc.shutdown_diff.txt.gz
- gzip of diff for "rc.shutdown" script
- (255 Bytes) Downloaded 191 times
-
- squeeze_init_diff.txt.gz
- gzip of diff for "init" script
- (570 Bytes) Downloaded 183 times
Last edited by gyro on Thu 08 May 2014, 10:49, edited 1 time in total.
updated patch for slack 5.7
This is a new version of the save directory patch to the 'init' script for slacko 5.7
This one goes for max:
1) All the pupsave "find" statements have been patched.
2) It always appends any found save files to the list of found save directories. So you can mix and match save files with save directories.
3) It includes mavrothal's fix to upgrading with multiple pupsaves.
Warning, the following is a whinge.
The pupsave "find" commands look for pupsaves in the root of the partition if none are found in the psubdir.
When I moved my save directory from the psubdir to the root of the partition, it was not used, slacko booted in pupmode 5.
After much time trying to find why my code did not work, I became desperate, reinstated the release initrd.gz and then moved the "slackosave.2fs" to the root of the partition.
Lo, this "slackosave.2fs" was not used.
I found the problem in a different part of the original code, (line 907)I do not understand why puppy goes to the bother of finding these pupsaves and then throws them away.
The moral of the story is, make sure you have checked what the existing code actually does, before you test if your code has broken it.
End whinge.
gyro
This one goes for max:
1) All the pupsave "find" statements have been patched.
2) It always appends any found save files to the list of found save directories. So you can mix and match save files with save directories.
3) It includes mavrothal's fix to upgrading with multiple pupsaves.
Warning, the following is a whinge.
The pupsave "find" commands look for pupsaves in the root of the partition if none are found in the psubdir.
When I moved my save directory from the psubdir to the root of the partition, it was not used, slacko booted in pupmode 5.
After much time trying to find why my code did not work, I became desperate, reinstated the release initrd.gz and then moved the "slackosave.2fs" to the root of the partition.
Lo, this "slackosave.2fs" was not used.
I found the problem in a different part of the original code, (line 907)
Code: Select all
grep "${PSUBDIR}/" /tmp/PUPSAVES > /tmp/PUPSAVES2 #note: need this as above probing may have got some invalid hits.
The moral of the story is, make sure you have checked what the existing code actually does, before you test if your code has broken it.
End whinge.
gyro
- Attachments
-
- slacko-saveDirectoryDiff.txt.gz
- gzip of a patched 'init' script for slacko 5,7
- (869 Bytes) Downloaded 211 times
@gyro
Your whinge and similar is why I abandoned the 'find' based inits... and might explain why there are many 'pup_xxx.sfs not found' posts on this forum...one I will bear in mind.
Such defeats of logic and basically loss of features are beyond my tolerance level so full marks for persisting ....as with anything puppy once you scratch the surface you end up fixing far more than you intended
mike
Your whinge and similar is why I abandoned the 'find' based inits... and might explain why there are many 'pup_xxx.sfs not found' posts on this forum...one I will bear in mind.
Such defeats of logic and basically loss of features are beyond my tolerance level so full marks for persisting ....as with anything puppy once you scratch the surface you end up fixing far more than you intended
mike
updated patch for wheezy 3.5.2.11
This is a new version of the save directory patch to the 'init' script for wheezy 3.5.2.11
It's just the wheezy version of slacko-saveDirectoryDiff.txt.gz, i.e it's save directory to the max.
gyro
It's just the wheezy version of slacko-saveDirectoryDiff.txt.gz, i.e it's save directory to the max.
gyro
- Attachments
-
- wheezy-saveDirectoryDiff.txt.gz
- gzip of a patched 'init' script for wheezy 3.5.2.11
- (874 Bytes) Downloaded 183 times
Here is an sfs containing the patched versions of applications that have been reported as broken because of the save directories code.
Currently there are just 2, "/usr/sbin/pmount" and "/usr/local/bin/drive_all".
In slacko 5.7 a ydrv can be mounted at boot time, by adding a "ydrv" boot parameter in your "menu.lst", (assuming you are using grub4dos). Something like the following:
The advantage of a "ydrv" is that it overrides "puppy_slacko_5.7.sfs", even during the first boot. This is particularly useful for "drive_all", as it means that all the "AppRun" scripts for the drive icons, get created with the patched version of "drive_all".
gyro
Currently there are just 2, "/usr/sbin/pmount" and "/usr/local/bin/drive_all".
In slacko 5.7 a ydrv can be mounted at boot time, by adding a "ydrv" boot parameter in your "menu.lst", (assuming you are using grub4dos). Something like the following:
Code: Select all
kernel /slacko/vmlinuz psubdir=slacko pmedia=atahd pfix=fsck ydrv=sda4:/slacko/ydrv-slacko-saveDirectory.sfs
gyro
- Attachments
-
- ydrv-slacko-saveDirectory.sfs.gz
- gzip of ydrv sfs for slacko 5.7
- (14.49 KiB) Downloaded 201 times
Are you saying finally in puppy an sfs is layered over the main sfs after 8 years and much tub thumping.... lets do a danceThe advantage of a "ydrv" is that it overrides "puppy_slacko_5.7.sfs", even during the first boot.
I will not suggest diving into the init and fixing that one either...that would be mean.
mike
Re: updated patch for slack 5.7
Unfortunately I may not have time to test this for few days but it looks good.gyro wrote:This is a new version of the save directory patch to the 'init' script for slacko 5.7
I was wondering however what is the advantage of
Code: Select all
[ "$ONEFS_IS_LINUX" = "Y" ] && FND_PUPSAVES="`find /mnt/data -maxdepth ${SEARCHDEPTH} -xdev -type d -iname ${DISTRO_FILE_PREFIX}save'*'| grep -v ' ' | sed -e 's%^/mnt/data%%' | tr '\n' ' '`"
FND_PUPSAVES="${FND_PUPSAVES}`find /mnt/data -maxdepth ${SEARCHDEPTH} -xdev -type f -iname ${DISTRO_FILE_PREFIX}save*.[234]fs | grep -v ' ' | sed -e 's%^/mnt/data%%' | tr '\n' ' '`"
Code: Select all
FND_PUPSAVES="`find /mnt/data -maxdepth ${SEARCHDEPTH} -xdev -iname ${DISTRO_FILE_PREFIX}save*.[234]fs | grep -v ' ' | sed -e 's%^/mnt/data%%' | tr '\n' ' '`"
Saves one round of find|grep|sed and keeping the naming common will also make things simpler in the pupsaveconfig script that should give the option to generate the savefolder at first shut down.
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==