Packager observations

This is with Patch A:

I’m trying to automate the process of creating incremental software
releases using the packager, and have a couple of observations.

  1. I am using the -m option with a .qpm file. This option rewrites
    the QPM:LicenseUrl line to point to rep://something when I have
    specified a file in the local file system. The next time I build
    the package from the new .qpm, the LicenseUrl is not available and
    I get no license going forward. I use the newest .qpm on each
    build to allow me to use the -b+ option.

  2. I would like to be able to direct the .qpm file and the .qpr file
    to different directories. The .qpm is only used internally for my
    next build, and the .qpr is exported. At the moment the -f option
    applies to all files.

  3. The .qpr file is the only file that apparently contains the License
    file in the case where LicenseUrl is a file, not a web address.
    However, the Package Manager does not appear to handle a .qpr, only
    a .qpk. The consequence is that I have to build a .qpr (cannot use
    the -k option to packager), and unpack the .qpr into the repository
    instead of just copying it. That makes the process a little
    messier and results in many more files in the repository. Am I
    doing something wrong here?

Cheers,
Andrew

Previously, Andrew Thomas wrote in qdn.public.qnxrtp.devtools:

This is with Patch A:

I’m trying to automate the process of creating incremental software
releases using the packager, and have a couple of observations.

Also,

  1. Somewhere in the past, I called a package “Development”, and the
    packager now insists on calling the package BlaBla-dev-*, despite
    the fact that I Do Not Want the -dev- designation in the package
    name. The packager adds another -dev- on subsequent builds, so
    that my package becomes BlaBla-dev-dev-. Somehow it stops at 2
    -dev-'s, but that’s at least one too many. I have hand-edited the
    .qpm to remove all -dev- designations, and to change all of the
    package information to be similar to another Application package
    that does not get the -dev- suffix, yet I have not been successful
    at stopping the packager from adding -dev- to my package name.
    What is the packager using to decide to put -dev- in the package
    name, and how do I stop it?

Andrew

Previously, Andrew Thomas wrote in qdn.public.qnxrtp.devtools:

This is with Patch A:

I’m trying to automate the process of creating incremental software
releases using the packager, and have a couple of observations.

  1. Is the package manager ever going to recognize build number as a
    change? Currently the packager can automatically update build
    number, but the package manager ignores it. I would think that the
    version number is the version of the software, and the build number
    is the version of the package. It is perfectly logical for the
    software version to stay the same, but the build number change,
    possibly due to changes in ancillary information, the addition of
    sample code, alterations to install scripts, etc. In this case,
    changing the version would be bad, but changing the build would be
    good. In the current setup, the package manager will not update
    the package.

Andrew

Previously, Andrew Thomas wrote in qdn.public.qnxrtp.devtools:

This is with Patch A:

I’m trying to automate the process of creating incremental software
releases using the packager, and have a couple of observations.

  1. It would be nice to have the option of putting the manifest in a
    non-XML file to be read when the packager runs. We package our
    software on 3 different operating systems, and the current
    packager forces us to maintain its manifest separately from the
    other 2.

Andrew

Previously, Andrew Thomas wrote in qdn.public.qnxrtp.devtools:

This is with Patch A:

I’m trying to automate the process of creating incremental software
releases using the packager, and have a couple of observations.

  1. I created a package through the packager with

QPM:ContentTopicSoftware Development/Libraries and Extensions/C Libraries</QPM:ContentTopic>

This never shows up in the repository listing, and if I install it
using
$ pkg-installer -u my_package.qpr
it never shows up in “View my software” in the package manager.
However, if I try to issue the pkg-installer -u command again, then
the installer claims that the package is already installed.

7a) How do I delete it? Just rm -r the directory within the
/pkgs/repository tree?

Andrew

Andrew, I’m the guy to ask and I’m going to try to help you out
with the packager. I just need a little time to finish up something
that I’m working on.

I’ll get back to you ASAP.

Jerry Chappell
jchappell@qnx.com

Previously, Andrew Thomas wrote in qdn.public.qnxrtp.devtools:

Previously, Andrew Thomas wrote in qdn.public.qnxrtp.devtools:
This is with Patch A:

I’m trying to automate the process of creating incremental software
releases using the packager, and have a couple of observations.

  1. I created a package through the packager with

