Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Topic started by: wintstar on September 07, 2021, 08:26:40 AM

Title: Error with upgrade from in package-info.xml
Post by: wintstar on September 07, 2021, 08:26:40 AM
The previous version Id of the mod is 1.0. When I upload the mod package in SMF 2.0.18 I get this error message:

QuotePackage upload failed due to the following error:
"Although the package was downloaded to the server it appears to be empty. Please check the Packages directory, and the "temp" sub-directory are both writable. If you continue to experience this problem you should try extracting the package on your PC and uploading the extracted files into a subdirectory in your Packages directory and try again. For example, if the package was called shout.tar.gz you should:
1) Download the package to your local PC and extract it into files.
2) Using an FTP client create a new directory in your "Packages" folder, in this example you may call it "shout".
3) Upload all the files from the extracted package to this directory.
4) Go back to the package manager browse page and the package will be automatically found by SMF."

If I remove <upgrade from="1.0" for="2.0.15-2.0.99">...</upgrade> then the mod package works. Where is the mistake, what is wrong?

Code (xml) Select
<?xml version="1.0"?>
<!DOCTYPE package-info SYSTEM "http://www.simplemachines.org/xml/package-info">
<package-info xmlns="http://www.simplemachines.org/xml/package-info" xmlns:smf="http://www.simplemachines.org/">
<name>Themes Demo</name>
<id>Franky:Themesdemo</id>
<type>modification</type>
<version>1.0.1</version>

<install for="2.0.15-2.0.99">
<readme parsebbc="true" lang="german_informal-utf8">readme/german_informal-utf8.txt</readme>
<readme parsebbc="true" lang="german-utf8">readme/german-utf8.txt</readme>
<readme parsebbc="true">readme/readme.txt</readme>
<require-dir name="Sources" destination="$boarddir" />
<require-dir name="Themes" destination="$boarddir" />
<require-dir name="Themesdemo" destination="$boarddir" />
<database>install.php</database>
<redirect url="?action=admin;area=thdosset" />
</install>

  <upgrade from="1.0" for="2.0.15-2.0.99">
    <readme parsebbc="true" lang="german_informal-utf8">readme/german_informal-utf8.txt</readme>
    <readme parsebbc="true" lang="german-utf8">readme/german-utf8.txt</readme>
    <readme parsebbc="true">readme/readme.txt</readme>
    <remove-dir name="$boarddir/Themesdemo" />
    <remove-file name="$sourcedir/ManageThemesdemo.php" />
    <remove-file name="$sourcedir/Subs-Themesdemo.php" />
    <remove-file name="$themedir/ManageThemesdemo.template.php" />
    <remove-file name="$themedir/images/admin/thdo-generall.png" />
    <remove-file name="$languagedir/Themesdemo.english.php" />
    <remove-file name="$languagedir/Themesdemo.german-utf8.php" />
    <remove-file name="$languagedir/Themesdemo.german_informal-utf8.php" />
    <remove-file name="$languagedir/Themesdemo.spanish_latin-utf8.php" />
    <remove-file name="$languagedir/Themesdemo.spanish_latin.php" />
    <require-dir name="Sources" destination="$boarddir" />
    <require-dir name="Themes" destination="$boarddir" />
    <require-dir name="Themesdemo" destination="$boarddir" />
<database>upgrade.php</database>
<redirect url="?action=admin;area=thdosset" />
  </upgrade>

<uninstall for="2.0.15-2.0.99">
<remove-dir name="$boarddir/Themesdemo" />
<remove-file name="$sourcedir/ManageThemesdemo.php" />
<remove-file name="$sourcedir/Subs-Themesdemo.php" />
<remove-file name="$themedir/ManageThemesdemo.template.php" />
<remove-file name="$themedir/css/thdo.css" />
<remove-file name="$themedir/images/admin/thdo-generall.png" />
<remove-file name="$languagedir/Themesdemo.english.php" />
<remove-file name="$languagedir/Themesdemo.german-utf8.php" />
<remove-file name="$languagedir/Themesdemo.german_informal-utf8.php" />
<remove-file name="$languagedir/Themesdemo.german-utf8.php" />
<code>uninstall.php</code>
<redirect url="?action=admin;area=packages" />
</uninstall>

</package-info>
Title: Re: Error with upgrade from in package-info.xml
Post by: vbgamer45 on September 07, 2021, 07:15:12 PM
Does it work if you take out from="1.0"
Title: Re: Error with upgrade from in package-info.xml
Post by: wintstar on September 08, 2021, 03:53:29 AM
Quote from: vbgamer45 on September 07, 2021, 07:15:12 PMDoes it work if you take out from="1.0"

No, not work.
Title: Re: Error with upgrade from in package-info.xml
Post by: wintstar on September 14, 2021, 06:35:11 AM
I have solved it. Due to an update in Ubuntu 20.04 the configuration of the archive management was overwritten. This caused the archives to be packed incorrectly.