Lines 4608-4628
Link Here
|
4608 |
if not cps: |
4608 |
if not cps: |
4609 |
#invalid cat/pkg-v |
4609 |
#invalid cat/pkg-v |
4610 |
return 0 |
4610 |
return 0 |
4611 |
for o_cpv in suffix_array(self.overlays,"/"+cps[0]+"/"+cps[1]+"/"+cps2[1]+".ebuild"): |
4611 |
for cpv in suffix_array([self.root]+self.overlays,"/"+cps[0]+"/"+cps[1]+"/"+cps2[1]+".ebuild"): |
4612 |
if os.path.exists(o_cpv): |
4612 |
if os.path.exists(cpv): |
4613 |
return 1 |
4613 |
return 1 |
4614 |
if os.path.exists(self.root+"/"+cps[0]+"/"+cps[1]+"/"+cps2[1]+".ebuild"): |
|
|
4615 |
return 1 |
4616 |
return 0 |
4614 |
return 0 |
4617 |
|
4615 |
|
4618 |
def cp_all(self): |
4616 |
def cp_all(self): |
4619 |
"returns a list of all keys in our tree" |
4617 |
"returns a list of all keys in our tree" |
4620 |
biglist=[] |
4618 |
biglist=[] |
4621 |
for x in categories: |
4619 |
for x in categories: |
4622 |
for y in listdir(self.root+"/"+x,EmptyOnError=1,ignorecvs=1): |
4620 |
for root in [self.root]+self.overlays: |
4623 |
biglist.append(x+"/"+y) |
4621 |
for y in listdir(root+"/"+x,EmptyOnError=1,ignorecvs=1): |
4624 |
for oroot in self.overlays: |
|
|
4625 |
for y in listdir(oroot+"/"+x,EmptyOnError=1,ignorecvs=1): |
4626 |
mykey=x+"/"+y |
4622 |
mykey=x+"/"+y |
4627 |
if not mykey in biglist: |
4623 |
if not mykey in biglist: |
4628 |
biglist.append(mykey) |
4624 |
biglist.append(mykey) |
Lines 4630-4660
Link Here
|
4630 |
|
4626 |
|
4631 |
def p_list(self,mycp): |
4627 |
def p_list(self,mycp): |
4632 |
returnme=[] |
4628 |
returnme=[] |
4633 |
for x in listdir(self.root+"/"+mycp,EmptyOnError=1): |
4629 |
ignorecvs=0 |
4634 |
if x[-7:]==".ebuild": |
4630 |
for root in [self.root]+self.overlays: |
4635 |
returnme.append(x[:-7]) |
4631 |
for x in listdir(root+"/"+mycp,EmptyOnError=1,ignorecvs=ignorecvs): |
4636 |
for oroot in self.overlays: |
|
|
4637 |
for x in listdir(oroot+"/"+mycp,EmptyOnError=1,ignorecvs=1): |
4638 |
if x[-7:]==".ebuild": |
4632 |
if x[-7:]==".ebuild": |
4639 |
mye=x[:-7] |
4633 |
mye=x[:-7] |
4640 |
if not mye in returnme: |
4634 |
if not mye in returnme: |
4641 |
returnme.append(mye) |
4635 |
returnme.append(mye) |
|
|
4636 |
ignorecvs=1 |
4642 |
return returnme |
4637 |
return returnme |
4643 |
|
4638 |
|
4644 |
def cp_list(self,mycp,use_cache=1): |
4639 |
def cp_list(self,mycp,use_cache=1): |
4645 |
mysplit=mycp.split("/") |
4640 |
mysplit=mycp.split("/") |
4646 |
returnme=[] |
4641 |
returnme=[] |
4647 |
list=listdir(self.root+"/"+mycp,EmptyOnError=1) |
4642 |
ignorecvs=0 |
4648 |
if list: |
4643 |
for root in [self.root]+self.overlays: |
4649 |
for x in list: |
4644 |
for x in listdir(root+"/"+mycp,EmptyOnError=1,ignorecvs=ignorecvs): |
4650 |
if x[-7:]==".ebuild": |
|
|
4651 |
returnme.append(mysplit[0]+"/"+x[:-7]) |
4652 |
for oroot in self.overlays: |
4653 |
for x in listdir(oroot+"/"+mycp,EmptyOnError=1,ignorecvs=1): |
4654 |
if x[-7:]==".ebuild": |
4645 |
if x[-7:]==".ebuild": |
4655 |
mycp=mysplit[0]+"/"+x[:-7] |
4646 |
addcp=mysplit[0]+"/"+x[:-7] |
4656 |
if not mycp in returnme: |
4647 |
if not addcp in returnme: |
4657 |
returnme.append(mycp) |
4648 |
returnme.append(addcp) |
|
|
4649 |
ignorecvs=1 |
4658 |
return returnme |
4650 |
return returnme |
4659 |
|
4651 |
|
4660 |
def freeze(self): |
4652 |
def freeze(self): |