Ignore:
Timestamp:
Jun 3, 2003, 4:47:28 PM (16 years ago)
Author:
ranger
Message:

also search OD rpm

Location:
trunk/dports/sysutils/yum
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/sysutils/yum/Portfile

    r2730 r2739  
    1 # $Id: Portfile,v 1.1 2003/06/02 22:53:34 ranger Exp $
     1# $Id: Portfile,v 1.2 2003/06/03 16:47:28 ranger Exp $
    22
    33PortSystem 1.0
     
    55version         1.0.1
    66platforms       darwin
    7 revision        1
     7revision        2
    88categories      sysutils archivers
    99maintainers     ranger@befunk.com
  • trunk/dports/sysutils/yum/files/patch-clientstuff-py.diff

    r2730 r2739  
    1 diff -uNr ../yum-1.0.1/clientStuff.py ./clientStuff.py
    21--- ../yum-1.0.1/clientStuff.py Mon May 19 22:54:59 2003
    3 +++ ./clientStuff.py    Sat May 31 18:32:23 2003
    4 @@ -152,7 +152,7 @@
     2+++ clientStuff.py      Mon Jun  2 16:17:10 2003
     3@@ -152,15 +152,17 @@
    54     return 0
    65 
    76 def openrpmdb(option=0, dbpath=None):
    87-    dbpath = "/var/lib/rpm/"
    9 +    dbpath = "/opt/local/var/lib/rpm/"
    10      rpm.addMacro("_dbpath", dbpath)
     8-    rpm.addMacro("_dbpath", dbpath)
     9+    for dbpath in ["/opt/local/var/lib/rpm/", "/var/lib/rpm/"]:
     10+        if os.path.exists(dbpath + "Packages"):
     11+            rpm.addMacro("_dbpath", dbpath)
    1112 
    12      try:
     13-    try:
     14-        db = rpm.opendb(option)
     15-    except rpm.error, e:
     16-        raise RpmError(_("Could not open RPM database for reading. Perhaps it is already in use?"))
     17-   
     18-    return db
     19+            try:
     20+                db = rpm.opendb(option)
     21+            except rpm.error, e:
     22+                raise RpmError(_("Could not open RPM database for reading.  Perhaps it is already in use?"))
     23+            return db
     24+
     25+    raise RpmError(_("Could not find RPM database!"))
     26 
     27 
     28 def rpmdbNevralLoad(nevral):
  • trunk/dports/sysutils/yum/files/patch-up2datetheft-py.diff

    r2730 r2739  
    1 diff -uNr ../yum-1.0.1/up2datetheft.py ./up2datetheft.py
    21--- ../yum-1.0.1/up2datetheft.py        Mon May 19 22:54:59 2003
    3 +++ ./up2datetheft.py   Sat May 31 18:32:23 2003
    4 @@ -21,7 +21,7 @@
     2+++ up2datetheft.py     Mon Jun  2 16:17:43 2003
     3@@ -21,16 +21,17 @@
    54 
    65 
    76 def openrpmdb(option=0, dbpath=None):
    87-    dbpath = "/var/lib/rpm/"
    9 +    dbpath = "/opt/local/var/lib/rpm/"
    10      rpm.addMacro("_dbpath", dbpath)
     8-    rpm.addMacro("_dbpath", dbpath)
     9+    for dbpath in ["/opt/local/var/lib/rpm/", "/var/lib/rpm/"]:
     10+        if os.path.exists(dbpath + "Packages"):
     11+            rpm.addMacro("_dbpath", dbpath)
    1112 
    12      #log.log_me("Opening rpmdb in %s with option %s" % (dbpath,option))
     13-    #log.log_me("Opening rpmdb in %s with option %s" % (dbpath,option))
     14-    try:
     15-        db = rpm.opendb(option)
     16-    except rpm.error, e:
     17-        raise RpmError(_("Could not open RPM database for reading.  Perhaps it is already in use?"))
     18+            try:
     19+                db = rpm.opendb(option)
     20+            except rpm.error, e:
     21+                raise RpmError(_("Could not open RPM database for reading.  Perhaps it is already in use?"))
     22+            return db
     23 
     24-    return db
     25+    raise RpmError(_("Could not find RPM database!"))
     26 
     27 
     28 # mainly here to make conflicts resolution cleaner
Note: See TracChangeset for help on using the changeset viewer.