MAN page from OpenSuSE alien-8.95.6-lp155.2.1.noarch.rpm
Alien::Package::Rpm
Section: User Contributed Perl Documentation (3)
Updated: 2023-08-01
Index NAME
Alien::Package::Rpm - an object that represents a rpm package
DESCRIPTION
This is an object class that represents a rpm package. It is derived fromAlien::Package.
FIELDS
- prefixes
- Relocatable rpm packages have a prefixes field.
METHODS
- checkfile
- Detect rpm files by their extension.
- install
- Install a rpm. If RPMINSTALLOPT is set in the environment, the options init are passed to rpm on its command line.
- scan
- Implement the scan method to read a rpm file.
- unpack
- Implement the unpack method to unpack a rpm file. This is a little nastybecause it has to handle relocatable rpms and has to do a bit ofpermissions fixing as well.
- prep
- Prepare for package building by generating the spec file.
- cleantree
- Delete the spec file.
- build
- Build a rpm. If RPMBUILDOPT is set in the environment, the options init are passed to rpm on its command line.
An optional parameter, if passed, can be used to specify the program to useto build the rpm. It defaults to rpmbuild.
- version
- Set/get version.
When retreiving the version, remove any dashes in it.
- postinst
- postrm
- preinst
- prerm
- Set/get script fields.
When retrieving a value, we have to do some truly sick mangling. Sincedebian/slackware scripts can be anything --- perl programs or binary files--- and rpm is limited to only shell scripts, we need to encode the filesand add a scrap of shell script to make it unextract and run on the fly.
When setting a value, we do some mangling too. Rpm maintainer scriptsare typically shell scripts, but often lack the leading shebang line.This can confuse dpkg, so add the shebang if it looks like thereis no shebang magic already in place.
Additionally, it's not uncommon for rpm maintainer scripts to containbashisms, which can be triggered when they are ran on systems where /bin/shis not bash. To work around this, the shebang line of the scripts ischanged to use bash.
Also, if the rpm is relocatable, the script could refer toRPM_INSTALL_PREFIX, which is set by rpm at run time. Deal with this byadding code to the script to set RPM_INSTALL_PREFIX.
- arch
- Set/get arch field. When the arch field is set, some sanitizing is donefirst to convert it to the debian format used internally. When it'sretrieved it's converted back to rpm form from the internal form.
AUTHOR
Joey Hess <joeyAATTkitenet.net>
Index
- NAME
- DESCRIPTION
- FIELDS
- METHODS
- AUTHOR
This document was created byman2html,using the manual pages.