[wpkg-users] Invalid XML path specified

Peter Gough pmgough at gmail.com
Thu Feb 26 13:12:40 CET 2015


I've created the empty folders and indeed the error messages no longer
appear. Thanks for the comprehensive explanation and simple solution.

Did I tell you how much I loved WPKG?

On Thu Feb 26 2015 at 9:52:38 PM Rainer Meier <r.meier at wpkg.org> wrote:

> Hi Peter,
>
> On 26.02.2015 11:58, Peter Gough wrote:
> > Firstly can I say 'thank you' for all of the work you've put into this
> project.
> > You have saved me and I imagine others countless hours of
>
> Thanks. Good to hear and you're very welcome. Although I didn't have as
> much
> time recently to invest in new features and enhancements as I would like
> to. But
> WPKG is still not dead.
>
>
> > I've never previously made any changes to config.xml. The version on my
> WPKG
> > server is from 2009 and I've checked and I didn't make any changes to
> the one I
> > downloaded at that time. I have just copied a more recent version to my
> dev
> > server but I get the same errors. I was under the impression that if
> wpkg.js,
> > hosts.xml, packages.xml and profiles.xml were all in the same folder
> then all
> > would be well.
>
> This is entirely Ok, even in latest version.
>
>
> > I've always maintained a separate folder for my packages, unsurprisingly
> called
> > 'Packages', which contains individual .xml files for each package but my
> hosts
> > are in the hosts.xml file in the root directory and in the same
> directory I use
> > profiles.xml file to keep info about my profiles.
> >
> > Did something change that means I now need to edit config.xml or other
> files?
>
> No. You don't need to.
> Let me explain what happened:
> In WPKG versions previously WPKG releases the paths to the packages, hosts
> and
> profiles were hard-coded. WPKG was looking up the following locations:
> - packages.xml
> - packages/*.xml
> - hosts.xml
> - hosts./*.xml
> - profiles.xml
> - profiles/*.xml
>
> WPKG did silently ignore if one of the files/directories did not exist.
> Now in
> one of the latest packages I have introduced the ability to add as many
> paths to
> the search path (XML files or directories) as you would like to. Allowing
> you to
> specify completely different locations (on file system or HTTP servers) as
> you like.
>
> In order to keep compatibility the defaults were set to the following
> values:
>          <param name='packages_path' value='packages.xml|packages' />
>          <param name='profiles_path' value='profiles.xml|profiles' />
>          <param name='hosts_path'    value='hosts.xml|hosts' />
>
> As a result WPKG behavior is exactly the same as in previous versions.
> Except in
> a very small detail. If one of the paths specified within packages_path,
> profiles_path or hosts_path does not exist, then WPKG knows that this is an
> error since the user on purpose specified a folder/file which does not
> exist.
> While previous versions would also simply have continued without even a
> warning
> if for example the packages/ folder had gone missing. Now WPKG knows that a
> missing packages/ folder is an error since you explicitly specified it to
> read
> the packages from there. Though as you noticed the error is logged but
> does not
> cause WPKG to stop.
>
> Moreover the default distribution package of WPKG comes with empty
> packages/
> profiles/ and hosts/ folders inside the distribution ZIP. Hence there is no
> error at all. Though if somebody of course removes one of the folders (as
> there
> are no files within) then of course WPKG prints an error about inconsistent
> configuration and folders.
>
> There are two solutions to this:
> - Create missing folders (even emtpy)
> - Change configuration to tell WPKG not so use the folders
>
> The second solution can be achieved by altering config.xml (e.g. for
> profiles
> and hosts):
>          <param name='packages_path' value='packages.xml|packages' />
>          <param name='profiles_path' value='profiles.xml' />
>          <param name='hosts_path'    value='hosts.xml' />
>
>
> If you don't want to alter config.xml try just creating hosts/ and
> profiles/ sub
> folders and the error will go away.
>
> br,
> Rainer
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wpkg.org/pipermail/wpkg-users/attachments/20150226/682e795c/attachment-0003.html>


More information about the wpkg-users mailing list