QPM:ContentTopic>Software Development/Libraries and Extensions/C Libraries</QPM:ContentTopic

This never shows up in the repository listing, and if I install it
using
$ pkg-installer -u my_package.qpr
it never shows up in “View my software” in the package manager.
However, if I try to issue the pkg-installer -u command again, then
the installer claims that the package is already installed.

It turns out that this bug is not due to ContentTopic. I cannot get
the Package Manager to recognize this package, no matter what its
ContentTopic.

Andrew

This is frustrating. I responded to your questions, but my message
went into the ether somewhere…here we go again…

(1) Are you using a ‘basedir’ directory which holds all of your files?
If so, then when it asks for your license file, enter the location of
it on your local filesystem, with an explicit path (ie: /home/licenses/
license.txt). Packager will copy the file into a package.repdata/
directory and change the manifest entry. It should be able to
reuse this same location for the next time. Let me know if it
doesn’t.

(2) Currently there’s only one destination for all generated files.
You could write a script to move the QPR when it’s finished.

(3) Package installer can be called with a -u option:
pkg-installer -u package.qpr

The only problem is that it doesn’t yet let you confirm installation
of files before it actually does the installation.

Why can’t you use the -k option?

(4) If you are using the -m option to use a previous package
as the source of your default values, make sure the package you
pass to packager is the core package, not a development package.
I suspect that you passed a Bla-dev.qpr package, so it took the
name of that package (Bla-dev), and appended -dev onto the end.

(5) Note that the current version of the package installer does not
detect changes in the build number. Increment the release number
to permit updating of your software. Your version number need not
change as long as the release is incremented.

(6) In what format are you hoping to see the manifest? I presume
that the tag names will be completely different between a QNX
package and whatever utility you’re using, so I don’t see the
advantage of writing a manifest in text format.

(7) The package is probably not there at all. Why don’t you forward
me the package so that I can analyze it and tell you what the
problem is (jchappell@qnx.com).

(7a) I’m not the person to ask about deleting it, I’m afraid.

Good luck.
Jerry Chappell

As a preface to all of these, I am using the -u -b+ options to the
packager, so that I have only interactively run packager once. Now I
am re-generating the package based on the most recent previous .qpm
whose ancestry can be traced to the interactive session, but the most
recent .qpm is not necessarily directly from an interactive session.

My questions are predicated on the idea that the packager should be
useful for generating packages through a Makefile, without human
intervention. I would be more than a little surprised if QSSL is
using the packager in any other way than with the -u option, so you
must have thought of some of these things.

Previously, Jerry Chappell wrote in qdn.public.qnxrtp.devtools:

(1) Are you using a ‘basedir’ directory which holds all of your files?
If so, then when it asks for your license file, enter the location of
it on your local filesystem, with an explicit path (ie: /home/licenses/
license.txt). Packager will copy the file into a package.repdata/
directory and change the manifest entry. It should be able to
reuse this same location for the next time. Let me know if it
doesn’t.

It doesn’t. I am using a relative directory, as in
…/setup/LICENSE.TXT, which works fine on the first iteration, but on
subsequent non-interactive packager invocations, the “rep:…” is
carried from one .qpm to the next. The path I typed to the
interactive session is long gone, replaced by the “rep:…” location.

(2) Currently there’s only one destination for all generated files.
You could write a script to move the QPR when it’s finished.

If I knew what it was called, which I don’t (random insertion of -dev-
in the file name, auto-increment of build number, addition of the word
bld in all qpr’s after the first). Maybe I’ll just move all .qpr’s.
That seems sensible if somewhat heavy-handed.

(3) Package installer can be called with a -u option:
pkg-installer -u package.qpr

Not via a web repository.

The only problem is that it doesn’t yet let you confirm installation
of files before it actually does the installation.

Why can’t you use the -k option?

Because then the packager does not build the package.repdata directory
into a .qpk, so my license never gets included into the package. Only
the .qpr carries my license.

So, only .qpr carries the license, but .qpr is not usable in a
web-based repository. This seems inconsistent to me, which is why I
feel like I’m missing something.

(4) If you are using the -m option to use a previous package
as the source of your default values, make sure the package you
pass to packager is the core package, not a development package.
I suspect that you passed a Bla-dev.qpr package, so it took the
name of that package (Bla-dev), and appended -dev onto the end.

