Using packager

bridged with qdn.public.qnxrtp.porting
mitchell

Using packager

Post by mitchell » Fri Jun 15, 2001 2:50 am

I recently tried to use the packager. I created a
directory with a directory structure and a link from
usr/bin to the program I wanted in the package.

I answered all the questions, and in the end I got this
error message:

=======================================================
Sorting files into the required packages...
Error: Files exist within "/tmp/pkgrAAA986026".
Clear the contents of this directory [Y/N]? y

Error sorting files (component entry already exists)
(note: temporary directory has been created) /tmp/pkgrAAA986026
Clearing documents from memory...OK

Error during generation. Packages not generated.
=======================================================

I repeated this twice answering the final question
both yes and no with the same answer. Can you give
me a clue as to what I'm doing wrong?

Thanks,

Mitchell



Mitchell Schoenbrun - maschoen@pobox.com
Micro Business Applications - http://www.schoenbrun.com/mba

Mitchell Schoenbrun

Re: Using packager

Post by Mitchell Schoenbrun » Fri Jun 15, 2001 9:25 am

Previously, mitchell wrote in qdn.public.qnxrtp.porting:

In a second attempt I tried to use the packager to
create a package out of the source code for the same
program. This time I used the -a and -f options.
The results were better. I was able to go through
the entire procedure creating the package files.

When complete I used the package installer to first
create a repository of the directory where the
packager program put the created files. I then
was able to start an installation on my package.

In the "Expanding the Archives" windows I almost
immediately got the error:

"Error archive format"

This is a little befuddling. Anything I'm missing?

Thanks,

Mitchell

Mitchell Schoenbrun --------- maschoen@pobox.com

Jerry Chappell

Re: Using packager

Post by Jerry Chappell » Fri Jun 15, 2001 11:48 am

mitchell <maschoen@pobox.com> wrote:
I recently tried to use the packager. I created a
directory with a directory structure and a link from
usr/bin to the program I wanted in the package.
Firstly, you should copy the file into your directory, so that
it appears in a subdirectory representing the directory you
would like it to finally appear within.

basedir/
basedir/opt
basedir/opt/bin
basedir/opt/bin/myprogram

Can you tell me what options you passed to packager?
I recommend:

packager basedir

Let me know what happens.

Jerry Chappell
Photon Application Developer
QNX Software Systems Ltd.
jchappell@qnx.com

Jerry Chappell

Re: Using packager

Post by Jerry Chappell » Fri Jun 15, 2001 11:53 am

Mitchell Schoenbrun <maschoen@pobox.com> wrote:
When complete I used the package installer to first
create a repository of the directory where the
packager program put the created files. I then
was able to start an installation on my package.
To put your packages into a repository, use the -k option
to packager to create QPK/QPM files instead of QPR files.
Put these files into a directory you want to become a
repository. Then move into that directory and type:

packager -r

This will ask you a set of questions to create a repository
in that location. Any time you update that directory to
hold more packages, or if the packages changes, type:

packager -ruv2

Otherwise, you can create a QPR like you did before,
and pass it to pkg-installer with the -u option:

pkg-installer -u my-package-name.qpr

Jerry Chappell
jchappell@qnx.com

Mitchell Schoenbrun

Re: Using packager

Post by Mitchell Schoenbrun » Fri Jun 15, 2001 8:45 pm

Previously, Jerry Chappell wrote in qdn.public.qnxrtp.porting:
mitchell <maschoen@pobox.com> wrote:
I recently tried to use the packager. I created a
directory with a directory structure and a link from
usr/bin to the program I wanted in the package.

Firstly, you should copy the file into your directory, so that
it appears in a subdirectory representing the directory you
would like it to finally appear within.

basedir/
basedir/opt
basedir/opt/bin
basedir/opt/bin/myprogram
I did this, as follows

basedir/
basedir/usr
basedir/usr/bin
basedir/usr/bin/myprogram

Could the problem be related to having only one file? I noticed
that there was a sort step, which is just before the error.
Can you tell me what options you passed to packager?
I recommend:

packager basedir
In my first attempt, the one file package I used no options.

Mitchell Schoenbrun --------- maschoen@pobox.com

Mitchell Schoenbrun

