* [gentoo-osx] [PREFIX] emerge --getbinpkg prefix patch
@ 2006-06-30 18:51 Christopher Chan
2006-07-05 22:52 ` exg
0 siblings, 1 reply; 2+ messages in thread
From: Christopher Chan @ 2006-06-30 18:51 UTC (permalink / raw
To: gentoo-osx
[-- Attachment #1: Type: text/plain, Size: 112 bytes --]
I noticed that the --getbinpkg option was not prefixed, so I added
prefix to getbinpkg.py (attached).
- Chris
[-- Attachment #2: getbinpkg-prefix.patch --]
[-- Type: text/x-patch, Size: 1716 bytes --]
--- /tmp/portage-prefix-2.1.13/pym/getbinpkg.py 2006-03-23 21:15:00.000000000 -0800
+++ pym/getbinpkg.py 2006-06-28 09:40:07.000000000 -0700
@@ -26,6 +26,8 @@
except Exception, e:
sys.stderr.write(red("!!! CANNOT IMPORT HTTPLIB: ")+str(e)+"\n")
+import portage_const
+
def make_metadata_dict(data):
myid,myglob = data
@@ -419,14 +421,14 @@
keepconnection = 1
if makepickle == None:
- makepickle = "/var/cache/edb/metadata.idx.most_recent"
+ makepickle = portage_const.EPREFIX+"/var/cache/edb/metadata.idx.most_recent"
conn,protocol,address,params,headers = create_conn(baseurl, conn)
filedict = {}
try:
- metadatafile = open("/var/cache/edb/remote_metadata.pickle")
+ metadatafile = open(portage_const.EPREFIX+"/var/cache/edb/remote_metadata.pickle")
metadata = cPickle.load(metadatafile)
sys.stderr.write("Loaded metadata pickle.\n")
metadatafile.close()
@@ -500,7 +502,7 @@
sys.stderr.write("!!! Failed to read data from index: "+str(mfile)+"\n")
sys.stderr.write("!!! "+str(e)+"\n")
try:
- metadatafile = open("/var/cache/edb/remote_metadata.pickle", "w+")
+ metadatafile = open(portage_const.EPREFIX+"/var/cache/edb/remote_metadata.pickle", "w+")
cPickle.dump(metadata,metadatafile)
metadatafile.close()
except SystemExit, e:
@@ -530,7 +532,7 @@
try:
if metadata[baseurl].has_key("modified") and metadata[baseurl]["modified"]:
metadata[baseurl]["timestamp"] = int(time.time())
- metadatafile = open("/var/cache/edb/remote_metadata.pickle", "w+")
+ metadatafile = open(portage_const.EPREFIX+"/var/cache/edb/remote_metadata.pickle", "w+")
cPickle.dump(metadata,metadatafile)
metadatafile.close()
if makepickle:
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [gentoo-osx] [PREFIX] emerge --getbinpkg prefix patch
2006-06-30 18:51 [gentoo-osx] [PREFIX] emerge --getbinpkg prefix patch Christopher Chan
@ 2006-07-05 22:52 ` exg
0 siblings, 0 replies; 2+ messages in thread
From: exg @ 2006-07-05 22:52 UTC (permalink / raw
To: gentoo-osx
> I noticed that the --getbinpkg option was not prefixed, so I added
> prefix to getbinpkg.py (attached).
Thanks, I fixed it using the CACHE_PATH constant.
--
Emanuele
--
gentoo-osx@gentoo.org mailing list
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-07-05 22:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-30 18:51 [gentoo-osx] [PREFIX] emerge --getbinpkg prefix patch Christopher Chan
2006-07-05 22:52 ` exg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox