Welcome, Guest! Log In | Create Account

Fdupdate

From freedos

Jump to: navigation, search

Fdupdate is the FreeDOS Updater, a program that updates packages in a FreeDOS distribution.

Contents

Directory structure

In the following, "..." represents the hostname and directories leading up to the "distributions" directory. On the Ibiblio server, "..." is "www.ibiblio.org/pub/micro/pc-stuff/freedos/files/". Other mirror sites will have a different host name, and may have a different leading directory path.

The distribution of FreeDOS 1.0 was located on the ftp/web servers as ".../distributions/1.0" with a flat directory layout; the directory contained ISO files and a single "pkgs" directory that contains every ZIP and associated LSM for every package in the distro.

FreeDOS 1.1 will organize things slightly differently. Note that FreeDOS 1.1 will use a single package file that includes binary and source code. The Installer can choose to remove the source code after the install.

.../distributions/1.1/
the base directory for the FreeDOS 1.1 distro
.../distributions/1.1/pkgs/
every package and associated LSM for every package in the 1.1 distro
.../distributions/1.1/updates/
the base directory for any follow-on updates.
.../distributions/1.1/updates/pkgs/
base directory for package updates
.../distributions/1.1/updates/pkgs/base/
.../distributions/1.1/updates/pkgs/devel/
.../distributions/1.1/updates/pkgs/edit/
directories containing the updates for each disk set of the distro

File format and location

Today, we have the LSMs from (almost) every package stored on the www.freedos.org Web site, in a directory structure that mirrors the disk sets (base, devel, edit, ...). There's a simple CGI that displays the contents of the LSM files as web pages. This makes it fairly easy to keep the software list up-to-date. An author releases a new version of his/her software, and the Webmaster puts the updated LSM on the www.freedos.org web server. The data is instantly available to the CGI.

To better support Fdupdate in FreeDOS 1.1, the software list needs to generate web pages (for display) and XML files (for Fdupdate.) The software list will put an export of the data into an easily-read file format, perhaps nightly, showing the latest versions of each package (for example, updated since a particular date - the date of the FreeDOS 1.1 distribution.) For example, in .../distributions/1.1/updates/ (one file for each disk set) that lists the packages that have been updated since the release of the 1.1 distro, the versions of the updated packages, and where to find them.

The export file will be XML, and will have this document structure:

<pkglist>
	<pkginf>
		<title id="CHOICE" />
		<version id="5.1" />
		<entered id="2008-09-20" />
		<pkg id="choic51x.zip" />
	</pkginf>
</pkglist>

The fields are lifted directly from the LSM definition:

<pkglist>
</pkglist>
this contains the entire list of packages. There should be only one of these per file.
<pkginf>
</pkginf>
this contains the information that describes a single package. There may be any number of these per pkglist, or possibly zero if no updates are available.
title
the title or name of the package, as it would be displayed on the FreeDOS software list (i.e. "CHOICE", etc.)
version
the version of the package
entered
the Entered-date of the package (not necessarily the date the update was released, but the date it was entered or updated in the software list.)
pkg
the filename of the binary package for this update

The file would be named after the disk set for which there are updates. For example, the file that describes the latest updates for the 'base' disk set would be named .../distributions/1.1/updates/base.xml. For the 'edit' disk set, .../distributions/1.1/updates/edit.xml. For 'devel', .../distributions/1.1/updates/devel.xml. And so on.

It is possible to extend the above XML definition to allow for updates from all disk sets to appear in a single file. However, this could become quite large, and would contain a lot of data that would be of no value for users who did not choose to install everything.

Basic operation

Under FreeDOS 1.1, the Fdupdate program would operate as follows:

  1. For each disk set that has been installed on the system (this can be read from local files) Fdupdate will download the .../distributions/1.1/updates/__.xml file. For example, for the 'base' disk set, download .../distributions/1.1/updates/base.xml.
  2. Iterate through the file, and for every package that is named (that is also installed on the system ... this can be read from local files) where the version is newer and/or the entered date is newer (Mateusz to decide how to do the appropriate comparison) Fdupdate will download the pkg as indicated in <pkg id="__" /> from the disk set directory. For example, for CHOICE 5.1 from the 'base' disk set, download .../distributions/1.1/updates/pkgs/base/choic51x.zip.
  3. Repeat for each package in the XML file
  4. Repeat for each disk set, using the appropriate XML file name.

External links