<% include( '/elements/header.html', 'Developer Documentation' ) %> <& /elements/menubar.html, 'Freeside Perl Modules' => $fsurl.'docs/library/FS.html', 'Complete Index' => $fsurl.'docs/library/index.html', &>

Devscripts::Uscan::WatchLine

NAME

Devscripts::Uscan::WatchLine - watch line object for uscan

DESCRIPTION

Uscan class to parse watchfiles.

MAIN METHODS

new() (Constructor)

Required parameters

shared: ref to hash containing line options shared between lines. See Devscripts::Uscan::WatchFile code to see required keys.
keyring: Devscripts::Uscan::Keyring object
config: Devscripts::Uscan::Config object
downloader: Devscripts::Uscan::Downloader object
line: search line (assembled in one line)
pkg: Debian package name
pkg_dir: Debian package source directory
pkg_version: Debian package version
watchfile: Current watchfile
watch_version: Version of current watchfile

process()

Launches all needed methods in this order: parse(), search(), get_upstream_url(), get_newfile_base(), cmp_versions(), download_file_and_sig(), mkorigtargz(), clean()

If one method returns a non 0 value, it stops and return this error code.

Steps

parse()

Parse the line and return 0 if nothing bad happen. It populates $self->parse_result accessor with a hash that contains the following keys:

base =item filepattern =item lastversion =item action =item site =item basedir =item mangled_lastversion =item pattern

search()

Search new file link and new version on the remote site using either:

Devscripts::Uscan::http::http_search() =item Devscripts::Uscan::ftp::ftp_search() =item Devscripts::Uscan::git::git_search()

It populates $self->search_result hash ref with the following keys:

newversion: URL/tag pointing to the file to be downloaded =item newfile: version number to be used for the downloaded file

get_upstream_url()

Transform newfile/newversion into upstream url using either:

Devscripts::Uscan::http::http_upstream_url() =item Devscripts::Uscan::ftp::ftp_upstream_url() =item Devscripts::Uscan::git::git_upstream_url()

Result is stored in $self->upstream_url accessor.

get_newfile_base()

Calculates the filename (filenamemangled) for downloaded file using either:

Devscripts::Uscan::http::http_newfile_base() =item Devscripts::Uscan::ftp::ftp_newfile_base() =item Devscripts::Uscan::git::git_newfile_base()

Result is stored in $self->newfile_base accessor.

cmp_versions()

Compare available and local versions.

download_file_and_sig()

Download file and, if available and needed, signature files.

mkorigtargz()

Call mk_origtargz to build source tarball.

clean()

Clean temporary files using either:

Devscripts::Uscan::http::http_clean() =item Devscripts::Uscan::ftp::ftp_clean() =item Devscripts::Uscan::git::git_clean()

SEE ALSO

uscan, Devscripts::Uscan::WatchFile, Devscripts::Uscan::Config

AUTHOR

uscan was originally written by Christoph Lameter <clameter@debian.org> (I believe), modified by Julian Gilbey <jdg@debian.org>. HTTP support was added by Piotr Roszatycki <dexter@debian.org>. uscan was rewritten in Perl by Julian Gilbey. Xavier Guimard <yadd@debian.org> rewrote uscan in object oriented Perl.

COPYRIGHT AND LICENSE

Copyright 2002-2006 by Julian Gilbey <jdg@debian.org>, 2018 by Xavier Guimard <yadd@debian.org>

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

<% include ('/elements/footer.html' ) %>