NAME
urpm - Mageia perl tools to handle the urpmi database
DESCRIPTION
urpm
is used by urpmi executables to manipulate packages and media on a Mageia Linux distribution.
The urpm class
- urpm->new()
-
The constructor creates a new urpm object. It's a blessed hash that contains fields from URPM, and also the following fields:
source: { id => src_rpm_file|spec_file }
media: [ { start => int, end => int, name => string, url => string, virtual => bool, media_info_dir => string, with_synthesis => string, no-media-info => bool, iso => string, downloader => string, ignore => bool, update => bool, modified => bool, really_modified => bool, unknown_media_info => bool, } ],
options: hashref of urpm options
several paths:
config: path of urpmi.cfg (/etc/urpmi/urpmi.cfg)
mediacfgdir: path of mediacfg.d (/etc/urpmi/mediacfg.d)
skiplist: path of skip.list (/etc/urpmi/skip.list),
instlist: path of inst.list (/etc/urpmi/inst.list),
prefer_list: path of prefer.list (/etc/urpmi/prefer.list),
prefer_vendor_list: path of prefer.vendor.list (/etc/urpmi/prefer.vendor.list),
private_netrc: path of netrc (/etc/urpmi/netrc),
statedir: state directory (/var/lib/urpmi),
cachedir: cache directory (/var/cache/urpmi),
root: path of the rooted system (when using global urpmi config),
urpmi_root: path of the rooted system (when both urpmi & rpmdb are chrooted)
Several subs:
fatal: sub for relaying fatal errors (should popup in GUIes)
error: sub for relaying other errors
log: sub for relaying messages if --verbose
print: sub for always displayed messages, enable to redirect output for eg: installer
info: sub for messages displayed unless --quiet
All
URPM
methods are available on an urpm object. - urpm->new_parse_cmdline()
-
Like urpm->new but also parse the command line and parse the configuration file.
- db_open_or_die($urpm, $b_write_perm)
-
Open RPM database (RW or not) and die if it fails
- register_rpms($urpm, @files)
-
Register local packages for being installed, keep track of source.
- is_delta_installable($urpm, $pkg, $root)
-
checks whether the delta RPM represented by $pkg is installable wrt the RPM DB on $root. For this, it extracts the rpm version to which the delta applies from the delta rpm filename itself. So naming conventions do matter :)
- extract_packages_to_install($urpm, $sources)
-
Extract package that should be installed instead of upgraded, installing instead of upgrading is useful - for inst.list (cf flag disable_obsolete)
Sources is a hash of id -> source rpm filename.
- get_updates_description($urpm, @update_medias)
-
Get reason of update for packages to be updated. Use all update medias if none given.
SEE ALSO
The URPM package is used to manipulate at a lower level synthesis and rpm files.
See also submodules: gurpmi, urpm::args, urpm::bug_report, urpm::cdrom, urpm::cfg, urpm::download, urpm::get_pkgs, urpm::install, urpm::ldap, urpm::lock, urpm::main_loop, urpm::md5sum, urpm::media, urpm::mirrors, urpm::msg, urpm::orphans, urpm::parallel_ka_run, urpm::parallel, urpm::parallel_ssh, urpm::prompt, urpm::removable, urpm::select, urpm::signature, urpm::sys, urpm::util, urpm::xml_info_pkg, urpm::xml_info
COPYRIGHT
Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005 MandrakeSoft SA
Copyright (C) 2005-2010 Mandriva SA
Copyright (C) 2011-2020 Mageia
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, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.