Skip to main content
Package Manager Problem 1.1. RC2 Started by ahrasis · · Read 5915 times 0 Members and 1 Guest are viewing this topic. previous topic - next topic

Package Manager Problem 1.1. RC2

I am not sure this should be here or in support but it's more related to addons, so I ended up posting this here.

I got a new package for Quick Reply Reposition Addon but I cannot properly install it as the package manager didn't seem to install my template from the right folder. (I attached it here temporarily).

For version 1.0 I use folder 10 and for folder 1.1 I use folder 11 but this was not respected by the package manager. It still uses folder 10 even when install on ElkArte 1.1 RC2, so I am lost as to why and how to fix it. Here is the xml code for installation:
Code: [Select]
	<install for="1.0*">
<readme type="file" parsebbc="true">QRR.readme.txt</readme>
<require-file name="QRR.english.php" destination="LANGUAGEDIR/english/QRR" />
<require-file name="QRR.subs.php" destination="SOURCEDIR/addons/QRR" />
<require-file name="10/QRR.template.php" destination="THEMEDIR/QRR" />
<require-file name="QRR.styles.css" destination="THEMEDIR/css/QRR" />
<code>QRR.hooks.php</code>
<redirect url="?action=admin;area=addonsettings" timeout="499">Redirecting to Addons Settings...</redirect>
</install>
<uninstall for="1.0*">
<readme parsebbc="true">QRR.readme.txt</readme>
<remove-dir name="LANGUAGEDIR/english/QRR" />
<remove-dir name="SOURCEDIR/addons/QRR" />
<remove-dir name="THEMEDIR/QRR" />
<remove-dir name="THEMEDIR/css/QRR" />
<code>QRR.hooks.php</code>
<redirect url="?action=admin;area=packages" timeout="499">Redirecting to Package Manager...</redirect>
</uninstall>

<install for="1.1*">
<readme type="file" parsebbc="true">QRR.readme.txt</readme>
<require-file name="QRR.english.php" destination="LANGUAGEDIR/english/QRR" />
<require-file name="QRR.subs.php" destination="SOURCEDIR/addons/QRR" />
<require-file name="11/QRR.template.php" destination="THEMEDIR/QRR" />
<require-file name="QRR.styles.css" destination="THEMEDIR/css/QRR" />
<code>QRR.hooks.php</code>
<redirect url="?action=admin;area=addonsettings" timeout="499">Redirecting to Addons Settings...</redirect>
</install>
<uninstall for="1.1*">
<readme parsebbc="true">QRR.readme.txt</readme>
<remove-dir name="LANGUAGEDIR/english/QRR" />
<remove-dir name="SOURCEDIR/addons/QRR" />
<remove-dir name="THEMEDIR/QRR" />
<remove-dir name="THEMEDIR/css/QRR" />
<code>QRR.hooks.php</code>
<redirect url="?action=admin;area=packages" timeout="499">Redirecting to Package Manager...</redirect>
</uninstall>

Do enlighten me as to where the fault is.

Re: Package Manager Problem 1.1. RC2

Reply #1

With a glance at the XML that sounds more like a bug in Elk 1.1 to me.

Re: Package Manager Problem 1.1. RC2

Reply #2

Try being more restrictive in the version line, right now I think it may be interpreted as open ended.

So
Code: [Select]
install for="1.0*"
to
Code: [Select]
install for="1.0.0 - 1.0.99"

and
Code: [Select]
install for="1.1*"
to
Code: [Select]
install for="1.1.RC2 - 1.1.99"

Same for the uninstall lines as well.  ETA: Removed extra space
Last Edit: September 17, 2017, 09:53:58 am by Spuds

Re: Package Manager Problem 1.1. RC2

Reply #3

Or maybe even only 1.0.* (with the dot before the asterisk) instead of 1.0*
Because, 1.0* for the compare is converted to a range:
Code: [Select]
1.00dev0-1.0999
and then the upper limit is likely split to:
Code: [Select]
major: 1
minor: 0999
and the two numbers are then cast to int, and f I remember correctly, php casts 0999 to 999.
So, in fact, 1.0* becomes:
Code: [Select]
install for="1.0 dev - 1.999"
and that includes 1.1 as well, overriding the 1.1* (that anyway would become 1.1 dev - 1.999 creating confusion to the installer).
Bugs creator.
Features destroyer.
Template killer.

Re: Package Manager Problem 1.1. RC2

Reply #4

Though I really think that 1.0* should not in any way  be the same with 1.1 at all, it's fine with me. I will just follow what @Spuds suggested above for the solution.

Re: Package Manager Problem 1.1. RC2

Reply #5

Well, the use of the * right after the 0 is at least ambiguous[1], and in any case I would recommend the "." to better target the micro release. ;)
And you will see it better with 1.1* that could match 1.1 but also 1.10 or 1.100
Bugs creator.
Features destroyer.
Template killer.

 

Re: Package Manager Problem 1.1. RC2

Reply #6

My intention was to cover RC and Beta which from what I see has no "." after 1.0 or 1.1 but it's not a big deal to me any way.