Commit Diff
Diff:
d272930633adc25efc96e40ef265f640ea91b969
a99a095cc1192c913600eadd771d93964573e5e1
Commit:
a99a095cc1192c913600eadd771d93964573e5e1
Tree:
3636a869c8fc1646c4e8eec390b5cfe7db661a61
Author:
fredgnix <fredgnix@a8afeb8c-277c-4b4a-a4f6-ef4c85adc32b>
Committer:
fredgnix <fredgnix@a8afeb8c-277c-4b4a-a4f6-ef4c85adc32b>
Date:
Tue Apr 10 13:21:42 2012 UTC
Message:
add pkgdesc to CSV
blob - 85a5b2eb5d068ba18aa533fffc2d7b102ddbd780
blob + 0d821d47bac777258b3b4968ffb41b30c96da17f
--- Pkgtxt2db.pm
+++ Pkgtxt2db.pm
@@ -144,7 +144,7 @@ sub mkdadb {
next;
}
if ($_ =~ /\Q${pkgname}\E:(.*)/) {
- $pkgdb{$pkgname}[8] = $pkgdb{$pkgname}[8] . "\n" . "$1";
+ $pkgdb{$pkgname}[8] = $pkgdb{$pkgname}[8] . "$1";
next;
}
else {
@@ -161,11 +161,11 @@ sub tocsv {
open(C, ">pkgtxt.csv") or die "Unable to open pkgtxt.csv for writing, aborting.";
# choose the CSV separator, \t = tab \@ = @ ....
# avoid the comma (,) as it is the separator for dependancies
- my $c = "\t";
- print C "pkgname${c}pkgver${c}arch${c}pkgrel${c}location${c}dep${c}sizeC${c}sizeU\n";
+ my $c = "\;";
+ print C "pkgname${c}pkgver${c}arch${c}pkgrel${c}location${c}dep${c}sizeC${c}sizeU${c}Desc\n";
for my $p ( sort keys %pkgdb ) {
printf C "%s$c%s$c%s$c%s$c%s$c%s$c%s$c%s$c%s\n",
- $p, $pkgdb{$p}[1], $pkgdb{$p}[2], $pkgdb{$p}[3], $pkgdb{$p}[4], $pkgdb{$p}[5], $pkgdb{$p}[6], $pkgdb{$p}[7];
+ $p, $pkgdb{$p}[1], $pkgdb{$p}[2], $pkgdb{$p}[3], $pkgdb{$p}[4], $pkgdb{$p}[5], $pkgdb{$p}[6], $pkgdb{$p}[7], $pkgdb{$p}[8];
}
close (C);
print "pkgtxt.csv has been built.\n";
Frédéric Galusik