Bug 126377

Summary: DeprecationWarning: the optik interface is deprecated; please use optparse instead
Product: [Fedora] Fedora Reporter: Kaj J. Niemi <kajtzu>
Component: up2dateAssignee: Adrian Likins <alikins>
Status: CLOSED NEXTRELEASE QA Contact: Fanny Augustin <fmoquete>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: carenas, dravet, hdegoede, jlaska, jorton, oliva, reuben-redhatbugzilla
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-08-26 19:05:46 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 123268    
Attachments:
Description Flags
patch to change import from optik for optparse none

Description Kaj J. Niemi 2004-06-20 18:30:44 UTC
Description of problem:
After upgrading to python 2.3.4, up2date complains at startup:

# up2date-nox -l
/usr/lib/python2.3/optik.py:8: DeprecationWarning: the optik interface
is deprecated; please use optparse instead
  DeprecationWarning)

Version-Release number of selected component (if applicable):
up2date-4.3.19

How reproducible:
Always

Comment 1 Hans de Goede 2004-07-20 09:43:39 UTC
I also get the following extra deprecated warnings:
/usr/lib/python2.3/site-packages/gtk-2.0/gtk/__init__.py:83:
GtkDeprecationWarning: gtk.mainloop is deprecated, use gtk.main instead
  self.warn(message, DeprecationWarning)
/usr/lib/python2.3/site-packages/gtk-2.0/gtk/__init__.py:83:
GtkDeprecationWarning: gtk.create_pixmap is deprecated, use
gtk.gdk.Pixmap instead
  self.warn(message, DeprecationWarning)
/usr/lib/python2.3/site-packages/gtk-2.0/gtk/__init__.py:83:
GtkDeprecationWarning: gtk.mainiteration is deprecated, use
gtk.main_iteration instead
  self.warn(message, DeprecationWarning)

This is with up2date-4.3.19-1.1, this also happens with update-config


Comment 2 Jason 2004-07-22 20:54:25 UTC
I am getting this too.  I am using a fresh install of FC3T1.

Comment 3 Jason 2004-07-22 21:01:34 UTC
/usr/lib/python2.3/optik.py:8: DeprecationWarning: the optik interface
is deprecated; please use optparse instead
  DeprecationWarning)
/usr/lib/python2.3/site-packages/gtk-2.0/gtk/__init__.py:83:
GtkDeprecationWarning: gtk.mainloop is deprecated, use gtk.main instead
  self.warn(message, DeprecationWarning)
/usr/lib/python2.3/site-packages/gtk-2.0/gtk/__init__.py:83:
GtkDeprecationWarning: gtk.mainquit is deprecated, use gtk.main_quit
instead
  self.warn(message, DeprecationWarning)
http://fedora.redhat.com/download/up2date-mirrors/fedora-core-rawhide
using mirror:
http://download.fedora.redhat.com/pub/fedora/linux/core/development/i386/
 
Fetching Obsoletes list for channel: fedora-core-rawhide...
 
Fetching obsoletes list for
http://download.fedora.redhat.com/pub/fedora/linux/core/development/i386/...
#######################################
Fetching rpm headers...
Traceback (most recent call last):
  File "/usr/sbin/up2date", line 1271, in ?
    sys.exit(main() or 0)
  File "/usr/sbin/up2date", line 799, in main
    fullUpdate, dryRun=options.dry_run))
  File "/usr/sbin/up2date", line 1147, in batchRun
    batch.run()
  File "/usr/share/rhn/up2date_client/up2dateBatch.py", line 62, in run
    self.__findPackagesToUpdate()
  File "/usr/share/rhn/up2date_client/up2dateBatch.py", line 108, in
__findPackagesToUpdate
    self.availableUpdates = plist.getPackagesToInstall()
  File "/usr/share/rhn/up2date_client/packageList.py", line 611, in
getPackagesToInstall
    result = self.__skipPackages(result)
  File "/usr/share/rhn/up2date_client/packageList.py", line 640, in
__skipPackages
    packageList = self.__skipFiles(packageList)
  File "/usr/share/rhn/up2date_client/packageList.py", line 661, in
__skipFiles
    ignoreMsgCallback = self.ignoreMsgCallback)
  File "/usr/share/rhn/up2date_client/packageList.py", line 700, in
buildHeaderList
    hdr = headerList[pkg]
  File "/usr/share/rhn/up2date_client/headers.py", line 37, in __getitem__
    self.__retrievePackage(item)
  File "/usr/share/rhn/up2date_client/headers.py", line 42, in
__retrievePackage    hdr, sourceType =
rpcServer.doCall(self.repos.getHeader, item)
  File "/usr/share/rhn/up2date_client/rpcServer.py", line 112, in doCall
    ret = apply(method, args, kwargs)
  File "/usr/share/rhn/up2date_client/repoDirector.py", line 31, in
getHeader
    return self.handlers[channel['type']].getHeader(pkg, msgCallback,
progressCallback)
  File "/usr/share/rhn/up2date_client/rpmSource.py", line 210, in
getHeader
    header = source.getHeader(pkg, progressCallback = progressCallback)
  File "/usr/share/rhn/up2date_client/repoBackends/yumRepo.py", line
93, in getHeader
    hdrBuf = fh.read()
  File "/usr/lib/python2.3/gzip.py", line 217, in read
    self._read(readsize)
  File "/usr/lib/python2.3/gzip.py", line 272, in _read
    self._read_eof()
  File "/usr/lib/python2.3/gzip.py", line 308, in _read_eof
    raise IOError, "CRC check failed"
IOError: CRC check failed

Here is what I see when I run up2date -l

Comment 4 Hans de Goede 2004-07-23 05:41:50 UTC
Jason,

You do indeed get the warnings this bug is about, but after that
up2date crashes. Thats a seperate bug, I (and presumably the reporter)
only get the warning not the crash.

Please create a new bug report for the crash, and include detailed
information about how and when it happens, attch for example
/etc/syscobfig/rhn/sources.


Comment 5 Arenas Belon, Carlo Marcelo 2004-08-03 07:14:40 UTC
Python 2.3 includes optik as part of the python library (with the name
optparse)

  http://optik.sourceforge.net/

early versions of python (as the one used on RHES 3 - python 2.2.3),
would need to have at least python-optik 1.4.1 installed for them to
be able to use optparse as the interface to this library (as RHES 3 has).

RHES 2.1 systems (python 1.5) seem to be using python-popt instead and
therefore should be unaffected by this change (not 100% sure though,
as i don't have a RHES 2.1 system at hand to test)

attached, very simple patch (for up2date-4.3.19) which fixes this

Comment 6 Arenas Belon, Carlo Marcelo 2004-08-03 07:15:46 UTC
Created attachment 102381 [details]
patch to change import from optik for optparse

Comment 8 Adrian Likins 2004-08-26 19:05:46 UTC
fixed in current releases 4.3.28 or so