My development package has no core. It is a separate package that
only contains headers and libraries. I have Never Ever EVER typed the
extension -dev to anything ever anywhere under any circumstances to
any package ever. Never. Ever. !! :slight_smile:

Whew. Having said that, the packager magically adds the -dev- to my
package name, and I have no choice but to use the .qpm that it creates
in subsequent invocations, as it is the only place that carries the
updated build number. So packager adds -dev- and then adds another
one the next time.

What made packager add -dev- the first time, and how do I stop it?

(5) Note that the current version of the package installer does not
detect changes in the build number. Increment the release number
to permit updating of your software. Your version number need not
change as long as the release is incremented.

Are you talking about the PackageReleaseNumber or ReleaseVersion?
ReleaseVersion is my software version, and should not change.
Assuming you mean PackageReleaseNumber, does pkg-installer look at it?
It’s not displayed in the information window. Where is the argument
to packager that auto-increments the release?

(6) In what format are you hoping to see the manifest? I presume
that the tag names will be completely different between a QNX
package and whatever utility you’re using, so I don’t see the
advantage of writing a manifest in text format.

I’m using pax.

I like the idea of a file, one name per line, plain ASCII, without a
leading ‘/’, with shell-style globbing. If you don’t like globbing,
that can be done by a pre-processing step. It is easy to generate
lists of files using shell scripts, but it is not so easy to generate
hierarchies of XML tagged files and insert them into the correct
location in the .qpm file, being careful to remove the existing
content, especially since the Union links are actually placed within
the file list in the .qpm, rather than before or after.

(7) The package is probably not there at all. Why don’t you forward
me the package so that I can analyze it and tell you what the
problem is (> jchappell@qnx.com> ).

It is there. The package manager even believes that it is installed,
once installed with -u. It just cannot be seen in the installed
software, nor on a web repository. The files themselves are in
/pkgs/repository/Cogent/…

I’ll send it along by email.

(7a) I’m not the person to ask about deleting it, I’m afraid.

I did the old “rm -rf /pkgs/repository/Cogent/” and nothing
crashed. :slight_smile:

Thanks,
Andrew

Firstly, if you don’t include -b+ in your command-line options, the
packager will automatically increment the release number with
each pass. When the buid number is incremented, the release
number will always reset to 1, which the package installer will
recognize as the same package as is already installed.

The idea of running packager with the -m option is fine and is
not a strange thing to do. If the name of the package is
corrupted, however, I suggest that you start over from scratch
in order to determine what’s going on.

QSSL is working on automating the packaging process, you are
correct. I’m sure you noticed when installing packager that it
is referred to as an EXPERIMENTAL release (not even Beta), so
I’m sure you understand that development is ongoing.

If you already have a repository into which you are placing all
of your packages, then just manually copy the license file into
the repository, and enter the LicenseUrl as: rep://lic/license.txt.
Then you don’t have to generate a QPR whatsoever.

Keeping the build number as 1 will prevent the filename from
having a -bldX- entry in it.

When I built a package with only headers in it, packager created
a development core package which was marked as CORE. I don’t
know how you managed to get two packages marked as
COMPONENT. Starting from scratch should shed some light on
that problem.

The ReleaseVersion is your custom version number and need
not change between releases. The PackageReleaseNumber is
the release number to which I have been referring. It must be
an integer (whole number) of at least 1.

We have no plans at the moment to list files in any format
other than the manifest.

The package installer doesn’t show packages which have no
‘core’ package, so the ‘upgrade’ packages are never shown.
When you force it with a -u option, then all packages are
installed, regardless of their type.

Best of luck!
Jerry Chappell

By the way, this discussion should be in qdn.public.qnxrtp.porting
Can you post in that newsgroup?

Jerry Chappell

Previously, Jerry Chappell wrote in qdn.public.qnxrtp.devtools:

Firstly, if you don’t include -b+ in your command-line options, the
packager will automatically increment the release number with
each pass. When the buid number is incremented, the release
number will always reset to 1, which the package installer will
recognize as the same package as is already installed.

Can you explain the justification for this behaviour? It seems odd
that increasing the build number would decrease the release number.
These seem like orthogonal information. Or is the assumption that
each build has multiple releases? In this case, shouldn’t the package
manager look at both build and release to determine that the package
has changed? I am confused.

