summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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/$_");
}