www.ScienceOfAtomics.com/linux
PC Linux OS
A robust and popular distro

•  HOME  •  THEORY  •  PRACTICE  •    •  LOGIN  •  FORUM  •  CONTACT  • 

Setting up Synaptic to use the PCLOS 2009 KDE Static Repository

The PCLOS website maintains a static repository for those wanting to continue using KDE 3.5. This repository is no longer being upgraded (i.e. it is a "static repository"), but can continue being used indefinitely by those satisfied with its status. Here are instructions for using it:

  1. In Synaptic, open the Settings > Repositories dialog.
  2. Disable all repositories (no ticks in the Enable column).
  3. Click New to generate a new entry.
  4. Add the following settings:
    1. Type: rpm
    2. URI: http://kde3.pclosusers.com/pclosfiles
    3. Distribution: pclinuxos/2007
    4. Section(s): main extra nonfree kde
  5. Check that the box in the Enable column is ticked to enable the new entry and close the dialog
  6. Click the Reload button to download the packages lists.
  7. Click Mark All Upgrades and confirm that they should be marked.
  8. Click Apply and confirm that the required packages should be downloaded and installed.

The package list that downloads is the permanent (static) list for future use. Mark All Upgrades can only be executed once to upgrade packages already installed. Additional apps from the repository can be downloaded and installed from that point on, but not upgraded unless you know how to resolve dependencies or compile from source. Apps not in the repository can be only be installed similarly, by resolving dependencies or compiling from source.

Keeping package lists and files after upgrading

If multiple instances of the static installation are required (either on other machines or as re-installs over time), there is no need to repeatedly download the same files. By changing the appropriate settings in Synaptic and saving the files to a permanent location, they can be re-used if Synaptic is set up appropriately.

Here is how to ensure that the downloaded files are not deleted after installation. Before upgrading the existing installation or installing new packages:

  1. Open the Settings > Preferences dialog and select the Files tab.
  2. Click the Leave all downloaded packages in the cache option and close the dialog.
  3. Click the Reload button to download the packages lists.
  4. Click Mark All Upgrades and confirm that they should be marked.
  5. Click Apply and confirm that the required packages should be downloaded and installed.
  6. Mark any other required packages for installation, click Apply and confirm to download and install them.
  7. Now confirm the contents of the following two directories:
    1. The package lists are in /var/lib/apt/lists/
    2. The package files are in /var/cache/apt/archives/

Creating an On-disk Repository

In order for Synaptic to find these files, they must be moved into a directory structure exactly the same as that used in the repository:

   .../PCLinuxOS/2009/..                  (Parent Directory)
                     /base/               (Directory containing package lists)
                     /RPMS.main/          (Directory containing main RPM package files)
                     /RPMS.extra/         (Directory containing extra RPM package files)
                     /RPMS.kde/           (Directory containing kde RPM package files)
                     /RPMS.nonfree/       (Directory containing nonfree RPM package files)

This seems quite straight-forward, but there is a small problem. The various RPM package files must be in the correct RPM directory, and ensuring this is time-consuming and error-prone. Fortunately, there is a simple solution. Instead of using subdirectories within the Parent Directory, store all of the RPM files in a single directory and use directory soft-links pointing to the single directory. (See below for an explanation of softlinks.) Synaptic won't know the difference!

   .../PCLinuxOS/2009/..                  (Parent Directory)
                     /lists/              (Directory containing package lists)
                     /archives/           (Directory containing all RPM package files)
                     /base/               (Softlink pointing to lists/)
                     /RPMS.main/          (Softlink pointing to archives/)
                     /RPMS.extra/         (Softlink pointing to archives/)
                     /RPMS.kde/           (Softlink pointing to archives/)
                     /RPMS.nonfree/       (Softlink pointing to archives/)

The reason for storing the package lists in a directory (lists) and using a softlink to it is that the softlink can easily be changed to point to a different repository, perhaps one stored on DVD.

All files from /var/cache/apt/archives/ should be copied to the archives/ directory, except for the /partial/ subdirectory and the lock file; and similarly with the package lists from /var/lib/apt/lists/

Setting up Synaptic to use a Hard Disk Repository

Now that we have our own repository on disk, it's a simple matter to point Synaptic to it. Let's assume that you are logged in as user and that the Parent Directory of your on-disk repository is named 2009 in the PCLOS directory of your Home Directory. The full path to the repository directories will therefore be:

   /home/user/PCLOS/2009/..                  (Parent Directory)
                        /lists/              (Directory containing package lists)
                        /archives/           (Directory containing all RPM package files)
                        /base/               (Softlink pointing to lists/)
                        /RPMS.main/          (Softlink pointing to archives/)
                        /RPMS.extra/         (Softlink pointing to archives/)
                        /RPMS.kde/           (Softlink pointing to archives/)
                        /RPMS.nonfree/       (Softlink pointing to archives/)
  1. In Synaptic, open the Settings > Repositories dialog.
  2. Disable all repositories (no ticks in the Enable column).
  3. Click New to generate a new entry.
  4. Add the following settings:
    1. Type: rpm
    2. URI: file:/home/user/PCLOS/
    3. Distribution: 2009
    4. Section(s): main extra nonfree kde
  5. Check that the box in the Enable column is ticked to enable the new entry and close the dialog
  6. Click the Reload button to download the packages lists.
  7. Click Mark All Upgrades and confirm that they should be marked.
  8. Click Apply and the required packages will be copied out of your ondisk repository and installed.

Setting up Synaptic to use a CD or DVD Repository

A similar procedure can be used if the files have been burnt to a CD or DVD. It is only necessary to ensure that the same directory structure is used. Assume that a CD named PCLOS_FILES has been burnt. When burning, a Linux-compatible format (Rock Ridge Extensions) must be used. If the files are stored in the 2009/lists/ and 2009/archives/ subdirectories on the CD, then softlinks pointing to these directories must also be included in the 2009/ directory. If the CD is mounted at /media/PCLOS_FILES/ then the synaptic entries must be

  1. Type: rpm
  2. URI: file:/media/PCLOS_FILES/
  3. Distribution: 2009
  4. Section(s): main extra nonfree kde

Explanation of softlinks

A symbolic link is a file that points to another file. In Windows it is called a shortcut and in MacOS an alias. It has a number of uses, perhaps the main one being to avoid duplication of files and directories. A single file can have a number of symbolic links in other directories, or even in the same directory if the links have different names. The same is true of directories.

There are two types of links, hard links and soft links. As a general rule, soft links should always be used unless you understand when and why to use a hard link. The syntax of the command is:

$> ln -s TARGET LINK_NAME

As an example, to create a softlink named RPMS.main pointing to a directory named archives the following command is entered:

$> ln -s archives RPMS.main

Note the -s option which specifies a softlink instead of a hardlink.