The idea of running packager with the -m option is fine and is
not a strange thing to do. If the name of the package is
corrupted, however, I suggest that you start over from scratch
in order to determine what’s going on.

The name is not corrupted. The name is constructed by the packager.
I cannot stop it from doing so, which is why I turned to you.
Starting over seems pointless. The qpm is the entire specification
for the package content and construction. It is represented in ASCII,
and there is no hidden information in this situation. What is it
doing to me? What makes you think that anything will change by
running interactively again? Why can you not explain the behaviour I
am seeing? Have you tried it yourself?

As far as determining what’s going on, I have no idea what the
packager is intending to do. I know that it is re-writing the package
name, but I don’t know the rules. I know that it gives me a component
package when I specify a core package, but I don’t know why. I cannot
determine what’s going on. I don’t have source to the packager. Can
you please tell me what’s going on?

QSSL is working on automating the packaging process, you are
correct. I’m sure you noticed when installing packager that it
is referred to as an EXPERIMENTAL release (not even Beta), so
I’m sure you understand that development is ongoing.

Of course I do, and I also understand that the packager is being used
to create packages. I am supplying feedback.

If you already have a repository into which you are placing all
of your packages, then just manually copy the license file into
the repository, and enter the LicenseUrl as: rep://lic/license.txt.
Then you don’t have to generate a QPR whatsoever.

That leads me to a problem. If I want to send a package to somebody,
or have them download the package using FTP, I have to use the .qpr.
It needs to contain the license file (this is a legal requirement),
which means I have to specify a file, not a URI. If I want to put the
package in a web repository, I need to use a .qpk, which means that it
cannot contain a license file, and I need to specify a URI, not a
file. Does this mean I need to have 2 independent packages in order
to handle the 2 common transmission cases, just because of the
license?

Keeping the build number as 1 will prevent the filename from
having a -bldX- entry in it.

I’d sort of figured that. Is there anywhere that I could find out the
other naming rules that packager applies?

When I built a package with only headers in it, packager created
a development core package which was marked as CORE. I don’t
know how you managed to get two packages marked as
COMPONENT. Starting from scratch should shed some light on
that problem.

Why is that? Isn’t 100% of the information being used by the packager
contained in the .qpm I sent you? Starting from scratch might get me
to a different place, but it won’t explain what happened, and I
figured at least part of the purpose here was to find bugs and address
shortcomings in the EXPERIMENTAL packager.

We have no plans at the moment to list files in any format
other than the manifest.

It was just a suggestion. It would improve usability in my case.

The package installer doesn’t show packages which have no
‘core’ package, so the ‘upgrade’ packages are never shown.
When you force it with a -u option, then all packages are
installed, regardless of their type.

I’ll try again to see if I can reproduce the steps that led me to this
disenfranchised package. Nevertheless, it seems like it should be
possible to figure this out at your end, as you have all the
information. I’ll just be shooting bullets into a black box. You’ve
got source.

Cheers,
Andrew

Previously, Jerry Chappell wrote in qdn.public.qnxrtp.devtools:

By the way, this discussion should be in qdn.public.qnxrtp.porting
Can you post in that newsgroup?

I should be able to post there. I can see it. If you could, please
move the entire thread over to qdn.public.qnxrtp.porting, as it is
useful to be able to look back through a thread.

I chose qdn.public.qnxrtp.devtools because whoever put together the
original “packager” package placed it in
QNX Realtime Platform/Software Development/Build Tools/Packaging
which made me think discussions should go in the development tools
newsgroup.

Cheers,
Andrew

Here’s the theory of it all:

A package is set up with Build 1, Release 1. Each time you repackage it,
perhaps changing the manifest, etc. You would increment the release
number. Each time you rebuild the source, and repackage it, you would
increment the build number, and (it will automatically) reset the release
number to 1.

HOWEVER, there is a BUG in Package Installer which causes it to ignore
the Build number entirely. Thus when the release is set to 1, package
installer thinks “hey, that release is already installed!”. This bug will be
fixed. Until then, I wanted the packager to do what is CORRECT. So it
resets the release to 1 whenever the build changes. In order for this
to work with the current version of package installer, you must increment
the release number each time.

The reason I’m asking you to start over is that I simulated the steps
that you told me, and it all WORKED FINE at my side. So because you
have edited your QPM files since packager had a go at it, I’d like to see
what packager pumps out, fresh. Then at least I’d know whether it’s
packager which is messing up your package, or something to do with
the editing you have done.

