problems with versions and contents.xml

this is my contents.xml
katana.aff2aw.com/d/contents.xml

at the time of posting it was this:

This is my main p3d file:
katana.aff2aw.com/d/aff2aw.p3d

it supposed to be a simple dummy package:

class aff2aw(p3d):
    """ empty holder p3d that should download all other packadges """
    config(        
        display_name = "AFF:Second Anterean War",
        platform_specific = False)
        
    require('code')
    require('data')
    mainModule('c')

as you see it contains no code and is very small and probably will not change much.

now if i run this file:
panda3d aff2aw.p3d

it gets wrong version of the code package - v0.1 while in my xml i have 0.3 and 0.4 . Why does it get wrong version? how can i require(‘code’) the most recent version and always force a check?

it looks like my aff2aw.p3d file contains a single file:
p3d_info.xml

<?xml version="1.0" encoding="utf-8" ?>
<package name="aff2aw" main_module="c">
    <config display_name="AFF:Second Anterean War" />
    <requires name="code" version="0.1" host="http://katana.aff2aw.com/d/" />
    <requires name="data" version="0.1" host="http://katana.aff2aw.com/d/" />
    <requires name="panda3d" version="cmu_1.7" host="http://runtime.panda3d.org/" />
    <host url="http://runtime.panda3d.org/" />
    <host url="http://katana.aff2aw.com/d/" />
</package>

That contains name=“code” version=“0.1” , how would I make it point to the most recent version always, and re-download content.xml every time to check?

I have tried with no version information:

<?xml version="1.0" encoding="utf-8" ?>
<package name="aff2aw" main_module="c">
    <config display_name="AFF:Second Anterean War" />
    <requires name="code" host="http://katana.aff2aw.com/d/" />
    <requires name="data" host="http://katana.aff2aw.com/d/" />
    <requires name="panda3d" version="cmu_1.7" host="http://runtime.panda3d.org/" />
    <host url="http://runtime.panda3d.org/" />
    <host url="http://katana.aff2aw.com/d/" />
</package>

But that looks for packages with no version what so ever… and that fails because my packadges have versions.

There are two issues.

(1) You misunderstand the purpose of the “version” string. The “version” string does not encode a version number that you should increment with each new release; it rather encodes a unique series of versions that are fundamentally incompatible. If your p3d file references package code version 0.1, it will never attempt to download version 0.2, because that’s a different series. It will, however, automatically download any updates you publish to version 0.1. The ppackage utility will automatically handle the internal versioning necessary to manage this, each time you republish the code package.

(2) panda3d by default doesn’t contact the server host at startup to check for new versions available. If you want it to do this at every launch, use the -f parameter.

David

Thanks alot! That explains it. So the only other missing peace to generate patches to the different packages it to add -p to ppackadge and never change the versions?

Yep.

You generally only want to apply -p whenever you are sure you have a valid release that is ready for the public. While you are doing internal Q.A., you will probably not want to apply -p to each release. (Once you apply -p, it will forever add a new patch version to the patch chain, which users will have to download and patch through to get to the most current version. So there is an advantage to do this only for versions that you really want your users to have.)

David

Thanks!

What internal Q.A.? My QA is external :slight_smile: