Page 1 of 2

Feature request: sum-file checker & updater

PostPosted: Tue Jun 30, 2009 4:28 am
by diafero
I have a feature request for another tool being added to libPlasma: Since the error message Uru gives when a sum-file is incorrect does not tell us much (and it can occur in other cases, too), it would be cool to have a tool that goes through all sum files in a given directory and checks if they are correct. It should also have the option to automatically remove files from the sum file which are no longer present and to update checksums of changed files.

Re: Feature request: sum-file checker & updater

PostPosted: Tue Jun 30, 2009 11:16 am
by Chacal
I was about to write you a script using Urusum, but I discovered that urusum is a 16-bit application and won't run on a 64-bit Windows system.
Oops! I hope we have a replacement.

Re: Feature request: sum-file checker & updater

PostPosted: Tue Jun 30, 2009 5:28 pm
by Zrax
It is done :)

If you simply want to update all of your sum files, you can run "PlasmaSum -y *.sum", and it will check/update all of them for you. You can also use the tool to manually manipulate sum files, or to view their contents. Also, unlike PlasmaShop, PlasmaSum also displays/updates the timestamps in the .sum file ;)

Re: Feature request: sum-file checker & updater

PostPosted: Tue Jun 30, 2009 5:35 pm
by Chacal
Zrax, you are like an ATM for hackers!
We input a request and instantly get code.

Re: Feature request: sum-file checker & updater

PostPosted: Thu Jul 02, 2009 6:38 pm
by Chacal
Does Plasma sum have to be put in the uru\dat directory?

When I run this from I:\Uru\LibPlasma:
plasmasum -L i:\Uru\abm\dat\city.sum

I get this list of 46 prp files:
6977fa0056aba5992a40403d5302aa50 2009/06/04 14:58:24 dat\city_District_bahroFlyers_arch.prp
9ffb19fdf279eec27a773868bda34978 2009/06/04 14:58:26 dat\city_District_bahroFlyers_city1.prp
f6bcfcc613e1562f31a058def7416053 2009/06/04 14:58:26 dat\city_District_bahroFlyers_city2.prp
ac6366d0c55bd1e58f717bd54a7531ea 2009/06/04 14:58:26 dat\city_District_bahroFlyers_city3.prp
... other prps ...
3b84d46eb48b45f31a028c0c53949030 2004/05/26 13:39:32 dat\city_District_Textures.prp

All of these files exist in the dat directory.

However when I run this from I:\Uru\LibPlasma:
plasmasum i:\Uru\abm\dat\city.sum

I get 46 messages like this:
i:\Uru\abm\dat\city.sum:
File dat\city_District_bahroFlyers_arch.prp not found. Remove it? [y/N]

Could it be because PlasmaSum looks for the files in the relative path "dat\" instead of "I:\Uru\dat" ?

Re: Feature request: sum-file checker & updater

PostPosted: Fri Jul 03, 2009 1:23 am
by Zrax
Yes, it currently checks from the current directory, but it does scan around a bit from there (otherwise it would have a hard time finding everything correctly ;) )... I'll go ahead and fix it to use the path specified as a base for searching

Re: Feature request: sum-file checker & updater

PostPosted: Fri Jul 03, 2009 9:13 am
by diafero
For some reason, PlasmaSum does not work for (Kubuntu 9.04). I tried to do "make clean && make -j3", but the result is still the same:

Code: Select all
$ PlasmaSum *.sum
AhnonayMOUL.sum:

Ahnonay.sum:
  7c6eb9f3a335c1795ff473b8901b80b8  2004/05/26 17:38:36  dat\Ahnonay_District_BuiltIn.prp
*** stack smashing detected ***: PlasmaSum terminated
======= Backtrace: =========
/lib/tls/i686/cmov/libc.so.6(__fortify_fail+0x48)[0xb7b81da8]
/lib/tls/i686/cmov/libc.so.6(__fortify_fail+0x0)[0xb7b81d60]
.../src/Plasma/Plasma/bin/libPlasma.so[0xb7f91a64]
.../src/Plasma/Plasma/bin/libPlasma.so(_ZN5plMD510hashStreamEP8hsStream+0x1c6)[0xb7e44842]
[0x0]

Re: Feature request: sum-file checker & updater

PostPosted: Thu Jul 09, 2009 2:09 pm
by Chacal
Zrax wrote:Yes, it currently checks from the current directory, but it does scan around a bit from there (otherwise it would have a hard time finding everything correctly ;) )... I'll go ahead and fix it to use the path specified as a base for searching


/me timidly tugs at Zrax's shirt sleeve.

Re: Feature request: sum-file checker & updater

PostPosted: Mon Jul 13, 2009 1:14 pm
by Zrax
Sorry, I've been a bit busy lately... The path issue should be fixed now in the latest build (I haven't tested it very extensively though, so let me know if it's still giving you problems). Also, diafero: I can't seem to reproduce your bug... When you list your make command, you didn't include "make install" -- did you run that as well? If not, it's probably using an old version of libPlasma.so, which could cause your crash...

Re: Feature request: sum-file checker & updater

PostPosted: Mon Jul 13, 2009 3:16 pm
by Chacal
Thanks Zrax!
The path issue seems fixed.
The plasmasum -L command always works.
Using plasmasum -y gives various results depending on which sum file it is used against.
For instance, I tried "plasmasum -y I:\Uru\POTS\dat\city.sum" and the only output was
i:\uru\pots\dat\city.sum:
after which plasmaSum crashed.

After Auto-building the sum file with Plasmashop, the same command worked for about half the files in city.sum, then I got a crash again.

I tried several other sum files, and results vary. Sometimes there is no crash, sometimes there is a crash after a few sums.