Bug 304301 - Review Request: pysol - A Python Solitaire game collection
Review Request: pysol - A Python Solitaire game collection
Product: Fedora
Classification: Fedora
Component: Package Review (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jason Tibbitts
Fedora Extras Quality Assurance
Depends On:
Blocks: 304311 304331 304341
  Show dependency treegraph
Reported: 2007-09-24 20:25 EDT by Stewart Adam
Modified: 2007-11-30 17:12 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-09-29 17:26:16 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Stewart Adam 2007-09-24 20:25:19 EDT
Spec URL: http://www.diffingo.com/downloads/diffingo-repo/pysol/pysol.spec
SRPM URL: http://www.diffingo.com/downloads/diffingo-repo/pysol/pysol-4.82-3.fc8.src.rpm
PySol is a solitaire game with a number of nice features, including hints,
autoplay, unlimited undo, player statistics, demo mode, selectable card
sets, background graphics and integrated help. It currently supports over
one hundred different games & variants, and has a plug-in architecture
which makes adding more very easy
Comment 1 Jason Tibbitts 2007-09-25 01:32:40 EDT
This builds OK for me; rpmlint says:

  pysol.x86_64: E: non-executable-script /usr/share/pysol/pysol.py 0644
This should probably be executable as the script is actually runnable, but I
guess it's not the intended means of starting the game.

  pysol.x86_64: E: no-binary
Is there some reason this package isn't noarch?
Comment 2 Stewart Adam 2007-09-25 17:03:14 EDT
I made the package noarch and although like you said not really needed,
/usr/share/pysol/pysol.py is executable.

Spec URL: http://www.diffingo.com/downloads/diffingo-repo/pysol/pysol.spec
Comment 3 Jason Tibbitts 2007-09-26 16:11:00 EDT
This builds fine and rpmlint is clean; I'll run through the checklist as soon as
I get home this evening.  But unfortunately it doesn't run:

ImportError: No module named pysolsoundserver

This happens even if I pass --nosound.  It looks like there's code to detect
that the module isn't there (look for warn_pysolsoundserver) but the import
isn't wrapped in a try block.  When I get home I'll have to see if I can't hack
it a bit.  Or this could grow a dependency on the sound server, except that it
would have to be a circular dependency, and in that case they should probably
just be bundled together in one package.
Comment 4 Stewart Adam 2007-09-26 20:09:54 EDT
I've added a patch so that the sound option will be disabled if the pysol
sound-server isn't found, but if it is then the option to enable sound will
present itself.

Spec URL: http://www.diffingo.com/downloads/diffingo-repo/pysol/pysol.spec
Comment 5 Jason Tibbitts 2007-09-27 11:44:34 EDT
Hmm, yes, that hack works.  A few issues cropped up in testing, though:

One, which I don't think is a blocker but is annoying, is that when you start
pysol from the command line you get a bunch of spew:

Error loading plugin /usr/share/pysol/games/acesup.py: duplicate game ID 903
Error loading plugin /usr/share/pysol/games/auldlangsyne.py: duplicate game ID 172

I thought it was loading both the uncompiled and compiled versions of each file,
but I deleted the .py[oc] files and it still happens.

Another issue is that I can't pick many of the games; for example, Baker's Dozen
just gives me a dialog (that I can't paste from, damn it) containing:

Internal error.  Please report this bug:
<type 'exceptions.TypeError'>:
unbound method startGame() must be called with CastlesInSpain instance as first
argument (got BakersDozen instance instead)

Perhaps it's related to the previous issue.

There are also a couple of review issues:

Source: tags should be URLs if possible.  I don't see where pysol-4.82.tar.bz2
comes from, though; upstream only has the -src tarball.  Where'd you get it?

Might as well tack a period onto the end of %description.

? can't check if source files match upstream.
* package meets naming and versioning guidelines.
* specfile is properly named, is cleanly written and uses macros consistently.
* summary is OK.
* description is OK (could use a period, I guess).
* dist tag is present.
* build root is OK.
* license field matches the actual license.
* license is open source-compatible.
* license text included in package.
* latest version is being packaged.
* BuildRequires are proper.
* %clean is present.
* package builds in mock (development, x86_64).
* package installs properly
* rpmlint is silent.
* final provides and requires are sane:
   pysol = 4.82-5.fc8
X Manual testing shows many issues.
* owns the directories it creates.
* doesn't own any directories it shouldn't.
* no duplicates in %files.
* file permissions are appropriate.
* no scriptlets present.
* code, not content.
* documentation is small, so no -docs subpackage is necessary.
* %docs are not necessary for the proper functioning of the package.
* desktop file looks good.
Comment 6 Stewart Adam 2007-09-27 18:46:15 EDT
I got the sources from the OpenSuSE SRPM package, as it apparently used to be on
the PySol website but now it's gone (For example see

I have the feelings the duplicate GameID problem will take a while as I have to
filter thought each file - Is it a blocker or can I work on this later once the
packages is submitted?
Comment 7 Jason Tibbitts 2007-09-27 19:50:57 EDT
Hmm, well, please do include the URL for the tarball that is still available (if
it's the same as what's in this package, of course) and add a comment to the
spec explaining that the other tarball is no longer available from upstream.

About the duplicate GameID thing, I don't think the spew in itself is a problem,
but the fact that the game crashes (and will then crash continuously until you
delete ~/.pysol) if you select a good portion of the games seems to be a
significant problem to me.  I can't tell if the two problems are related,
though.  For example, the game Cruel is broken but it doesn't show up in the
complaints about duplicate IDs.
Comment 8 Stewart Adam 2007-09-27 21:37:26 EDT
I've been looking around, no other distributions have patches ready so it seems
like this is an upstream problem, and seeing as upstream doesn't provide
tarballs and hasn't been updates since 2003... We're in trouble.
Comment 9 Jason Tibbitts 2007-09-27 22:12:05 EDT
Well, I know I've played pysol since 2003.  The source hasn't changed, so
perhaps something has changed with Python which has caused this breakage.

I don't know nearly enough about Python to have any clue what might have
changed, but at least it's a place to start.
Comment 10 Jason Tibbitts 2007-09-27 22:32:51 EDT
More info:

The code in pysol.py starting at line 60 importa all of the games and plugins. 
Then the code in main.py (line 94) loads the plugins again.

Passing --noplugins disables the second load and things seem to work well.  Note
that your wrapper doesn't pass on the arguments; it might be best if you added
"$*" to the end of the command line.

So now it remains to figure out which chunk of code would be best to disable.

Note You need to log in before you can comment on or make changes to this bug.