[yum] misc packaging fixes
Zdeněk Pavlas
zpavlas at fedoraproject.org
Wed Mar 27 12:14:45 UTC 2013
commit a359e8b9dd6de4cdeeff48303266834dd02a2e09
Author: Zdenek Pavlas <zpavlas at redhat.com>
Date: Wed Mar 27 13:14:31 2013 +0100
misc packaging fixes
yum-HEAD.patch | 44 +++++++++++++++++++++++++++-----------------
yum.spec | 9 +++++++--
2 files changed, 34 insertions(+), 19 deletions(-)
---
diff --git a/yum-HEAD.patch b/yum-HEAD.patch
index 88761a7..39d69dd 100644
--- a/yum-HEAD.patch
+++ b/yum-HEAD.patch
@@ -12,7 +12,7 @@ index 911da19..85decd5 100644
.pydevproject
asthelper.completions
diff --git a/Makefile b/Makefile
-index 740b616..a1c0c0f 100644
+index 740b616..9e1d7af 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
@@ -21,14 +21,17 @@ index 740b616..a1c0c0f 100644
PYFILES = $(wildcard *.py)
PYLINT_MODULES = *.py yum rpmUtils
PYLINT_IGNORE = oldUtils.py
-@@ -26,6 +26,7 @@ install:
+@@ -26,8 +26,9 @@ install:
for p in $(PYFILES) ; do \
install -m 644 $$p $(DESTDIR)/usr/share/yum-cli/$$p; \
done
+ chmod 755 $(DESTDIR)/usr/share/yum-cli/completion-helper.py
mv $(DESTDIR)/usr/share/yum-cli/yum-updatesd.py $(DESTDIR)/usr/share/yum-cli/yumupd.py
- $(PYTHON) -c "import compileall; compileall.compile_dir('$(DESTDIR)/usr/share/yum-cli', 1, '$(PYDIR)', 1)"
+- $(PYTHON) -c "import compileall; compileall.compile_dir('$(DESTDIR)/usr/share/yum-cli', 1, '$(PYDIR)', 1)"
++ $(PYTHON) -c "import compileall; compileall.compile_dir('$(DESTDIR)/usr/share/yum-cli', 1, '/usr/share/yum-cli', 1)"
+ mkdir -p $(DESTDIR)/usr/bin $(DESTDIR)/usr/sbin
+ install -m 755 bin/yum.py $(DESTDIR)/usr/bin/yum
@@ -38,6 +39,25 @@ install:
for d in $(SUBDIRS); do make PYTHON=$(PYTHON) DESTDIR=`cd $(DESTDIR); pwd` -C $$d install; [ $$? = 0 ] || exit 1; done
@@ -3773,10 +3776,10 @@ index c60fa08..0000000
-ts run
-exit
diff --git a/etc/yum.bash b/etc/yum.bash
-index f1e06e8..d741ff9 100644
+index f1e06e8..b319963 100644
--- a/etc/yum.bash
+++ b/etc/yum.bash
-@@ -1,53 +1,17 @@
+@@ -1,53 +1,25 @@
# bash completion for yum
-# arguments:
@@ -3800,8 +3803,15 @@ index f1e06e8..d741ff9 100644
- # -d 0 did that for us.
- COMPREPLY+=( $( ${yum:-yum} -d 0 -C list $1 "$2*" 2>/dev/null | \
- sed -ne 1d -e 's/[[:space:]].*//p' ) )
-- fi
+ local IFS=$'\n'
++ if [[ -n "$YUM_CACHEDIR" && "$1 $2" == "list available" ]]; then
++ for db in $(find "$YUM_CACHEDIR" -name primary_db.sqlite); do
++ COMPREPLY+=( $( sqlite3 "$db" \
++ "SELECT name||'.'||arch FROM packages WHERE name LIKE '$3%'"
++ ) )
++ done
++ return
+ fi
+ COMPREPLY+=( $(
+ /usr/share/yum-cli/completion-helper.py -d 0 -C "$@" 2>/dev/null ) )
}
@@ -3838,7 +3848,7 @@ index f1e06e8..d741ff9 100644
}
# arguments:
-@@ -56,7 +20,7 @@ _yum_grouplist()
+@@ -56,7 +28,7 @@ _yum_grouplist()
_yum_plugins()
{
local val
@@ -3847,7 +3857,7 @@ index f1e06e8..d741ff9 100644
COMPREPLY+=( $( compgen -W '$( command grep -il "^\s*enabled\s*=\s*$val" \
/etc/yum/pluginconf.d/*.conf 2>/dev/null \
| sed -ne "s|^.*/\([^/]\{1,\}\)\.conf$|\1|p" )' -- "$2" ) )
-@@ -75,9 +39,10 @@ _yum_baseopts()
+@@ -75,9 +47,10 @@ _yum_baseopts()
{
local opts='--help --tolerant --cacheonly --config --randomwait
--debuglevel --showduplicates --errorlevel --rpmverbosity --quiet
@@ -3860,7 +3870,7 @@ index f1e06e8..d741ff9 100644
[[ $COMP_LINE == *--noplugins* ]] || \
opts+=" --disableplugin --enableplugin"
printf %s "$opts"
-@@ -89,6 +54,16 @@ _yum_transactions()
+@@ -89,6 +62,16 @@ _yum_transactions()
sed -ne 's/^[[:space:]]*\([0-9]\{1,\}\).*/\1/p' )" -- "$cur" ) )
}
@@ -3877,7 +3887,7 @@ index f1e06e8..d741ff9 100644
# arguments:
# 1 = current word to be completed
# 2 = previous word
-@@ -119,17 +94,17 @@ _yum_complete_baseopts()
+@@ -119,17 +102,17 @@ _yum_complete_baseopts()
;;
--enablerepo)
@@ -3898,7 +3908,7 @@ index f1e06e8..d741ff9 100644
COMPREPLY=( $( compgen -W '${COMPREPLY[@]} all main' -- "$1" ) )
return 0
;;
-@@ -183,16 +158,16 @@ _yum()
+@@ -183,16 +166,16 @@ _yum()
# Commands offered as completions
local cmds=( check check-update clean deplist distro-sync downgrade
@@ -3919,7 +3929,7 @@ index f1e06e8..d741ff9 100644
[[ ${words[i]} == $c ]] && cmd=$c && break
done
done
-@@ -205,13 +180,12 @@ _yum()
+@@ -205,13 +188,12 @@ _yum()
return 0
;;
@@ -3935,7 +3945,7 @@ index f1e06e8..d741ff9 100644
COMPREPLY=( $( compgen -W 'expire-cache packages headers
metadata cache dbcache all' -- "$cur" ) )
return 0
-@@ -224,59 +198,83 @@ _yum()
+@@ -224,59 +206,83 @@ _yum()
;;
distro-sync|distribution-synchronization)
@@ -4035,7 +4045,7 @@ index f1e06e8..d741ff9 100644
;;
esac
return 0
-@@ -288,42 +286,66 @@ _yum()
+@@ -288,42 +294,66 @@ _yum()
;;
install)
@@ -4109,7 +4119,7 @@ index f1e06e8..d741ff9 100644
COMPREPLY=( $( compgen -W 'all installed available nogroups
grouplist groupinfo' -- "$cur" ) )
return 0
-@@ -337,7 +359,11 @@ _yum()
+@@ -337,7 +367,11 @@ _yum()
$split && return 0
@@ -185138,7 +185148,7 @@ index 1ce4720..2f3f7a3
gobject.threads_init()
dbus.glib.threads_init()
diff --git a/yum.spec b/yum.spec
-index abd203f..e80df51 100644
+index abd203f..294eb96 100644
--- a/yum.spec
+++ b/yum.spec
@@ -1,24 +1,74 @@
@@ -185467,7 +185477,7 @@ index abd203f..e80df51 100644
-%config %{_sysconfdir}/logrotate.d/%{name}
-%{_sysconfdir}/bash_completion.d
+%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
-+%{compdir}
++%(dirname %{compdir})
+%dir %{_datadir}/yum-cli
%{_datadir}/yum-cli/*
+%exclude %{_datadir}/yum-cli/completion-helper.py?
diff --git a/yum.spec b/yum.spec
index 60ba971..f9319bd 100644
--- a/yum.spec
+++ b/yum.spec
@@ -36,7 +36,7 @@
Summary: RPM package installer/updater/manager
Name: yum
Version: 3.4.3
-Release: 79%{?dist}
+Release: 80%{?dist}
License: GPLv2+
Group: System Environment/Base
Source0: http://yum.baseurl.org/download/3.4/%{name}-%{version}.tar.gz
@@ -345,7 +345,7 @@ exit 0
%dir %{_sysconfdir}/yum/protected.d
%dir %{_sysconfdir}/yum/vars
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
-%{compdir}
+%(dirname %{compdir})
%dir %{_datadir}/yum-cli
%{_datadir}/yum-cli/*
%exclude %{_datadir}/yum-cli/completion-helper.py?
@@ -393,6 +393,11 @@ exit 0
%endif
%changelog
+* Wed Mar 27 2013 Zdenek Pavlas <zpavlas at redhat.com> - 3.4.3-80
+- package also %{compdir}'s parent
+- set correct dir when bytecompiling /usr/share/yum-cli
+- add fast package name completion (disabled by default)
+
* Wed Mar 20 2013 Zdenek Pavlas <zpavlas at redhat.com> - 3.4.3-79
- add BuildRequires: bash-completion
More information about the scm-commits
mailing list