Yes, I have seen your QPM file and it is corrupted. No doubt. I just
can’t figure out how it became corrupted.

You’re correct that the packager looks at each file and determines what
type of file it is (using ELF headers). Executables are placed into a
package specific to that processor, targeted files are placed in other
packages, and headers are placed into the core development package.
Packager automatically appends -dev onto the package name so that
it does not conflict with the package name of a non-development package
which could (potentially) be created in parallel with a development
package.

As to using a licence file, here’s what I suggest: when you use packager
to put a license into your package, it will create a directory:
Bla-1.1-vendor.repdata/
which will contain:
LicenseUrl/license.txt
And it will change the manifest to use:
rep://Bla-1.1-vendor.repdata/LicenseUrl/license.txt
So I suggest you let this happen, the first time. Generate a QPR which
contains this directory and your license file. Decompress the QPR, and
put the .repdata directory into your repository. Then you don’t have to
change anything. From that point on, if you build QPK/QPM, it will still
point to your repository which contains that directory. And to make a
QPR, just zip up the QPK/QPM, and the directory.

The filename which is generated is taken from this:

ProductIdentifier
-dev (if it’s a development package)
_TargetProcessor
-UpgradeFromVersion_to_ReleaseVersion (if it’s an upgrade)
-UpgradeFromVersion-patch (if UpgradeFromVersion=ReleaseVersion)
-ReleaseVersion (if it’s not an upgrade)
-bldReleaseBuild
-bldUpgradeFromBuild (it it’s an upgrade)
-Processor
-VendorInstallName
-OperatingSystem
-src (if it’s a source package)

Jerry Chappell

Previously, Jerry Chappell wrote in qdn.public.qnxrtp.devtools:

Here’s the theory of it all:

A package is set up with Build 1, Release 1. Each time you repackage it,
perhaps changing the manifest, etc. You would increment the release
number. Each time you rebuild the source, and repackage it, you would
increment the build number, and (it will automatically) reset the release
number to 1.

HOWEVER, there is a BUG in Package Installer which causes it to ignore
the Build number entirely. Thus when the release is set to 1, package
installer thinks “hey, that release is already installed!”. This bug will be
fixed. Until then, I wanted the packager to do what is CORRECT. So it
resets the release to 1 whenever the build changes. In order for this
to work with the current version of package installer, you must increment
the release number each time.

Thanks. That makes more sense. The critical missing piece of
information here was that the behaviour of the package installer is
buggy. This is the first time that anybody has presented its
behaviour as anything but correct.

The reason I’m asking you to start over is that I simulated the steps
that you told me, and it all WORKED FINE at my side. So because you
have edited your QPM files since packager had a go at it, I’d like to see
what packager pumps out, fresh. Then at least I’d know whether it’s
packager which is messing up your package, or something to do with
the editing you have done.

I’ll give it a go.

Yes, I have seen your QPM file and it is corrupted. No doubt. I just
can’t figure out how it became corrupted.

Can you tell me what is corrupted?

You’re correct that the packager looks at each file and determines what
type of file it is (using ELF headers). Executables are placed into

Does it also look at extensions? .a files have no ELF header, and nor
do .h files. Packager does seem to separate these. If so, what are
its extension rules? What would it do with a file with a .g
extension, for example? Will we be able to customize these rules (I
doubt you can foresee all possible extensions)?

Packager automatically appends -dev onto the package name so that
it does not conflict with the package name of a non-development package
which could (potentially) be created in parallel with a development
package.

How does it determine what is a development package? It doesn’t
appear to be either via name or via ELF header. Does it make
associations with topics?

As to using a licence file, here’s what I suggest: when you use packager
to put a license into your package, it will create a directory:
Bla-1.1-vendor.repdata/
which will contain:
LicenseUrl/license.txt
And it will change the manifest to use:
rep://Bla-1.1-vendor.repdata/LicenseUrl/license.txt
So I suggest you let this happen, the first time. Generate a QPR which
contains this directory and your license file. Decompress the QPR, and
put the .repdata directory into your repository. Then you don’t have to
change anything. From that point on, if you build QPK/QPM, it will still
point to your repository which contains that directory. And to make a
QPR, just zip up the QPK/QPM, and the directory.