Re: Using packager

Post by Mitchell Schoenbrun » Fri Jun 15, 2001 8:47 pm

Previously, Jerry Chappell wrote in qdn.public.qnxrtp.porting:
To put your packages into a repository, use the -k option
to packager to create QPK/QPM files instead of QPR files.
Put these files into a directory you want to become a
repository. Then move into that directory and type:

packager -r
There is no -r option to my version of the packager.
I'm guessing you are now going to tell me where to get
an update?

Mitchell Schoenbrun --------- maschoen@pobox.com

Mitchell Schoenbrun

Re: Using packager

Post by Mitchell Schoenbrun » Sat Jun 16, 2001 1:51 am

Previously, Mitchell Schoenbrun wrote in qdn.public.qnxrtp.porting:
There is no -r option to my version of the packager.
I'm guessing you are now going to tell me where to get
an update?
I did a little more work on these problems. First I
discovered that I was right about the program barfing when
there is only a single file to be put in the package.
Putting in a 2nd dummy file gets me past this problem.

I downloaded two versions from your staff sight, and neither
have the mystery -r option. I'm still able to get the
package manager to recognize my test repository by simply
creating a file "index" as a listing of the files.

The package manager still attempts to install my package,
but fails with the error stated before.

Thanks for any assistance that you can provide.

Mitchell Schoenbrun --------- maschoen@pobox.com

Jerry Chappell

Re: Using packager

Post by Jerry Chappell » Mon Jun 18, 2001 12:25 pm

Mitchell Schoenbrun <maschoen@pobox.com> wrote:
Could the problem be related to having only one file? I noticed
that there was a sort step, which is just before the error.
One file only works fine, but you have to make sure it is a FILE,
not a SYMLINK. You must _copy_ the file into the basedir
structure.

"Can you tell me what options you passed to packager?"

You can get the newer packager at:
ftp://staff.qnx.com/~jchappell/packager ... patchC.qpr
(works on PatchA/B/C).

Jerry Chappell

Mitchell Schoenbrun

Re: Using packager

Post by Mitchell Schoenbrun » Mon Jun 18, 2001 7:28 pm

Previously, Jerry Chappell wrote in qdn.public.qnxrtp.porting:
One file only works fine, but you have to make sure it is a FILE,
not a SYMLINK. You must _copy_ the file into the basedir
structure.
The first time I tried this I used a symlink and it failed. I then
copied the file in and tried again. That time if failed again.
I think this was with an earlier version. Since then I've installed
the version below, and it works ok with one file.
"Can you tell me what options you passed to packager?"
-a and -f dir
You can get the newer packager at:
ftp://staff.qnx.com/~jchappell/packager ... patchC.qpr
I went to this site and tried to install. I was told that it is
already installed. I presume that I installed before from one
of the links at your site.

This version still does not show a -r in the "use" and
responds to "packager -r" by showing the use message.


Mitchell Schoenbrun --------- maschoen@pobox.com

Jerry Chappell

Re: Using packager

Post by Jerry Chappell » Tue Jun 19, 2001 12:09 pm

Mitchell Schoenbrun <maschoen@pobox.com> wrote:
ftp://staff.qnx.com/~jchappell/packager ... patchC.qpr
I went to this site and tried to install. I was told that it is
already installed. I presume that I installed before from one
of the links at your site.
The Package-Installer you have does not like the fact
that ReleaseNumber changes in packager and
BuildNumber does not. Until 6.1 is released, you
will have to uninstall your old packager, and then
install the new one.
This version still does not show a -r in the "use" and
responds to "packager -r" by showing the use message.
Until you can get the -r option, you still have an old
version of packager. You mentioned that packager
now works ok with one file; what problems are you
left with?

Jerry Chappell

Mitchell Schoenbrun

Re: Using packager

Post by Mitchell Schoenbrun » Tue Jun 19, 2001 7:23 pm

Previously, Jerry Chappell wrote in qdn.public.qnxrtp.porting:
The Package-Installer you have does not like the fact
that ReleaseNumber changes in packager and
BuildNumber does not. Until 6.1 is released, you
will have to uninstall your old packager, and then
install the new one.
Ok, I'm past this problem and I now have a version of
packager which takes a '-r' option.
You mentioned that packager now works ok with one file;
I can run it to completion, but read on.
what problems are you left with?
I'm left with one I mentioned I while ago. I'll
describe my entire process.

