Bug ID 1221869
Summary error after installing package "powdertoy"
Classification openSUSE
Product openSUSE Distribution
Version Leap 15.5
Hardware Other
OS Other
Status NEW
Severity Normal
Priority P5 - None
Component Other
Assignee screening-team-bugs@suse.de
Reporter comes@naic.edu
QA Contact qa-bugs@suse.de
Target Milestone ---
Found By ---
Blocker ---

The packages powdertoy once installed causes problem.

The content of a file that it installs is not valid.
The file in question is:
  /usr/share/mime/packages/powdertoy-save.xml
and the issue is due to the following extract:

        <mime-type type="application/vnd.powdertoy.save">
                <comment>Powder Toy save</comment>
                <glob pattern=*.cps/>
                <glob pattern=*.stm/>
        </mime-type>"

Note the single double quote at the end of </mime-type>
and *.cps *.stm not being surrounded by quotes

When installed this error is printed:
# /usr/share/mime/packages/powdertoy-save.xml:5: parser error : AttValue: " or
' expected
#             <glob pattern=*.cps/>
#                           ^
# /usr/share/mime/packages/powdertoy-save.xml:5: parser error : attributes
construct error
#             <glob pattern=*.cps/>
#                           ^
# /usr/share/mime/packages/powdertoy-save.xml:5: parser error : Couldn't find
end of Start Tag glob line 5
#             <glob pattern=*.cps/>
#                           ^
# /usr/share/mime/packages/powdertoy-save.xml:6: parser error : AttValue: " or
' expected
#             <glob pattern=*.stm/>
#                           ^
# /usr/share/mime/packages/powdertoy-save.xml:6: parser error : attributes
construct error
#             <glob pattern=*.stm/>
#                           ^
# /usr/share/mime/packages/powdertoy-save.xml:6: parser error : Couldn't find
end of Start Tag glob line 6
#             <glob pattern=*.stm/>
#                           ^
# Failed to parse '/usr/share/mime/packages/powdertoy-save.xml'

Such error message is repeated also later when other packages are installed.

There are two simple ways to fix the problem:

1) add a patch with a content like:
--- The-Powder-Toy-93.3/resources/powdertoy-save.xml.ori        2024-03-05
21:16:59.051478441 -0400
+++ The-Powder-Toy-93.3/resources/powdertoy-save.xml    2024-03-05
21:17:15.887478820 -0400
@@ -2,7 +2,7 @@
        <mime-info
xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
        <mime-type type="application/vnd.powdertoy.save">
                <comment>Powder Toy save</comment>
-               <glob pattern=*.cps/>
-               <glob pattern=*.stm/>
-       </mime-type>"
+               <glob pattern="*.cps"/>
+               <glob pattern="*.stm"/>
+       </mime-type>
 </mime-info>

or

2) add in the spec file:
 %prep
 %setup -q -n The-Powder-Toy-%{version}
+sed -i '/\/mime-type/s@"@@;/pattern=/{s@=@="@;s@/@"/@}'
resources/powdertoy-save.xml

 %build

Which one to use is a matter of taste.
The problem is present in Leap 15.5 and 15.6.
The package in the games project is not affected as upstream
has already fixed the issue in the more recent version
present there.


You are receiving this mail because: