You are not logged in.
Unhappily, in spite of all the previous modifications, Bauerbill failed to build the package on my machine .
It installed successfully all the dependencies and makedepends packages from Extra and AUR.
After that it began to build udisksevt and failed with that output :
==> Starting build()...
runhaskell Setup.hs configure
Configuring udisksevt-1.0...
Warning: Unknown extensions: TupleSections
Warning: This package indirectly depends on multiple versions of the same
package. This is highly likely to cause a compile failure.
package udisksevt-1.0 requires parsec-2.1.0.1
package network-2.2.1.7 requires parsec-2.1.0.1
package dbus-core-0.8.3.1 requires parsec-3.1.0
runhaskell Setup.hs build
Preprocessing executables for udisksevt-1.0...
Building udisksevt-1.0...
[1 of 7] Compiling UDisksEvt.Log ( UDisksEvt/Log.hs, dist/build/udisksevt/udisksevt-tmp/UDisksEvt/Log.o )
[2 of 7] Compiling UDisksEvt.Datatypes ( UDisksEvt/Datatypes.hs, dist/build/udisksevt/udisksevt-tmp/UDisksEvt/Datatypes.o )
[3 of 7] Compiling UDisksEvt.Disk ( UDisksEvt/Disk.hs, dist/build/udisksevt/udisksevt-tmp/UDisksEvt/Disk.o )
[4 of 7] Compiling UDisksEvt.DBus ( UDisksEvt/DBus.hs, dist/build/udisksevt/udisksevt-tmp/UDisksEvt/DBus.o )
UDisksEvt/DBus.hs:36:21:
Not in scope: data constructor `RemoteObject'
UDisksEvt/DBus.hs:40:25:
Not in scope: data constructor `RemoteObject'
UDisksEvt/DBus.hs:44:33:
Not in scope: data constructor `RemoteObject'
UDisksEvt/DBus.hs:49:11:
Not in scope: data constructor `RemoteObject'
UDisksEvt/DBus.hs:53:18: Not in scope: `mkClient'
UDisksEvt/DBus.hs:56:19: Not in scope: `mkClient'
make: *** [udisksevt] Erreur 1
Abandon...
ERROR: makepkg exited with an error (512)
It's weird, because I succeeded previously to build the 1.0-1 release after manual interventions, using also bauerbill.
At that time, I manually built/installed a haskell-parsec3 3.1 package and the haskell-dbus-core depending on it, before running 'bauerbill -S udisksevt'.
And that worked...
There is also another inconvenience with that package :
The build process needs to install temporarily many packages (especially haskell related), using more than 700M of disk space.
They are uninstalled at the end, but this is not very practical, when haskell is not used elsewhere on a machine...
Offline
Indeed it's strange. This is definitely backward-uncompatible change in dbus-core library. I'll try to make bugfix soon.
as for installation size - I cannot change this unless I move to another language, what's hardly possible, haskell is my favourite language
yes, there are massive changes in dbus-client. I have to rewrite some code. I don't think it will take much time though)
the problem is more serious than I thought. There are some problems with dbus-client-0.4 itself. I'm making a workaround right now - downgrading to dbus-client-0.3 in all affected packages.
Last edited by DPX-Infinity (2010-08-10 18:20:47)
Offline
done, these new packages have a correct dbus-client-0.3 dependency. I'll try to think something out with this new version problem
Offline
This is definitely backward-uncompatible change in dbus-core library. I'll try to make bugfix soon.
...
yes, there are massive changes in dbus-client. I have to rewrite some code. I don't think it will take much time though
I will wait till you release a new version, to try a new automatic build with Bauerbill, and stay for now with the udisksevt 1.0-1 package which I succeeded to build/install.
Thanks.
Offline
I didn't test it previously, but now I noticed that udisksevt cannot be used to mount a cdrom/dvd when inserted. At least it seems so.
On my machine, the device for my 'Optiarc DVD RW AD-7200S' is created at start up, so there always exists a /dev/sr0 device.
When I insert a cdrom, a 'changed' uevent is generated, not a 'added' one.
The README says :
<trigger name> must be one of 'added', 'mounted', 'unmounted', 'removed' without
quotes. Other names can be used, but such sections will be ignored.
So the 'changed' uevent cannot be used, and consequently a mounting of the cdrom cannot be triggered.
I may be wrong; in that case could you explain what I miss here?
Or could you add that functionality in the next release, please?
Because what I need is a complete control over any removable media supports, using only one program.
Offline
yes, there is such problem. UDisks daemon emits a 'Changed' signal from device and 'DeviceChanged' signal from itself when CD/DVD is inserted or removed. It is not as easy to implement as device addition because of this - apparently, there is no information of what exactly happened with the device, this signal is emitted both on insertion and removal and maybe on something else I don't know, so the program has to be more 'intelligent' in devices handling. I'll try to think something about this out. This functionality will be added to 'added' section I think
also, the 'on' section names are not uevent names, I thought them out myself
BTW, automatic build should work now, I've modified all PKGBUILDs to use dbus-client-0.3.
Offline
UDisks daemon emits a 'Changed' signal from device and 'DeviceChanged' signal from itself when CD/DVD is inserted or removed ... - apparently, there is no information of what exactly happened with the device, this signal is emitted both on insertion and removal and maybe on something else ...
I tested a bash script to automount a cdrom/dvd on insertion.
It uses 'udisks --monitor', 'udisks --show-info' and 'udisks --mount'. The script seems to correctly detect the reason of the 'changed' uevent from device, and can then trigger the correct action.
I can share with you the criteria I use for that (may not be perfect, but it works for me) :
First I noticed that the output of the command 'udisks --show-info', launched after an uevent occured, shows the values after the uevent is done, ie the resulted values.
So when a 'changed' uevent is emitted from a device which is an optical one ('optical disk' property), ie a cdrom or a dvd, and the property 'is mounted' is false,
if the property 'has media' is true, it can only be the result of the 'changed' uevent, ie a cdrom/dvd was inserted.
Because, on my machine, a mounting/unmounting of a cdrom/dvd doesn't generate a 'changed' uevent from the device, but a 'job-changed' instead.
So, in this case, the only possible cause of a 'changed' is an insertion which resulted in the 'has media' becoming true.
And following the same reasoning, if the property 'has media' is false, it can only be the result of the removal of the cdrom/dvd.
Only a insertion/removal can 'changed' from an unmounted cdrom/dvd, and that toggles the value of the 'has media' property
The 'job-changed' uevent seems to detect the mounting/unmounting. So these events can be differentiated.
As I said, I tested it in a script, and it works as expected on my installation.
Maybe you can adapt that to your program, or find a better and more satisfying solution.
I hope you good development times in expanding the possibilities of your program.
Last edited by berbae (2010-08-15 20:28:26)
Offline
thanks, this is useful) I thought to use these properties too)
So when a 'changed' uevent is emitted from a device which is an optical one ('optical disk' property)
sadly, according to udisks documentation and my own examination the 'IsDeviceOpticalDisc' property only set when optical disc is inside already. here we have a some kind of race condition - the event is already in process, trigger is activated, but the correct property values are not set yet, so the program doesn't work properly. the fact it works for you is that you use shellscript which is rather slow than needed to get this behaviour. I experienced this problem already - the mount event has such drawback. I inserted a one second delay to fix this.
Anyway, this process needs careful testing and debugging. I have much free time now, so it will be done soon
Last edited by DPX-Infinity (2010-08-15 11:03:43)
Offline
That was more difficult than I thought (actually, DeviceChanged event emitted not only on disc insertion/removal, but also on mounting and unmounting), but I've coped with it please test the git version (it works for me, but still), and if all is fine, I'll upload a new version PKGBUILD.
I must say though that traydevice doesn't correctly handle CD removal.
Offline
I presume this application does the same as the new libfm in the pcmanfm-project: http://blog.lxde.org/?p=768 ?
oh, I hadn't seen your message, sorry
not exactly. AFAIK libfm operates with PCManFM and works only if PCManFM window is open. UDisksEvt works independently of file manager (e.g. I don't like PCManFM, I use ROX-Filer instead) and also it is a daemon.
Offline
OK, I've bumped a package version on AUR
Offline
Presently I use a bash script I've written which does the automounting for memory sticks and cd/dvds.
I run it backgrounded. I get from 'ps' :
berbae 4326 4302 0 09:14 tty1 00:00:00 /bin/bash /home/berbae/bin/udisksvm
berbae 4360 4326 0 09:14 tty1 00:00:00 udisks --monitor
It uses traydevice to put an icon in systray and to manage a menu for mounting/unmounting.
As much of the time, the script is waiting to read a line from a fifo, it doesn't use any cpu time.
Can you explain the advantages to use your program over that backgrounded bash script ?
For me it's easy to maintain and to add functionalities into it as I choose to.
But for udisksevt, it's a heavy task to build it on a machine which doesn't use the haskell development environment for other tasks.
So if you want, can you explain why you prefer haskell as development environment over C or C++ for example, which are more generally accessible ?
Present some advertising for your program, to incite the usage of it, over other choices...
Thanks
Offline
I use haskell just because it is my favourite language you know, after haskell and something like python, which are very high level languages, it is very difficult to switch back to something like C/C++. I think I cannot write in C or C++ something useful and correctly working at the same time now
and - it is the most important reason - programming in haskell is the most delightful thing I met in programming at all
as for udisksevt efficiency:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
3850 dpx-infi 20 0 31676 6548 3228 S 0 0.2 0:00.04 udisksevt
you see, it take not so much memory. even zsh uses more! CPU usage is even lesser - most of time udisksevt just sleeps waiting for a D-Bus event. so the performance isn't a problem.
as for alternatives, besides the self-written something (bash script, C program etc) I don't know any udisks-based programs (I don't speak of major DE like GNOME of course).
as for advantages - I don't know I find it useful, maybe someone else will find it useful too. This is what community contributions are for after all
the heavy build dependencies are solvable by binary packages. I think I could try to setup a repository if it is necessary.
Last edited by DPX-Infinity (2010-08-18 16:20:59)
Offline
haskell-dbus-core-parsec3 gives a build error...
==> Making package: haskell-dbus-core-parsec3 0.8.3.1-1 (Sat Sep 4 21:59:39 CDT 2010)
==> Checking Runtime Dependencies...
==> Checking Buildtime Dependencies...
==> Retrieving Sources...
-> Found dbus-core-0.8.3.1.tar.gz
==> Validating source files with md5sums...
dbus-core-0.8.3.1.tar.gz ... Passed
==> Extracting Sources...
-> Extracting dbus-core-0.8.3.1.tar.gz with bsdtar
==> Removing existing pkg/ directory...
==> Starting build()...
Configuring dbus-core-0.8.3.1...
Setup: At least the following dependencies are missing:
text ==0.7.*
Aborting...
error: Build failed
Last edited by Chaniyth (2010-09-05 03:03:53)
Offline
Since dbus-core package doesn't now have parsec=3.* dependency, I've created separate haskell-dbus-client3 for dbus-client-0.3 package (0.4 still doesn't work) and rewritten the makedeps of all packages to use it and plain haskell-dbus-core from AUR. It should work now, I've just tested it
Offline