Bug 74491 - Function opendb doesn't exported
Summary: Function opendb doesn't exported
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Public Beta
Classification: Retired
Component: rpm-python (Show other bugs)
(Show other bugs)
Version: null
Hardware: i586 Linux
medium
medium
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact: David Lawrence
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-09-25 09:51 UTC by Grigory Bakunov
Modified: 2007-04-18 16:46 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-09-25 13:55:03 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

Description Grigory Bakunov 2002-09-25 09:51:36 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020610

Description of problem:
I try to use rpm-python with rpm-4.1 and found what it doesn't work at all.


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


How reproducible:
Always

Steps to Reproduce:
1.start python
2.imput next strings:
   import rpm
   rpm.opendb()
3. look at error :)
	

Actual Results:  >>> import rpm
>>> rpm.opendb()
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
AttributeError: 'module' object has no attribute 'opendb'
>>> 


Expected Results:  >>> import rpm
>>> rpm.opendb()
<rpmdb object at 80dc6b0>


Additional info:

If you take a look at rpm cvs you can see what something wrong with that:
black@black:/opt/CVS/rpm/python (1028) grep opendb * */*
rpmdb-py.c: * To obtain a db object explicitly, the opendb function in the rpm
module
rpmdb-py.c: * can be called. The opendb function takes two optional arguments.
rpmdb-py.c: *   db = rpm.opendb()
rpmdb-py.c: *   db = rpm.opendb()
rpmdb-py.c: *   db = rpm.opendb()
testhdr:db = rpm.opendb(0)
testit:db = rpm.opendb ()
testmi:db = rpm.opendb(0)

in other words - somebody forget to export opendb function :)

Comment 1 Jeff Johnson 2002-09-25 13:18:54 UTC
No, someone (me) forgot to change the doco.

The rpm database is handled as a side effect
of transaction processing and explicit methods
have been removed from the python bindings.


Comment 2 Grigory Bakunov 2002-09-25 13:54:58 UTC
May be mutch better solution is 
1) Add empty method opendb what throw exception ("Obsolete").
2) Add empty method opendb what just printout "This method is obsolete (use blahblah 
instead)" like "regex" module in python2.x

And thanks for fast answer.


Comment 3 Jeff Johnson 2002-09-25 15:28:29 UTC
Sure there are lots of ways to handle
API changes, but an rpm-python API needs
to be designed first. What's currently
implemented is deficient in many ways,
and rather organic rather than designed.

I'm gonna close this bug because rpmdb-py.c
is gonna be eliminated in rpm-4.2 AFAIK,
so there's little reason to change (i.e.
delete) the documentation for non-existent
methods in the interim.

Poke me on rpm-list@redhat.com if you
need further help. And, I *love* patches :-)




Note You need to log in before you can comment on or make changes to this bug.