This is a CGI application to provide package information using apt. Currently available at https://pkginfo.devuan.org/cgi-bin/policy-query.xml
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
Ralph Rönnquist 584656a234 gilding 6 days ago
css gilding 6 days ago
etc/apt added main/debian-installer source points 1 week ago
usr initial capture 2 months ago
var/lib/dpkg initial capture 2 months ago
.gitignore gilding and some rearrangements 1 month ago
README.adoc minor edit 1 month ago
debtree-query.sh spelling 1 month ago
file-query.sh spelling 1 month ago
package-query.sh spelling 1 month ago
policy-query.sh spelling 1 month ago
update.sh update for apt-file 1 month ago
whatsit.conf report packages for more architectures 1 month ago

README.adoc

tellpackage

This is a CGI application to provide package information using apt.

Currently available at https://pkginfo.devuan.org/cgi-bin/policy-query.xml


Description

The Web interface includes a "search box" for filling in an argument for an apt-cache policy run in an apt runtime context that includes all current Devuan source points. The result of that run is presented as given and including links for a package version detail lookup using apt-cache show.

The package detail view includes links to perform new pacakge-query lookups for related (dependent) packages, as well as for manually downloading the deb file concerned. There is also a button to trigger a debtree run for the (unversioned) package name to get the resulting diagram presented as an inline svg image.

Note that debtree is not strong in handling package versions and it simply shows a graph involving the "latest" of everything rather than a graph relating to the original (versioned) package view.

Thus, the CGI application runs three command lines:

  $ apt-cache policy "$QUERY"
  $ apt-cache show "$PACKAGE=$VERSION"
  $ debtree "$PACKAGE"

The command outputs are further filtered into bespoke XML 1.0 representations that become the bases for the views that browsers typically render by applying the nominated XSL 3.0 stylesheets.

In other words, a request handling flow is as follows:

  1. The request is first translated into its servicing script by means of a link from the interface name (e.g., package-query.xml) to the actual script (e.g., package-query.sh). As per the normal CGI 1.1 Specification the query string is given to the script via the environment variable QUERY_STRING.

  2. The servicing script runs the actual command with its argument provided as detail for the q parameter in the query string, and decorates the command output to make up an XML object tree that includes a stylesheet link for the applicable stylesheet (e.g. css/package-query.xsl).

  3. The browser upon receiving the XML file discovers the XSL association, and therefore loads and processes the associated XSL stylesheet. This transforms the bespoke XML into an HTML 4.01 document according to the XSL transformation rules. By design, the HTML document is a bare structure of plains element with bespoke identities and class assignments in support of a CSS 2.1 programming for layout particulars and looks.

  4. The browser upon processing the HTML document discovers the CSS associations and therefore loads and processes the associated CSS stylesheets.

  5. Eventually the browser will map the rendered result to the display for the user to view.


Installation

The scripts use a local apt environment which consists of a special purpose configuration file whatis.conf that in particular nominates a RootDir that is the root directory for the pathnames to other configuration files and working directories. Especially the etc/apt/sources.list.d/ directory that contains the lists files of source points for package collections.

The CGI application includes a background job (./update.sh) to keep the local configuration up to date with the source points. This is simply a regular apt-get update run in the local apt environment.


Last updated 2021-01-19 19:05:25 UTC