linux::distribution::packages(3pm) [debian man page]
Linux::Distribution::Packages(3pm) User Contributed Perl Documentation Linux::Distribution::Packages(3pm)NAME
Linux::Distribution::Packages - list all packages on various Linux distributions
SYNOPSIS
use Linux::Distribution::Packages qw(distribution_packages distribution_write);
$linux = new Linux::Distribution::Packages({'format' => 'csv', 'output_file' => 'packages.csv'});
$linux->distribution_write();
# Or you can (re)set the options when you write.
$linux->distribution_write({'format' => 'xml', 'output_file' => 'packages.xml'});
# If you want to reload the package data
$linux->distribution_packages();
DESCRIPTION
This is a simple module that uses Linux::Distribution to guess the linux distribution and then uses the correct commands to list all the
packages on the system and then output them in one of three formats: native, csv, and xml.
Distributions currently working: debian, ubuntu, fedora, redhat, suse, gentoo, slackware, redflag.
The module inherits from Linux::Distribution, so can also use its calls.
EXPORT
None by default.
TODO
* Add the capability to correctly get packages for all recognized distributions. * Seperate out parsing from writing. Parse data to hash
and give access to hash. Then write the formatted data from the hash.
AUTHORS
Judith Lebzelter, <judith@osdl.org> Alberto Re, <alberto@accidia.net>
COPYRIGHT AND LICENSE
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.5 or,
at your option, any later version of Perl 5 you may have available.
perl v5.10.1 2006-04-19 Linux::Distribution::Packages(3pm)
Check Out this Related Man Page
Parse::Debian::Packages(3pm) User Contributed Perl Documentation Parse::Debian::Packages(3pm)NAME
Parse::Debian::Packages - parse the data from a debian Packages.gz
SYNOPSIS
use YAML;
use IO::File;
use Parse::Debian::Packages;
my $fh = IO::File->new("Packages");
my $parser = Parse::Debian::Packages->new( $fh );
while (my %package = $parser->next) {
print Dump \%package;
}
DESCRIPTION
This module parses the Packages files used by the debian package management tools.
It presents itself as an iterator. Each call of the ->next method will return the next package found in the file.
For laziness, we take a filehandle in to the constructor. Please open the file for us.
METHODS
new( $filehandle )
next
Iterate to the next package in the file, returns either a hash containing a package description, or false at end of file.
as_hash( $filehandle )
Return all the packages from a filehandle as a hash of hashes.
AUTHOR
Richard Clamp <richardc@unixbeard.net> with as_hash implementation by Thomas Klausner.
COPYRIGHT
Copyright (C) 2003,2005,2012 Richard Clamp. All Rights Reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
SEE ALSO
Module::Packaged
perl v5.14.2 2012-03-11 Parse::Debian::Packages(3pm)
I have been using Linux for 3 years now, and I think I am getting enough knowledge (and confidence) to try some more 'traditional' unix variants. I installed FreeBSD 5.0-CURRENT. I have a couple of questions for the time being:
1) Frequently when I need to compile software packages they can't... (16 Replies)
Sorry for sounding like an incredible n00b, but as I have been lurking and searching on the net, I have come across something that may be common sense to most, but to me is confusing. I constantly see the word GNU when I do searches for Linux, both on this web site and on search engines. I found... (18 Replies)
I built a PC I intended on using to run Linux. It was using a AMD XP 2000 processor, had a 80 gig hard drive, and 256 mb of ram. I got it all connected and working and installed OpenLinux (from book "Learn Linux in 24 hours" that came with a instillation CD). My intent was to take about a month... (18 Replies)
I want use Linux in my Laptop in one partition, other partition will be Windows. Please advise which Linux is good for a Laptop PC? Fedora, Redhat, or ? :confused: (19 Replies)
What is your age? poses an interesting question, but the age categories had some room for improvement. So I thought that I would start a new poll with with a better distribution of age groups. As with the other poll, this is a public poll. People can click on the numbers to see who voted and... (37 Replies)
Good day ya'all,
I had a csv file like below
date|country|ticker
19990101|US|2
20010303|AU|w
I had used the sed as below
sed 's/\/,/g;
s/\(\)\(\)\(\)/\1-\2-\3/1;
s/\d/\"\d\"/3;
s/\({1.}\)/\"\(0-9]{1,})\"/3'
I was expecting something like below (20 Replies)
hello,
i'm having some performance problem on one of my linux machines and i hope someone will be able to help me analyzing the problem.
machine info:
Linux fedora, cpu x 4 cores of 1.6Ghz, 8G memory, 8G swap.
i've enabled sar on my machine and created a graph using ksar utility for... (15 Replies)
Hi Experts,
I want to copy a file from a Linux machine to another Linux machine or a windows machine shared drive.
I mean to say..
cp filename //hostname/shareddrive
I don't want to mount. Is there any way we can do it.
Regards
Naree (34 Replies)
Hi all,
I'm kind of new to programming in Linux & c/c++. I'm currently writing a FileManager using Ubuntu Linux(10.10) for Learning Purposes. I've got started on this project by creating a loopback device to be used as my virtual hard disk. After creating the loop back hard disk and mounting it... (23 Replies)
I am writing a software product and hope that it will work on a variety of Linux distributions. At the moment, I am trying to create some kind of Linux version of patches/upgrades of installed software. Gathering information on available updates isn't hard, nor is installation of updates, but I... (27 Replies)
Hi All,
There are list of 4-5 .csv files which has 12 columns.In some cases one of the record is split into 2 records. What needs to be done is this split record has to be auto corrected and placed in the csv file.
Eg:
Let us consider sample.csv file and in normal conditions the file would... (40 Replies)
Here is a chance for Linux users to easily compare Linux CPU info and some meaningless BOGOMIPS. Everyone who is running Linux is welcome to:
cat /proc/cpuinfo
and post the results.
Here is the results for www.unix.com:
processor : 0
vendor_id : AuthenticAMD
cpu family... (182 Replies)
Hello,
Does anyone know of a way to convert an .xml file (ONIX) to something more workable, like a .csv (or even .xls) file? Ideally something on the command line would be ideal, but not absolutely necessary. I would be dealing with .xml files of 125 MB+.
I am using XQuartz in El Capitan.
... (17 Replies)
What is your favorite Linux distro?
and possibly why?
Personally, I have Fedora 3 on my computer. I have used Ubuntu and Slackware, too. But I think I liked Ubuntu more, maybe because of its speed and easy installation of packages. (192 Replies)