diff options
author | Nicolas Vigier <boklm@mageia.org> | 2013-04-14 13:46:12 +0000 |
---|---|---|
committer | Nicolas Vigier <boklm@mageia.org> | 2013-04-14 13:46:12 +0000 |
commit | 1be510f9529cb082f802408b472a77d074b394c0 (patch) | |
tree | b175f9d5fcb107576dabc768e7bd04d4a3e491a0 /zarb-ml/mageia-dev/attachments/20120426/c17a395f | |
parent | fa5098cf210b23ab4f419913e28af7b1b07dafb2 (diff) | |
download | archives-master.tar archives-master.tar.gz archives-master.tar.bz2 archives-master.tar.xz archives-master.zip |
Diffstat (limited to 'zarb-ml/mageia-dev/attachments/20120426/c17a395f')
-rw-r--r-- | zarb-ml/mageia-dev/attachments/20120426/c17a395f/attachment-0001.ksh | 36 | ||||
-rw-r--r-- | zarb-ml/mageia-dev/attachments/20120426/c17a395f/attachment.ksh | 36 |
2 files changed, 72 insertions, 0 deletions
diff --git a/zarb-ml/mageia-dev/attachments/20120426/c17a395f/attachment-0001.ksh b/zarb-ml/mageia-dev/attachments/20120426/c17a395f/attachment-0001.ksh new file mode 100644 index 000000000..0cf3733b7 --- /dev/null +++ b/zarb-ml/mageia-dev/attachments/20120426/c17a395f/attachment-0001.ksh @@ -0,0 +1,36 @@ +#!/usr/bin/perl + +use strict; +use warnings; + +my $version; + +# Given a list of filenames on the command line or on stdin this +# script returns the rpm-helper minimal version needed to handle them + +if (@ARGV) { + foreach (@ARGV) { + process_file($_); + } +} else { + # notice we are passed a list of filenames NOT as common in unix the + # contents of the file. + foreach (<>) { + process_file($_); + } +} + +if ($version) { + print "Requires(post): rpm-helper >= $version\n"; + print "Requires(preun): rpm-helper >= $version\n"; + +} + +sub process_file { + my ($file) = @_; + + return unless -f $file; + return unless $file =~ m{/lib/systemd/system/\S+\.service$}; + + $version = "0.24.8"; +}
\ No newline at end of file diff --git a/zarb-ml/mageia-dev/attachments/20120426/c17a395f/attachment.ksh b/zarb-ml/mageia-dev/attachments/20120426/c17a395f/attachment.ksh new file mode 100644 index 000000000..0cf3733b7 --- /dev/null +++ b/zarb-ml/mageia-dev/attachments/20120426/c17a395f/attachment.ksh @@ -0,0 +1,36 @@ +#!/usr/bin/perl + +use strict; +use warnings; + +my $version; + +# Given a list of filenames on the command line or on stdin this +# script returns the rpm-helper minimal version needed to handle them + +if (@ARGV) { + foreach (@ARGV) { + process_file($_); + } +} else { + # notice we are passed a list of filenames NOT as common in unix the + # contents of the file. + foreach (<>) { + process_file($_); + } +} + +if ($version) { + print "Requires(post): rpm-helper >= $version\n"; + print "Requires(preun): rpm-helper >= $version\n"; + +} + +sub process_file { + my ($file) = @_; + + return unless -f $file; + return unless $file =~ m{/lib/systemd/system/\S+\.service$}; + + $version = "0.24.8"; +}
\ No newline at end of file |