Skip to content

Commit

Permalink
* install yum-updatesd wrapper binary in /usr/sbin
Browse files Browse the repository at this point in the history
* rename /usr/share/yum-cli/yum-updatesd.py to something that can be
  imported
  • Loading branch information
katzj committed Jun 27, 2006
1 parent 0b24119 commit 78eafc7
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,18 @@ install:
for p in $(PYFILES) ; do \
install -m 644 $$p $(DESTDIR)/usr/share/yum-cli/$$p; \
done
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)"

mkdir -p $(DESTDIR)/usr/bin $(DESTDIR)/usr/bin
mkdir -p $(DESTDIR)/usr/bin $(DESTDIR)/usr/sbin
install -m 755 bin/yum.py $(DESTDIR)/usr/bin/yum
install -m 755 bin/yum-updatesd.py $(DESTDIR)/usr/sbin/yum-updatesd

mkdir -p $(DESTDIR)/var/cache/yum

for d in $(SUBDIRS); do make PYTHON=$(PYTHON) DESTDIR=`cd $(DESTDIR); pwd` -C $$d install; [ $$? = 0 ] || exit 1; done

archive: remove_spec = ${PKGNAME}-daily.spec
archive: remove_spec = ${PKGNAME}-daily.spec
archive: _archive

daily: remove_spec = ${PKGNAME}.spec
Expand Down
32 changes: 32 additions & 0 deletions bin/yum-updatesd.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/usr/bin/python
import sys
try:
import yum
except ImportError:
print >> sys.stderr, """\
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:
%s
Please install a package which provides this module, or
verify that the module is installed correctly.
It's possible that the above module doesn't match the
current version of Python, which is:
%s
If you cannot solve this problem yourself, please go to
the yum faq at:
http:https://wiki.linux.duke.edu/YumFaq
""" % (sys.exc_value, sys.version)
sys.exit(1)

sys.path.insert(0, '/usr/share/yum-cli')
try:
import yumupd
yumupd.main()
except KeyboardInterrupt, e:
print >> sys.stderr, "\n\nExiting on user cancel."
sys.exit(1)

0 comments on commit 78eafc7

Please sign in to comment.