A Perl tool for querying distribution repositories

Analysis Machine

Article from Issue 149/2013

A Perl script calls various plugins that sniff around on FTP and HTTP servers run by the major Linux distributions to discover when Fedora, Debian, and other distros update their packages.

The software in this Perl column is, to some extent, commissioned work: The editors of the German edition, Linux-Magazin, needed a tool that would crawl the update servers of major Linux distributions to find release dates for a cover story. Because Perl has a reputation of being good at complex queries and string manipulation, this article is totally devoted to a tool that supports that topic. The objective was a script that accepts a query passed in at the command line, searches different targets, filters out matching package names, collects the dates, and finally outputs a table with the results.

The difficulty is that Linux distributions offer their release information in different formats. For example, packages for Ubuntu and Debian reside on an FTP server – not all in one directory, but split up into subdirectories whose names consist of the first letter of the package name (Figure 1).

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Perl: Log Chat Sessions

    The IRC (Internet Relay Chat) protocol lets you program bots as automatic helpers. In this month's column, we let a bot log a session and store the results in a database.

  • Perl: A Gaim Plugin

    The Gaim project offers an instant messenger client that speaks a large number of protocols. We’ll show you how to extend Gaim with Perl plugins.

  • Perl: Elasticsearch

    The Elasticsearch full-text search engine quickly finds expressions even in huge text collections. With a few tricks, you can even locate photos that have been shot in the vicinity of a reference image.

  • Gimp Scripting

    Many users turn to GIMP for pictures in the window, but some may not realize GIMP also has scripting capabilities that allow you to automate recurring tasks. The Python scripting language is a useful alternative to the GIMP’s integrated Lisp dialect.

  • Perl: Tricks with Vim

    The Vim editor has any number of tricks for helping you avoid unnecessary typing. In this month’s article, we look at some effort-saving Vim techniques for Perl hackers.

comments powered by Disqus

Direct Download

Read full article as PDF:

Price $2.95


njobs Europe
Njobs Netherlands Njobs Deutschland Njobs United Kingdom Njobs Italia Njobs France Njobs Espana Njobs Poland
Njobs Austria Njobs Denmark Njobs Belgium Njobs Czech Republic Njobs Mexico Njobs India Njobs Colombia