Bug 1221869 - error after installing package "powdertoy"
Summary: error after installing package "powdertoy"
Status: NEW
Alias: None
Product: openSUSE Distribution
Classification: openSUSE
Component: Other (show other bugs)
Version: Leap 15.5
Hardware: Other Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: David Sterba
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-22 14:55 UTC by Giacomo Comes
Modified: 2024-05-09 13:45 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Giacomo Comes 2024-03-22 14:55:56 UTC
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.
Comment 1 OBSbugzilla Bot 2024-05-09 13:45:14 UTC
This is an autogenerated message for OBS integration:
This bug (1221869) was mentioned in
https://build.opensuse.org/request/show/1172940 Backports:SLE-15-SP5 / powdertoy