pup-volume-monitor-0.1.15 and desktop-drive-icons-0.0.6

Core libraries and systems
Message
Author
gyro
Posts: 1798
Joined: Tue 28 Oct 2008, 21:35
Location: Brisbane, Australia

#141 Post by gyro »

The problem is in the subroutine, "void pup_vm_monitor_get_mounts_unlocked(PupVMMonitor *self)".

It expects to get only a single entry for each "f_ent.mnt_fsname", but when a "mount -o bind" is active, as it is with a savefolder, it gets an extra entry for each "mount -o bind". This extra entry has the same "f_ent.mnt_fsname" but a different "f_ent.mnt_dir".
The entry corresponding to the one expected, is the first one, but the current code stores the last one.
So, near the top of the loop it needs to "continue" if it gets an entry whose "f_ent.mnt_fsname" is the same as the previous entry.
Or it could "continue" if the hash table already contains an entry for this "f_ent.mnt_fsname". Maybe something like:

Code: Select all

		entry.devnode = g_strdup(f_ent.mnt_fsname);
		if (g_hash_table_contains(self->mounts, entry.devnode))
			continue;
Or you could try using "g_hash_table_insert ()", instead of "g_hash_table_replace ()".

gyro

User avatar
SFR
Posts: 1800
Joined: Wed 26 Oct 2011, 21:52

#142 Post by SFR »

gyro wrote:

Code: Select all

		entry.devnode = g_strdup(f_ent.mnt_fsname);
		if (g_hash_table_contains(self->mounts, entry.devnode))
			continue;
Yep, it's working correctly now, thanks Gyro!
Btw, any idea what can cause this one?

[later]
While poking in the source code I came across daemon/drive-probes.c and its PupVolume *pup_volume_new_from_blkid_cache(blkid_cache cache, const gchar *devnode) function (or whatever it's called in C).

After short investigation:
- old Slacko has only busybox blkid + util-linux-2.21.2-patched_f2fs-i486
- new Slacko has full blkid (util-linux-2.21.2 from slackware repo, but, apparently, it's not patched).

To confirm, I did replace /lib/libblkid.so.* with the one from Slacko-5.7 and indeed, p-v-m was able to recognize f2fs partitions after that.

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]

User avatar
peebee
Posts: 4370
Joined: Sun 21 Sep 2008, 12:31
Location: Worcestershire, UK
Contact:

#143 Post by peebee »

gyro wrote:The problem is in the subroutine, "void pup_vm_monitor_get_mounts_unlocked(PupVMMonitor *self)".

It expects to get only a single entry for each "f_ent.mnt_fsname", but when a "mount -o bind" is active, as it is with a savefolder, it gets an extra entry for each "mount -o bind". This extra entry has the same "f_ent.mnt_fsname" but a different "f_ent.mnt_dir".
The entry corresponding to the one expected, is the first one, but the current code stores the last one.
So, near the top of the loop it needs to "continue" if it gets an entry whose "f_ent.mnt_fsname" is the same as the previous entry.
Or it could "continue" if the hash table already contains an entry for this "f_ent.mnt_fsname". Maybe something like:

Code: Select all

		entry.devnode = g_strdup(f_ent.mnt_fsname);
		if (g_hash_table_contains(self->mounts, entry.devnode))
			continue;
Or you could try using "g_hash_table_insert ()", instead of "g_hash_table_replace ()".

gyro
Excellent #gyro - very many thanks for tracking that down.

I've recompiled p-v-m on Slacko6beta with the patch and both desktop-drive-icons and pcmanfm are now behaving as they should be when accessing the boot partition when a new savefolder is being used.

My only question is - why does my compile which uses the instructions given by akash-rawal in post #1 result in binaries that are at least 4 times bigger than his compiles???

#SFR - many thanks also for the f2fs fix - I haven't tried that one yet but will soon - wonder whether 01micko will include the needed patch in Slacko6?

Great example of puppy teamwork.
Cheers
peebee
ImageLxPup = Puppy + LXDE
Main version used daily: LxPupSc; Assembler of UPups, ScPup & ScPup64, LxPup, LxPupSc & LxPupSc64

User avatar
SFR
Posts: 1800
Joined: Wed 26 Oct 2011, 21:52

#144 Post by SFR »

peebee wrote:My only question is - why does my compile which uses the instructions given by akash-rawal in post #1 result in binaries that are at least 4 times bigger than his compiles???
Did you strip them?
wonder whether 01micko will include the needed patch in Slacko6?
Haven't tried it yet, but Mick has recompiled it already:
http://distro.ibiblio.org/puppylinux/pe ... s-i686.pet

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]

User avatar
peebee
Posts: 4370
Joined: Sun 21 Sep 2008, 12:31
Location: Worcestershire, UK
Contact:

#145 Post by peebee »

SFR wrote:
peebee wrote:My only question is - why does my compile which uses the instructions given by akash-rawal in post #1 result in binaries that are at least 4 times bigger than his compiles???
Did you strip them?
wonder whether 01micko will include the needed patch in Slacko6?
Haven't tried it yet, but Mick has recompiled it already:
http://distro.ibiblio.org/puppylinux/pe ... s-i686.pet

Greetings!
Stripped - thanks.

util-linux-2.12.2_f2fs-i686.pet fixes the f2fs problem.

Many thanks
peebee
ImageLxPup = Puppy + LXDE
Main version used daily: LxPupSc; Assembler of UPups, ScPup & ScPup64, LxPup, LxPupSc & LxPupSc64

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#146 Post by mikeb »

No notification from forum :(

ok I dropped PUPMODE=13 years ago (forgot about that pup_ro1 stuff) so not a problem for me as such and a test with save folder gave one working icon.

The only hiccup is it was possible to unmount the drive from the icon (since there are 2 mounts) and after that I was taken to /initrd/pup_rw which makes some sense but was unable to make the original /mnt/sda1 since I assume the icon saw an existing mount still present . In my case in sysinit I make mnt points that match the device rather than /mnt/home though the result is similar.
Not sure if that affects your arrangements....ie can you unmount the pup drive from the icon and what happens after that?

Also a sr0 appeared from nowhere..not sure about that..was testing in qemu and no /dev/sr0 was enabled!

mike

User avatar
peebee
Posts: 4370
Joined: Sun 21 Sep 2008, 12:31
Location: Worcestershire, UK
Contact:

p-v-m for Slacko6

#147 Post by peebee »

Here is a version of p-v-m for Slacko6 with gyro's fix for the new savefolder....
Attachments
pup-volume-monitor-0.1.15-1-i686-slacko6.pet
(100.18 KiB) Downloaded 696 times
ImageLxPup = Puppy + LXDE
Main version used daily: LxPupSc; Assembler of UPups, ScPup & ScPup64, LxPup, LxPupSc & LxPupSc64

User avatar
SFR
Posts: 1800
Joined: Wed 26 Oct 2011, 21:52

#148 Post by SFR »

mikeb wrote:The only hiccup is it was possible to unmount the drive from the icon (since there are 2 mounts) and after that I was taken to /initrd/pup_rw
[snip]
can you unmount the pup drive from the icon and what happens after that?
just checked and nope, I'm not able to unmount home clicking the icon directly and all the right-click options (mount/unmount/eject) are greyed out.
No matter if it was PM 12 or 13 (Slacko-5.9.3).
mikeb wrote:In my case in sysinit I make mnt points that match the device rather than /mnt/home though the result is similar.
So in your case it's e.g. /mnt/sda1, but "normally" it's /initrd/mnt/dev_save and P-V-M apparently checks for '/initrd/' string:

Code: Select all

		else if (strstr(entry.mntpnt, "/initrd/"))
		{
			entry.flags |= PUP_VOLUME_MNTD_SYSTEM;
		}
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]

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#149 Post by mikeb »

hmm well the /initrd/mnt/pupwhatever is still there... its bind mounted up to /mnt/sda1 rather than symlinked /mnt/home...which would cause a similar reaction to the initial problem in this post.

Thats ok I was checking it was fixed for standard puppies.

Happy drive iconing

Mike

Ps I wonder since you have taken up pup_volume_monitor ..or at least provide fixews....it should get a fresh thread?

User avatar
peebee
Posts: 4370
Joined: Sun 21 Sep 2008, 12:31
Location: Worcestershire, UK
Contact:

p-v-m and tahrpup

#150 Post by peebee »

I have compiled a patched version of libgio-2.0.so.0.4000.0 to enable p-v-m to be used on Tahr Puppy 5.8.3 k3.14.11pae

Download from:
https://e-nautia.com/peebee/disk/share/ ... atched.pet

Patch for complete glib2 package is attached (false .gz). Used source from Linux-from-Scratch.

Cheers
peebee
Attachments
glib_2.40.0-tahr-090814.patch.gz
(1.9 KiB) Downloaded 660 times
ImageLxPup = Puppy + LXDE
Main version used daily: LxPupSc; Assembler of UPups, ScPup & ScPup64, LxPup, LxPupSc & LxPupSc64

sfs
Posts: 49
Joined: Sat 02 Nov 2013, 04:49
Location: Russia
Contact:

