[wpkg-users] "Database Inconsistency: Package with ID x does not exist..." But it Does Exist

Adam Thorn alt36 at cam.ac.uk
Mon Nov 27 20:17:13 CET 2017


On 27/11/2017 15:12, James Arnold wrote:

> everyone!) the .xml file for the package itself (eg msoffice.xml,
> chrome.xml) I can call anything at all. What matters is, in the file
> itself, the <package></package> section has the id=boris SO LONG AS in
> profiles.xml I've a section under the relevant OU for <package
> package-id="boris" />

There are a few different ways of defining your packages. You can use a 
single packages.xml file:

https://wpkg.org/Packages.xml#packages.xml_structure

which has the overall structure

<?xml version="1.0" encoding="UTF-8"?>
<packages>

  <package id="foo" ...>
    <!-- define package foo here -->
  </package>

  <package id="bar" ...>
    <!-- define package bar here -->
  </package>

  <!-- keep going with as many package elements as you like -->

</packages>

But that rapidly becomes difficult to manage, so you might instead split 
your package definitions into multiple files inside a packages/ directory:

https://wpkg.org/Packages.xml#Individual_XML_package_files

and it sounds like that's what you have. But as you say, all that 
matters is the attributes within the contents of the XML, and the 
software you assign to a host in profiles.xml..

https://wpkg.org/Profiles.xml

need to have "package-id" attributes matching the "id" attribute in your 
<package> elements. Note that you can split up your profiles.xml file 
into multiple files in just the same way that packages.xml can be split. 
And to complete the set, hosts.xml (which defines how the profiles from 
profiles.xml get assigned to a particular host) can be split in much the 
same way:

https://wpkg.org/Hosts.xml

Yet another possibility is to get packages.xml (or profiles.xml or 
hosts.xml) from a webserver by suitably defining settings such as 
web_packages_file_name and wpkg_base in your config.xml:

https://wpkg.org/Config.xml

The config.xml provided with wpkg is well-commented and reading the 
default version that ships with wpkg is the best way to see the options 
(as yours might have been locally altered!). This is what I do, mainly 
because all our info about hosts and profiles ties in to a local 
database, so we query that via PHP and dynamically generate the hosts 
and profile XML contents as needed.

Adam


More information about the wpkg-users mailing list