by March 28, 2001 0 comments

Installing applications in QNX is easier and more trouble-free than in Windows (as we shall shortly see). In Windows, you need to run installers to install a new application and hope that the installation doesn’t mess up your computer (especially if the system requires a reboot). In Linux, on the other hand, installable applications come in the form of RPMs, TARs, GZs, etc. For many users, especially novices, it’s difficult to extract these files and place them where they belong. 

QNX also uses TAR and GZ files that are used in Linux, but makes their installation simpler by using Package Manager and Repositories. 

What are Packages?

A package is a single file containing a directory tree of files, which is laid out in a structure that matches the desired layout of those files if they were to be transposed to the root of a filesystem. Confused? Simply stated, files inside a package are arranged in such a manner that when installed, they go to the right places.

In addition to the files and file structure, packages store a lot of other information like name, version and release date, author, dependent software if any, compatibility with other software, etc. This information is stored in a text file and encoded in XML for software that you can retrieve from the Internet and install. This data is not an integral part of the software. Instead, it’s stored in a separate external data descriptor file called the ‘Manifest’. So, the user just needs to look at this file (which has a QPM extension) to find out the package details. The software itself is in a file with the extension QPK. If you want to install software from a CD, you can use the Package Manager by adding the CD’s path (explained a little later).

What are Repositories?

From the point of view of the package filesystem, a repository is a place where QNX looks for the files that you install. QNX RTP by default comes with two repositories: /pkgs/base/ and /pkgs/repository/. While the former contains packages that are part of the QNX RTP distribution, the latter contains external packages. The location of the latter is a default location, and you can always mount another repository by specifying the mount point, which can be anywhere on your hard disk, or even a location on a network.

When the collection of packages and their external manifests is put into any directory, website or FTP site, it gives rise to what’s called an ‘Archive Repository’. This also has a repository descriptor file called the repository manifest (repository.qrm). With this file, the Package Installer can look for updates and new packages. To make package maintenance easier, the repository also contains a list of packages in a simple text file called the Index. These files can reside on any standard filesystem and are still accessible by the package

The QNX Package Manager

The QNX RTP distribution comes with the Package Manager that makes it simple to manage your software. When you run the Package Manager, you’re presented with the option of either installing new packages or viewing your installed software. You don’t have to worry about installing the same software twice because the Package Manager determines the names and versions of the software already installed and when you connect to a repository, it will show up only newer software. It does this by reading the LastUpdate and PackageCount tags from a user’s machine.

To connect and install software from repositories, click on ‘Add Repository’ and mention the repository path, whether local or remote. Then, click on ‘Connect’ and you’re connected to the repository. The information contained in the manifest is retrieved and a list of available software is shown. You can now select the packages you want to install, and click on ‘Install’. You could do a full install or a minimal install. The Package Manager downloads the selected software and puts the files in the appropriate directories. It also runs pre- or post-installation scripts if any.

Whenever you connect to a repository on the Internet, it is advisable to keep a copy of the packages you install locally. This way, you can reinstall anything if need be. Just check the ‘Save a copy of the packages’ checkbox and specify a local backup location. This prompt comes up after you click on the ‘Install’ button.

QNX also comes up with another way of installing software, which is suitable for single-click downloads. Such installable files can be put up on websites and be given hyperlinks that will install them. This is done through what’s called the Package Repository File. This is nothing but the whole repository, TAR’ed and GZIP’ed, and kept as a file with a QPR extension. So, if a user working on QNX clicks on such a hyperlink, the Web browser launches the Package Installer automatically to install the packages. Alternatively, a user can download the QPR, extract it into a local directory and then point the Package Manager to it. The extracted contents are QPM, QPK, and index files. 

Ashish Sharma

No Comments so far

Jump into a conversation

No Comments Yet!

You can be the one to start a conversation.