Re: p-v-m and tahrpup

#151 Post by sfs »

Need help
Porteus:

Code: Select all

# mount |grep sda1
/dev/sda1 on /mnt/sda1 type ext4 (rw,noatime,nodiratime,data=ordered)
/dev/sda1 on /mnt/live/memory/changes type ext4 (rw,noatime,nodiratime,data=ordered)
Label = sda1 mount in /mnt/live/memory/changes
http://forum.puppyrus.org/index.php?act ... 1998;image
[url=https://sourceforge.net/projects/puppyrusa/]PuppyRus-Arch[/url]

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#152 Post by mikeb »

Interesting... on slax 6 the changes mount does not appear in mount

Code: Select all

bash-3.1# mount
aufs on / type aufs (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
usbfs on /proc/bus/usb type usbfs (rw)
/dev/hda2 on /mnt/hda2 type ext3 (rw,noatime)
/dev/hda1 on /mnt/hda1 type fuseblk (rw,noatime,allow_other,blksize=512)
/dev/hda3 on /mnt/hda3 type ext3 (rw,noatime)
/dev/sda1 on /mnt/sda1 type vfat (rw,noatime,quiet,umask=0,check=s,shortname=mixed)
bash-3.1# cat /proc/cmdline 
ramdisk_size=7120 pty.legacy_count=10 root=/dev/ram0 rw vga=788 splash=silent quiet changes=/nimblex autoexec=startxfce4
bash-3.1# 
It only appears if you cat the initrd mtab.

Code: Select all

bash-3.1# cat /mnt/live/etc/mtab 
rootfs / rootfs rw 0 0
/dev/root /mnt/live ext2 rw 0 0
proc /mnt/live/proc proc rw 0 0
/dev/hda2 /mnt/live/mnt/hda2 ext3 rw,noatime,data=ordered 0 0
/dev/hda2 /mnt/live/memory ext3 rw,noatime,data=ordered 0 0
The problem will be similar to the puppy bind mount problem since the same thing is happening.
mike

User avatar
saintless
Posts: 3862
Joined: Sat 11 Jun 2011, 13:43
Location: Bulgaria

#153 Post by saintless »

I don't know if it helps and what is the problem exactly, but it is the same here booting with porteus initrd - sda3 is mounted twice in mount command output:
http://mail.murga-projects.com/puppy/vi ... b0e#759046

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#154 Post by mikeb »

Not really a problem... any distro using aufs in mysterious ways will give some odd mount information...its simply the nature of the mechanism. What is needed is for any software working with that info to be aware of it though in this case its up to us to modify the sources. I did test these icons on slax and they worked nicely apart from this..if it was a live boot than there is no problem. I use xfce4 so its drive icons do the job anyway without any quirks.

Mike

User avatar
peebee
Posts: 4370
Joined: Sun 21 Sep 2008, 12:31
Location: Worcestershire, UK
Contact:

64bit p-v-m

#155 Post by peebee »

Version of p-v-m compiled in Slacko64 Alpha as used in LxPup64:

https://e-nautia.com/peebee/disk/share/ ... lacko6.pet
ImageLxPup = Puppy + LXDE
Main version used daily: LxPupSc; Assembler of UPups, ScPup & ScPup64, LxPup, LxPupSc & LxPupSc64

jlst

#156 Post by jlst »

What happened to this project? This is a very good program.

I think this project should be adopted by Woof CE

User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

#157 Post by mavrothal »

I guess akash_rawal moved on.
woof-wise it could go to petbuilds if anyone wants to maintain it there :wink:
== [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] ==

User avatar
peebee
Posts: 4370
Joined: Sun 21 Sep 2008, 12:31
Location: Worcestershire, UK
Contact:

#158 Post by peebee »

jlst wrote:What happened to this project? This is a very good program.

I think this project should be adopted by Woof CE
It is used in every version of LxPup - I recently recompiled a version of pvm for SlackoCurrent with eudev.....

The first thing that needs to happen is that the source needs to be put into a repository - ibiblio or github??
ImageLxPup = Puppy + LXDE
Main version used daily: LxPupSc; Assembler of UPups, ScPup & ScPup64, LxPup, LxPupSc & LxPupSc64

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#159 Post by 01micko »

akash is active on github so maybe he just lost interest in puppy or had other itches to scratch.

Since google-code is closing I exported the project.

I also did the same with gtkdialog several months ago.
Puppy Linux Blog - contact me for access

jlst

#160 Post by jlst »

Has this issue been fixed?

I think peebee has the most patched pup-volume-monitor, upload it here or send it to micko...

Post Reply