summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-02-07 22:28:04 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-02-07 22:28:04 +0000
commit75ead674d734da8150b01c20f6b02fc04775a84f (patch)
tree21e5ecfb670dd77b45b0404dffd1946d0b3e2663
parent147b493b30c162de7714dc940ce7ebac9be7498b (diff)
downloadldetect-lst-75ead674d734da8150b01c20f6b02fc04775a84f.tar
ldetect-lst-75ead674d734da8150b01c20f6b02fc04775a84f.tar.gz
ldetect-lst-75ead674d734da8150b01c20f6b02fc04775a84f.tar.bz2
ldetect-lst-75ead674d734da8150b01c20f6b02fc04775a84f.tar.xz
ldetect-lst-75ead674d734da8150b01c20f6b02fc04775a84f.zip
upgrading the package should now work... using trigger :-(
-rw-r--r--ldetect-lst.spec12
-rw-r--r--update-ldetect-lst20
2 files changed, 20 insertions, 12 deletions
diff --git a/ldetect-lst.spec b/ldetect-lst.spec
index bc83c9cd..406e0e15 100644
--- a/ldetect-lst.spec
+++ b/ldetect-lst.spec
@@ -1,6 +1,6 @@
%define name ldetect-lst
%define version 0.1.3
-%define release 1mdk
+%define release 2mdk
Name: %{name}
Version: %{version}
@@ -37,6 +37,13 @@ rm -rf $RPM_BUILD_ROOT
%clean
rm -rf $RPM_BUILD_ROOT
+# trigger is needed to upgrade from a package having
+# /usr/share/ldetect-lst/pcitable in the package to the new scheme
+%triggerpostun -- %{name}
+if [ -x /usr/sbin/update-ldetect-lst ]; then
+ /usr/sbin/update-ldetect-lst
+fi
+
%preun -p "/usr/sbin/update-ldetect-lst --clean"
%post -p /usr/sbin/update-ldetect-lst
@@ -52,6 +59,9 @@ rm -rf $RPM_BUILD_ROOT
%{_bindir}/*
%changelog
+* Thu Feb 7 2002 Pixel <pixel@mandrakesoft.com> 0.1.3-2mdk
+- upgrading the package should now work... using trigger :-(
+
* Thu Feb 7 2002 Pixel <pixel@mandrakesoft.com> 0.1.3-1mdk
- allow third party entries (using update-ldetect-lst)
diff --git a/update-ldetect-lst b/update-ldetect-lst
index 77c119c4..d0921017 100644
--- a/update-ldetect-lst
+++ b/update-ldetect-lst
@@ -3,15 +3,13 @@
my $dir = '/usr/share/ldetect-lst';
my @files = qw(pcitable usbtable isatable pcmciatable);
-if ($ARGV[0] eq '--clean') {
- foreach (@files) {
- unlink "$dir/$_";
- }
-} else {
- foreach (@files) {
- my $d = "$dir/$_.d";
- -d $d or next;
- my @l = sort glob("$d/*.lst") or next;
- system("cat " . join(" ", @l) . " > $dir/$_");
- }
+unlink "$dir/$_" foreach @files;
+
+$ARGV[0] eq '--clean' and exit 0;
+
+foreach (@files) {
+ my $d = "$dir/$_.d";
+ -d $d or next;
+ my @l = sort glob("$d/*.lst") or next;
+ system("cat " . join(" ", @l) . " > $dir/$_");
}