Lines 7158-7170
Link Here
|
7158 |
writemsg_stdout("--- cfgpro %s %s\n" % (pkgfiles[objkey][0], obj)) |
7158 |
writemsg_stdout("--- cfgpro %s %s\n" % (pkgfiles[objkey][0], obj)) |
7159 |
continue |
7159 |
continue |
7160 |
|
7160 |
|
|
|
7161 |
# Don't unlink symlinks to directories here since that can |
7162 |
# remove /lib and /usr/lib symlinks. |
7161 |
if unmerge_orphans and \ |
7163 |
if unmerge_orphans and \ |
7162 |
lstatobj and not stat.S_ISDIR(lstatobj.st_mode) and \ |
7164 |
lstatobj and not stat.S_ISDIR(lstatobj.st_mode) and \ |
|
|
7165 |
not (islink and statobj and stat.S_ISDIR(statobj.st_mode)) and \ |
7163 |
not self.isprotected(obj): |
7166 |
not self.isprotected(obj): |
7164 |
try: |
7167 |
try: |
7165 |
# Remove permissions to ensure that any hardlinks to |
7168 |
# Remove permissions to ensure that any hardlinks to |
7166 |
# suid/sgid files are rendered harmless. |
7169 |
# suid/sgid files are rendered harmless. |
7167 |
if statobj: |
7170 |
if statobj and not islink: |
7168 |
os.chmod(obj, 0) |
7171 |
os.chmod(obj, 0) |
7169 |
os.unlink(obj) |
7172 |
os.unlink(obj) |
7170 |
except EnvironmentError, e: |
7173 |
except EnvironmentError, e: |
Lines 7186-7191
Link Here
|
7186 |
if not islink: |
7189 |
if not islink: |
7187 |
writemsg_stdout("--- !sym %s %s\n" % ("sym", obj)) |
7190 |
writemsg_stdout("--- !sym %s %s\n" % ("sym", obj)) |
7188 |
continue |
7191 |
continue |
|
|
7192 |
# Don't unlink symlinks to directories here since that can |
7193 |
# remove /lib and /usr/lib symlinks. |
7194 |
if statobj and stat.S_ISDIR(statobj.st_mode): |
7195 |
writemsg_stdout("--- !sym %s %s\n" % ("sym", obj)) |
7196 |
continue |
7189 |
try: |
7197 |
try: |
7190 |
os.unlink(obj) |
7198 |
os.unlink(obj) |
7191 |
writemsg_stdout("<<< %s %s\n" % ("sym",obj)) |
7199 |
writemsg_stdout("<<< %s %s\n" % ("sym",obj)) |