Maemo.org Infrastructure/docs/scripts/VM repo/package-remove.php

shawnjefferson (Talk | contribs)
(Created page with "== Basic Mechanics of the script: == ''Usage: php package-remove.php fremantle extras-devel packagename version'' 1. Connects to midgard to determine if the repository exists…")
Newer edit →

Revision as of 04:14, 29 July 2013

Basic Mechanics of the script:

Usage: php package-remove.php fremantle extras-devel packagename version


1. Connects to midgard to determine if the repository exists, if not found in midgard, the scripts dies with "No repository found."

2. Queries midgard for the package information.

3. Parses the Packages file to find the package and the version passed in on the command line. Source, Maintainer and Filename are parsed for the package matched. If the package and version is not found, the script dies with "File not found, not removing anything." This is slightly misleading, as the script hasn't attempted to look for the file yet, it's just parsing the Packages file.

4. The script then deletes the package from the filesystem location extracted in step 3 above. If the arguments passed in were "fremantle" and "extras", the script also tries to delete from "fremantle-1.2" and "fremantle-1.3". Note that the script doesn't do any special handling for extras-devel fremantle-1.3 directory.

5. If the third argument was passed, some additional handling of fremantle extras and extras-testing is done for free and non-free by calling the queue-manager script.


Problems:

- the script doesn't delete from extras-devel fremantle-1.3 - Packages seem to exist in extras-devel fremantle-1.3 that don't exist in fremantle (Packages file is different between the two-this may be due to the fact that removing a package from extras-devel removes it only from fremantle and not fremantle-1.3 as well.)