Feature request: sum-file checker & updater

Announcements and discussion regarding any projects related to Cyan Worlds' Plasma Engine including (but not limited to) CyanWorlds.com Engine, Drizzle, OfflineKI, PyPRP, and libHSPlasma.

Feature request: sum-file checker & updater

Postby diafero » Tue Jun 30, 2009 4:28 am

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.
I prefer e-mails to "diafero arcor de" (after adding the at and the dot) over PMs.

"Many people's horizon is a circle with a radius of zero. They call it their point of view."

Deep Island Shard | Offline KI
diafero
Deep Island Admin
 
Posts: 2966
Joined: Mon May 05, 2008 5:50 am
Location: Germany

Re: Feature request: sum-file checker & updater

Postby Chacal » Tue Jun 30, 2009 11:16 am

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.
Chacal


"The weak can never forgive. Forgiveness is an attribute of the strong."
-- Mahatma Gandhi
User avatar
Chacal
 
Posts: 2508
Joined: Tue Nov 06, 2007 2:45 pm
Location: Quebec, Canada

Re: Feature request: sum-file checker & updater

Postby Zrax » Tue Jun 30, 2009 5:28 pm

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 ;)
User avatar
Zrax
 
Posts: 206
Joined: Fri Sep 28, 2007 5:19 pm
Location: Waist-deep in a conecano

Re: Feature request: sum-file checker & updater

Postby Chacal » Tue Jun 30, 2009 5:35 pm

Zrax, you are like an ATM for hackers!
We input a request and instantly get code.
Chacal


"The weak can never forgive. Forgiveness is an attribute of the strong."
-- Mahatma Gandhi
User avatar
Chacal
 
Posts: 2508
Joined: Tue Nov 06, 2007 2:45 pm
Location: Quebec, Canada

Re: Feature request: sum-file checker & updater

Postby Chacal » Thu Jul 02, 2009 6:38 pm

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" ?
Last edited by Chacal on Tue Jul 07, 2009 6:48 pm, edited 1 time in total.
Chacal


"The weak can never forgive. Forgiveness is an attribute of the strong."
-- Mahatma Gandhi
User avatar
Chacal
 
Posts: 2508
Joined: Tue Nov 06, 2007 2:45 pm
Location: Quebec, Canada

Re: Feature request: sum-file checker & updater

Postby Zrax » Fri Jul 03, 2009 1:23 am

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
User avatar
Zrax
 
Posts: 206
Joined: Fri Sep 28, 2007 5:19 pm
Location: Waist-deep in a conecano

Re: Feature request: sum-file checker & updater

Postby diafero » Fri Jul 03, 2009 9:13 am

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]
Last edited by diafero on Wed Jan 05, 2011 11:47 am, edited 1 time in total.
I prefer e-mails to "diafero arcor de" (after adding the at and the dot) over PMs.

"Many people's horizon is a circle with a radius of zero. They call it their point of view."

Deep Island Shard | Offline KI
diafero
Deep Island Admin
 
Posts: 2966
Joined: Mon May 05, 2008 5:50 am
Location: Germany

Re: Feature request: sum-file checker & updater

Postby Chacal » Thu Jul 09, 2009 2:09 pm

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.
Chacal


"The weak can never forgive. Forgiveness is an attribute of the strong."
-- Mahatma Gandhi
User avatar
Chacal
 
Posts: 2508
Joined: Tue Nov 06, 2007 2:45 pm
Location: Quebec, Canada

Re: Feature request: sum-file checker & updater

Postby Zrax » Mon Jul 13, 2009 1:14 pm

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...
User avatar
Zrax
 
Posts: 206
Joined: Fri Sep 28, 2007 5:19 pm
Location: Waist-deep in a conecano

Re: Feature request: sum-file checker & updater

Postby Chacal » Mon Jul 13, 2009 3:16 pm

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.
Chacal


"The weak can never forgive. Forgiveness is an attribute of the strong."
-- Mahatma Gandhi
User avatar
Chacal
 
Posts: 2508
Joined: Tue Nov 06, 2007 2:45 pm
Location: Quebec, Canada

Next

Return to Plasma Development

Who is online

Users browsing this forum: No registered users and 0 guests