1) Create directory "pgm_dir" with executable in it

2) Run "packager -a -f packages pgm_dir"
This runs to completion.

3) I cd to my "packages" directory and run "packager -r"

All this looks good so far.

4) I run the package manager. I've setup the "packager"
directory as a repository. I'm able to start the download/install
process on my product. Then everythings stops. The package
manager has a small window on the screen that looks like this:


PACKAGE MANAGER


Expanding the Archives ...

_____________________________________
| |
| XXXXXXXXXXXXXXXX |
_____________________________________


An error occured while expanding:
/pgks/repository/pcalc-1.0-mba-qpk (tar exit code=2)


--------
| Cancel |
--------


Mitchell Schoenbrun --------- maschoen@pobox.com

Mitchell Schoenbrun

Re: Using packager

Post by Mitchell Schoenbrun » Tue Jun 19, 2001 7:37 pm

I have some more to add. The directory in which I create my
test repository has no .qpk files. There is some drek left
over in /pkgs/repository. It lists two .qpk files which
both are just short HTML files indicating that no .qpk
file was found in the test repository.

So maybe I should be asking, why weren't .qpk files created?
I'll play around some more.

Mitchell Schoenbrun --------- maschoen@pobox.com

Mitchell Schoenbrun

Re: Using packager

Post by Mitchell Schoenbrun » Tue Jun 19, 2001 7:50 pm

Previously, Mitchell Schoenbrun wrote in qdn.public.qnxrtp.porting:
So maybe I should be asking, why weren't .qpk files created?
I'll play around some more.
Maybe this will be useful. I start "packager" as follows:

# packager -f packages pcalc_package


Here are the last few lines of the session.
Note that "packager" indicates that the
files:
pcalc-1.0-mba.qpk
pcalc-1.0-x86-mba.qpk
pcalc-1.0-x86-mba.qpr

Will be created, however they are not put
in my directory "packages".


------Photon Launch Menu------

How many LAUNCH menu items for "pcalc"? (0) 1

(1) Launch menu label? (ENTER=no more launch items)

Saving "pcalc" MANIFEST...OK

------pcalc-host_x86------

Saving "pcalc-host_x86" MANIFEST...OK

------Generation------

Individual packages:
Generating QPK (pcalc-1.0-mba.qpk)
Generating QPK (pcalc-1.0-x86-mba.qpk)

Combined repositories for each processor:
Generating QPR (pcalc-1.0-x86-mba.qpr)

------Completion------

Clearing documents from memory...OK

Successful generation.

# ls packages
.. pcalc-1.0-x86-mba.qpr
...


Mitchell Schoenbrun --------- maschoen@pobox.com

Mitchell Schoenbrun

Re: Using packager

Post by Mitchell Schoenbrun » Tue Jun 19, 2001 8:47 pm

Previously, Mitchell Schoenbrun wrote in qdn.public.qnxrtp.porting:
Will be created, however they are not put
in my directory "packages".
To be a little more clear, they are not all created.
The one file that is created is put in the "packages"
directory.


Mitchell Schoenbrun --------- maschoen@pobox.com

Jerry Chappell

Re: Using packager

Post by Jerry Chappell » Fri Jun 22, 2001 1:09 pm

Mitchell Schoenbrun <maschoen@pobox.com> wrote:
Will be created, however they are not put
in my directory "packages".
You're so close....here's the solution.

Packager creates a QPR file by default. If you want to create
a repository, you want QPK/QPM files. Use the -k option to
have packager do this. An alternative is to take your QPR and
do:
tar -zxf my_package.qpr

This will uncompress the QPR (it's just a .tar.gz) into the QPK/
QPM pair of files.

Here's the other solution:
When you have a QPR file, you can pass it directly to
Package Installer with a -u option:
pkg-installer -u my_package.qpr

You could even post your QPR on a web site, so people can
download it without connecting to a repository.

So any of those solutions will solve your problem.

I'm glad it's working for you now.

Jerry Chappell

Post Reply

Return to “qdn.public.qnxrtp.porting”