summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2000-08-06 19:25:20 +0000
committerPascal Rigaux <pixel@mandriva.com>2000-08-06 19:25:20 +0000
commitc8a33944aa92cd8ae1349954d01350a1bd85a15c (patch)
treef67e94ff9070864a48bfe00156d657e7c086017a
parent1bf1d2e52045e87143092f3591d94cc07faffe8d (diff)
downloadurpmi-c8a33944aa92cd8ae1349954d01350a1bd85a15c.tar
urpmi-c8a33944aa92cd8ae1349954d01350a1bd85a15c.tar.gz
urpmi-c8a33944aa92cd8ae1349954d01350a1bd85a15c.tar.bz2
urpmi-c8a33944aa92cd8ae1349954d01350a1bd85a15c.tar.xz
urpmi-c8a33944aa92cd8ae1349954d01350a1bd85a15c.zip
no_comment
-rwxr-xr-xurpmi2
-rw-r--r--urpmi.spec22
2 files changed, 20 insertions, 4 deletions
diff --git a/urpmi b/urpmi
index 676a3fbf..7c3b7ff2 100755
--- a/urpmi
+++ b/urpmi
@@ -68,7 +68,7 @@ select STDOUT; $| = 1; # make unbuffered
open F, $depsfile or die "run urpmi.addmedia first\n";
-if (@files = map { untaint($_) } grep { -e $_ } @ARGV) {
+if (@files = map { untaint($_) } grep { /\.rpm/ && -e $_ } @ARGV) {
$uid == 0 or die _("Only superuser is allowed to install local packages");
open G, "gendepslist2 @files -- $dir/hdlist*.cz2 2>/dev/null |";
-e $_ and s|(.*/)?(.*)\.[^.]+\.rpm$|$2| foreach @ARGV;
diff --git a/urpmi.spec b/urpmi.spec
index a085586d..1d430dbf 100644
--- a/urpmi.spec
+++ b/urpmi.spec
@@ -2,7 +2,7 @@
Name: urpmi
Version: 1.2
-Release: 3mdk
+Release: 4mdk
License: GPL
Source0: %{name}.tar.bz2
Summary: User mode rpm install
@@ -49,8 +49,14 @@ install -m 644 autoirpm.deny $RPM_BUILD_ROOT/etc/urpmi
echo "echo 'Use urpmf instead'" > $RPM_BUILD_ROOT%{_bindir}/rpmf
chmod a+x $RPM_BUILD_ROOT%{_bindir}/rpmf
+find $RPM_BUILD_ROOT%{_datadir}/locale -name %{name}.po | \
+ perl -pe 'm|locale/([^/_]*)(.*)|; $_ = "%%lang($1) %{_datadir}/locale/$1$2\n"' > %{name}.lang
+
cd $RPM_BUILD_ROOT%{_bindir} ; mv -f rpm-find-leaves urpmi_rpm-find-leaves
+
+%find_lang %{name}
+
%clean
rm -rf $RPM_BUILD_ROOT
rm -rf $RPM_BUILD_DIR/$RPM_PACKAGE_NAME
@@ -58,10 +64,16 @@ rm -rf $RPM_BUILD_DIR/$RPM_PACKAGE_NAME
%pre
groupadd -r -f urpmi
+%preun
+if [ "$1" = "0" ]; then
+ rm -rf /var/lib/urpmi/*
+fi
+exit 0
+
%preun -n autoirpm
autoirpm.uninstall
-%files
+%files -f %{name}.lang
%defattr(-,root,root)
%attr(0755, root, urpmi) %dir /etc/urpmi
%attr(0755, root, urpmi) %dir /var/lib/urpmi
@@ -72,7 +84,6 @@ autoirpm.uninstall
%{_sbindir}/urpme
%{_sbindir}/urpmi.*
%{_mandir}/*/urpm*
-/usr/share/locale/*/LC_MESSAGES/urpmi.po
%files -n gurpmi
%defattr(-,root,root)
@@ -89,6 +100,11 @@ autoirpm.uninstall
%changelog
+* Sun Aug 6 2000 Pixel <pixel@mandrakesoft.com> 1.2-4mdk
+- use %%lang for i18n'd files
+- clean /var/lib/urpmi on removal
+- urpmi local_file only if local_file ends with .rpm
+
* Wed Jul 19 2000 Pixel <pixel@mandrakesoft.com> 1.2-3mdk
- change versions of autoirpm and gurpmi
- macroization, BM