diff options
author | mich <mich@FreeBSD.org> | 2003-08-06 14:13:20 +0000 |
---|---|---|
committer | mich <mich@FreeBSD.org> | 2003-08-06 14:13:20 +0000 |
commit | 738ad299dfad30aeb2cfcda2e8e1b7abb6a7ea49 (patch) | |
tree | b8989bef19f88d0e29bae40dc155162fe0f21882 /misc | |
parent | 44b48ec5212fd59e54b348d139ae80b502eb7726 (diff) | |
download | FreeBSD-ports-738ad299dfad30aeb2cfcda2e8e1b7abb6a7ea49.zip FreeBSD-ports-738ad299dfad30aeb2cfcda2e8e1b7abb6a7ea49.tar.gz |
Add patch that enables portell to run correctly with Python 2.3
Approved by: roberto (mentor)
Submitted by: marcus
Diffstat (limited to 'misc')
-rw-r--r-- | misc/portell/Makefile | 1 | ||||
-rw-r--r-- | misc/portell/files/patch-aa | 49 |
2 files changed, 50 insertions, 0 deletions
diff --git a/misc/portell/Makefile b/misc/portell/Makefile index 93624fc..f736c61 100644 --- a/misc/portell/Makefile +++ b/misc/portell/Makefile @@ -16,6 +16,7 @@ DIST_SUBDIR= ${PORTNAME}-${PORTVERSION} MAINTAINER= mich@FreeBSD.org COMMENT= Quick display of FreeBSD port descriptions +PATCH_WRKSRC= ${WRKDIR} USE_PYTHON= YES USE_REINPLACE= YES diff --git a/misc/portell/files/patch-aa b/misc/portell/files/patch-aa new file mode 100644 index 0000000..cb19eaa --- /dev/null +++ b/misc/portell/files/patch-aa @@ -0,0 +1,49 @@ +--- portell.py.orig Mon Oct 22 07:18:32 2001 ++++ portell.py Mon Aug 4 16:34:27 2003 +@@ -11,8 +11,10 @@ + + try: + PORTELL_DB = os.environ['PORTELL_PATH'] ++ PORTELL_DB_FILE = PORTELL_DB + ".db" + except KeyError: +- PORTELL_DB = "/var/db/portell.db" ++ PORTELL_DB = "/var/db/portell" ++ PORTELL_DB_FILE = "/var/db/portell.db" + + PORTS_DIR = "/usr/ports/" + +@@ -23,13 +25,13 @@ + + + def update_db(): +- if os.access(PORTELL_DB, os.F_OK): +- os.unlink(PORTELL_DB) ++ if os.access(PORTELL_DB_FILE, os.F_OK): ++ os.unlink(PORTELL_DB_FILE) + try: +- d = shelve.open(PORTELL_DB) +- os.chmod(PORTELL_DB, 0666) ++ d = shelve.open(PORTELL_DB_FILE) ++ os.chmod(PORTELL_DB_FILE, 0666) + except: +- print "can't read or write %s. are you root?" % PORTELL_DB ++ print "can't read or write %s. are you root?" % PORTELL_DB_FILE + sys.exit(0) + os.path.walk(PORTS_DIR, write_pathname, d) + d.close() +@@ -46,12 +48,12 @@ + else: + portname = sys.argv[1] + +- if not os.access(PORTELL_DB, os.F_OK): +- print >> sys.stderr, "you need to create %s first." % PORTELL_DB ++ if not os.access(PORTELL_DB_FILE, os.F_OK): ++ print >> sys.stderr, "you need to create %s first." % PORTELL_DB_FILE + print >> sys.stderr, "type: %s -u" % sys.argv[0] + sys.exit(0) + +- d = shelve.open(PORTELL_DB) ++ d = shelve.open(PORTELL_DB_FILE) + + if d.has_key(portname): + descr_path = d[portname] + "/pkg-descr" |