There is still a problem: the repdata exists on the repository, which
is on a computer hosted in space by an ISP. The rest is local to my
working machine. Now, true, I can FTP the repdata back to my local
machine, modify it, and FTP it back when I need to change it (or
maintain the repdata, a supposedly auto-generated hidden directory, as
a separate project), and yes I can FTP it to my local machine when I
want to create a .QPR, but the automatability (is this a word?) of
this process seems quite low. The makefile snippet involving “sed”
that I posted earlier is actually more automatic, it’s just Wrong to
script-edit the manifest.

The filename which is generated is taken from this:

ProductIdentifier
-dev (if it’s a development package)

How is this determined?

_TargetProcessor

OR, -TargetProcessor if not -dev, by observation (note the dash
rather than the underscore).

-UpgradeFromVersion_to_ReleaseVersion (if it’s an upgrade)
-UpgradeFromVersion-patch (if UpgradeFromVersion=ReleaseVersion)
-ReleaseVersion (if it’s not an upgrade)
-bldReleaseBuild

if ReleaseBuild != 1?

-bldUpgradeFromBuild (it it’s an upgrade)
-Processor

Sometimes. Presumably only for processor-specific packages,
determined how?

-VendorInstallName
-OperatingSystem

Under what circumstances? None of my packages have OperatingSystem in
their names.

-src (if it’s a source package)

How is this determined?

Thanks,
Andrew

Previously, Jerry Chappell wrote in qdn.public.qnxrtp.devtools:

The corruption is in the fact that both packages are marked as
components, and not core.

The part that I don’t understand, though, is that the .qpm file
contains all of the information that packager receives on subsequent
builds. This means that I should be able to edit the .qpm file,
change the “component” to “core”, and then run packager -m with that
…qpm file. If my original .qpm was corrupted (by me, the packager, or
cosmic radiation), then editing it should fix the corruption.
However, if I actually do this, the packager re-marks the package as
“component”. I am helpless in trying to convince the packager that
this package is “core”. So I submit that this is not corruption of
the .qpm (which can be hand-modified to any non-corrupt state), but
behaviour, right or wrong, of the packager. I cannot help you debug
this beyond offering test cases.

‘dev’ is a predefined package type. It cannot be changed.

I understand that. But I never asked for a dev package. What is
causing the packager to force that designation upon me?

TargetProcessor is always shown in the filename with an under-
score, not a dash.

I have the following packages, all automatically named by packager:

CogentAPI-2.0-bld2-Cogent.qpm
CogentAPI-2.0-bld3-Cogent.qpr
CogentAPI-dev-2.0-bld3-Cogent.qpm
CogentAPI-dev_x86-2.0-bld3-Cogent.qpm
Gamma-3.0-bld2-Cogent.qpm
Gamma-3.0-bld3-Cogent.qpm
Gamma-3.0-bld3-x86-Cogent.qpm
Gamma-3.0-bld3-x86-Cogent.qpr

If the -x86 is not intended in the Gamma packages, then this is a
packager bug.

I know you’ll probably ask a bunch of questions now about QPG
files. Please try to give me at least a week to iron out the rest
of the bugs. I’ll try to write a Developer Article about using QPG
files to package software.

I hear the implicit sigh there. :slight_smile: I’m really not trying to make your
life miserable. I know that the packager is experimental, and may
change completely before release. You folks gave it to us folks so we
could put it through the meat grinder. I’m really just trying to
offer feedback and usage cases (and incidentally, create some useful
packages). I have no strong expectations or demands of the packager
right now, but I would like to see it develop into a useful tool. I’m
asking a lot of questions, and pressing for answers, because a tool
isn’t useful if the developer cannot explain what it does and the
user cannot grasp its functional model.

Cheers,
Andrew

The corruption is in the fact that both packages are marked as
components, and not core.

In determining what file is what, there is some extension analysis
as well (I believe). If you have files that you would like to force
into a particular package, there is a procedure–and it has to do
with QPG files. This section is still in development so it has not
been fully documented yet.

‘dev’ is a predefined package type. It cannot be changed.

TargetProcessor is always shown in the filename with an under-
score, not a dash.

OperatingSystem is not often used. Its use is currently not
required because most of what we’re doing is for NTO only.

Source package (-src) is currently not used.

