aboutsummaryrefslogtreecommitdiffstats
path: root/rpmtools.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2002-01-22 18:39:51 +0000
committerFrancois Pons <fpons@mandriva.com>2002-01-22 18:39:51 +0000
commitb086eb0cb9b6ffeee0f04bf991d5420640d7b784 (patch)
tree33bf5113a01ec88299c0c0f9c7cad72a64617eab /rpmtools.pm
parent362a3293bf2f2da458dce726e1c4281533464784 (diff)
downloadrpmtools-b086eb0cb9b6ffeee0f04bf991d5420640d7b784.tar
rpmtools-b086eb0cb9b6ffeee0f04bf991d5420640d7b784.tar.gz
rpmtools-b086eb0cb9b6ffeee0f04bf991d5420640d7b784.tar.bz2
rpmtools-b086eb0cb9b6ffeee0f04bf991d5420640d7b784.tar.xz
rpmtools-b086eb0cb9b6ffeee0f04bf991d5420640d7b784.zip
new 4.1 version.4.1
Diffstat (limited to 'rpmtools.pm')
-rw-r--r--rpmtools.pm18
1 files changed, 17 insertions, 1 deletions
diff --git a/rpmtools.pm b/rpmtools.pm
index 3695d73..90727eb 100644
--- a/rpmtools.pm
+++ b/rpmtools.pm
@@ -6,7 +6,7 @@ use vars qw($VERSION @ISA %compat_arch);
require DynaLoader;
@ISA = qw(DynaLoader);
-$VERSION = '4.0';
+$VERSION = '4.1';
bootstrap rpmtools $VERSION;
@@ -141,6 +141,22 @@ sub read_hdlists {
@names;
}
+#- build the synthesis file (normally used by urpmi only)
+#- for all package not currently with computed dependencies.
+sub write_synthesis_hdlist {
+ my ($params, $FILE) = @_;
+
+ #- avoid writing already present infos with id.
+ foreach my $pkg (grep { ! exists $_->{id} } values %{$params->{info}}) {
+ foreach (qw(provides requires conflicts obsoletes)) {
+ @{$pkg->{$_} || []} and print $FILE join('@', $pkg->{name}, $_, @{$pkg->{$_} || []}) . "\n";
+ }
+ print $FILE join('@',
+ $pkg->{name}, 'info', "$pkg->{name}-$pkg->{version}-$pkg->{release}.$pkg->{arch}",
+ $pkg->{serial} || 0, $pkg->{size} || 0, $pkg->{group}, $pkg->{file} ? ($pkg->{file}) : ()). "\n";
+ }
+}
+
#- build an hdlist from a list of files.
sub build_hdlist {
my ($params, $noclean, $ratio, $dir, $hdlist, @rpms) = @_;