Lines 611-631
Link Here
|
611 |
if "--update" in myopts: |
611 |
if "--update" in myopts: |
612 |
add.extend(["selective","empty"]) |
612 |
add.extend(["selective","empty"]) |
613 |
if "--emptytree" in myopts: |
613 |
if "--emptytree" in myopts: |
614 |
add.extend(["empty"]) |
614 |
add.append("empty") |
615 |
sub.extend(["selective"]) |
615 |
sub.append("selective") |
616 |
if "--nodeps" in myopts: |
616 |
if "--nodeps" in myopts: |
617 |
sub.extend(["recurse"]) |
617 |
sub.append("recurse") |
618 |
if "--noreplace" in myopts: |
618 |
if "--noreplace" in myopts: |
619 |
add.extend(["selective"]) |
619 |
add.append("selective") |
620 |
if "--deep" in myopts: |
620 |
if "--deep" in myopts: |
621 |
add.extend(["deep"]) |
621 |
add.append("deep") |
622 |
if "--selective" in myopts: |
622 |
if "--selective" in myopts: |
623 |
add.extend(["selective"]) |
623 |
add.append("selective") |
624 |
if myaction in ["world","system"]: |
624 |
if myaction in ["world","system"]: |
625 |
add.extend(["selective"]) |
625 |
add.append("selective") |
|
|
626 |
if myaction == "system": |
627 |
add.append("rebuild") |
626 |
elif myaction in ["depclean"]: |
628 |
elif myaction in ["depclean"]: |
627 |
add.extend(["empty"]) |
629 |
add.append("empty") |
628 |
sub.extend(["selective"]) |
630 |
sub.append("selective") |
629 |
for x in add: |
631 |
for x in add: |
630 |
if (x not in myparams) and (x not in sub): |
632 |
if (x not in myparams) and (x not in sub): |
631 |
myparams.append(x) |
633 |
myparams.append(x) |
Lines 903-915
Link Here
|
903 |
|
905 |
|
904 |
merging=1 |
906 |
merging=1 |
905 |
if addme: |
907 |
if addme: |
906 |
# this is where we add the node to the list of packages to merge |
908 |
# this is where we add the node to the list of packages to merge |
|
|
909 |
if "rebuild" in myparams: |
910 |
|
911 |
# in rebuild mode, we will ignore that the package exists if it has a non-empty REBUILD file in its |
912 |
# /var/db/pkg/ directory. This way, a non-empty REBUILD file will cause the package to be rebuilt. |
913 |
|
914 |
dorebuild=vardbapi.aux_get(mykey, ["REBUILD"]) |
915 |
if dorebuild == []: |
916 |
#package really not on system (aux_get returns [] if its own cpv_exists() call fails |
917 |
exists = 0 |
918 |
elif dorebuild[0] == "": |
919 |
#REBUILD flag is not there, so we view it |
920 |
exists = 1 |
921 |
else: |
922 |
#REBUILD flag is there, so we pretend package isn't installed |
923 |
exists = 0 |
924 |
else: |
925 |
#perform this call once to improve performance |
926 |
exists = vardbapi.cpv_exists(mykey) |
927 |
|
928 |
|
929 |
# this is where we add the node to the list of packages to merge |
907 |
if not myparent: |
930 |
if not myparent: |
|
|
931 |
|
908 |
# command-line specified or part of a world list... |
932 |
# command-line specified or part of a world list... |
909 |
if ("self" not in myparams) or (("selective" in myparams) and vardbapi.cpv_exists(mykey)): |
933 |
if ("self" not in myparams) or (("selective" in myparams) and exists): |
910 |
# the package is on the system, so don't merge it. |
|
|
911 |
merging=0 |
934 |
merging=0 |
912 |
elif ("selective" in myparams) and vardbapi.cpv_exists(mykey): |
935 |
|
|
|
936 |
elif ("selective" in myparams) and exists: |
913 |
merging=0 |
937 |
merging=0 |
914 |
|
938 |
|
915 |
if (merging==0 and "--newuse" in myopts and vardbapi.cpv_exists(mykey)): |
939 |
if (merging==0 and "--newuse" in myopts and vardbapi.cpv_exists(mykey)): |