I know you’ll probably ask a bunch of questions now about QPG
files. Please try to give me at least a week to iron out the rest
of the bugs. I’ll try to write a Developer Article about using QPG
files to package software.

Jerry Chappell

Andrew Thomas <Andrew@cogent.ca> wrote:

The part that I don’t understand, though, is that the .qpm file
contains all of the information that packager receives on subsequent
builds. This means that I should be able to edit the .qpm file,
change the “component” to “core”, and then run packager -m with that
.qpm file. If my original .qpm was corrupted (by me, the packager, or
cosmic radiation), then editing it should fix the corruption.

Okay, now I see what you mean. And the answer is that no, just changing
your previous package does not indicate that packager will use those
settings in a new package. There are a number of tags which it will
always calculate automatically, internally. It marks the core packages
as core, and the component packages as component, according to how
it sorted the files. You cannot change that with an old manifest.

However, if I actually do this, the packager re-marks the package as
“component”. I am helpless in trying to convince the packager that
this package is “core”. So I submit that this is not corruption of
the .qpm (which can be hand-modified to any non-corrupt state), but
behaviour, right or wrong, of the packager. I cannot help you debug
this beyond offering test cases.

Are you saying that after starting from SCRATCH, packager always gives
you two component packages?

I understand that. But I never asked for a dev package. What is
causing the packager to force that designation upon me?

Development package is used when packager finds file(s) which are
headers, files targeting other platforms, etc. It’s automatic.

TargetProcessor is always shown in the filename with an under-
score, not a dash.

I have the following packages, all automatically named by packager:

CogentAPI-2.0-bld2-Cogent.qpm
CogentAPI-2.0-bld3-Cogent.qpr
CogentAPI-dev-2.0-bld3-Cogent.qpm
CogentAPI-dev_x86-2.0-bld3-Cogent.qpm
Gamma-3.0-bld2-Cogent.qpm
Gamma-3.0-bld3-Cogent.qpm
Gamma-3.0-bld3-x86-Cogent.qpm
Gamma-3.0-bld3-x86-Cogent.qpr

If the -x86 is not intended in the Gamma packages, then this is a
packager bug.

You have to get the concept of HOST (-x86) versus TARGET (_x86)
in your mind. The packages listed mostly are meant to RUN (host)
on an x86 machine. One of them, the CogentAPI-dev_x86 package,
is processor-independent files, which are designed to be built for
(target) an x86 machine.

I hear the implicit sigh there. > :slight_smile: > I’m really not trying to make your
life miserable. I know that the packager is experimental, and may
change completely before release. You folks gave it to us folks so we
could put it through the meat grinder. I’m really just trying to
offer feedback and usage cases (and incidentally, create some useful
packages). I have no strong expectations or demands of the packager

Good to hear. Here’s something to whet your appetite:

QPG files are config files for a person building packages
locally. They list all files that are to be packaged, so that you don’t
have to put them into the correct directory structure before running
packager. The QPG file also lists where to install each file, what tags
to use in the manifest (thus bypassing questions each time), which
package to place it into, and has functionality to do patching from one
release to the next.

Jerry Chappell

Andrew, thank you for that post. Now I not only understand your problem, I
have fixed the offending section of packager which did indeed put the wrong
identifier on your packages. The problem was that we’ve never dealt with
packaging into development packages only–there’s usually a runtime
component as well. This has now been fixed.

Step 1: Go to staff.qnx.com/~jchappell and download/install the newest
packager program.

Step 2: Uncompress the attached .tgz into an empty directory. This includes
all your source files, your license, a script which represents the one you
want to execute, and a package.qpg file, which has been set up to build
your package AUTOMATICALLY!!!

Step 3: Copy your CogentAPI-4.0-Cogent.qpr file into the same directory.

Step 4: With all these files in the directory structure given in the
archive, just type ‘packager’ in that directory.

Packager will look for a package.qpg file by default. This file tells
packager where the source files are on your drive (they need not be at the
locations I have specified, and they need not be in a directory structure
representing your filesystem).

I set it up to increment the Release number each time it is run, so that
package installer will recognize the new version as an upgrade. Simply
update your source files and type ‘packager’ again to make a new package.

Let me know if you have problems. Email directly if you like: j c h a p p e
l l @ q n x . c o m

Jerry Chappell