FreeBSD Bugzilla – Attachment 148596 Details for
Bug 194567
[PATCH] sysutils/bsdadminscripts - distviper deletes all distfiles if /usr/ports is a symlink
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Adds a -H to all uses of find(1) in distviper so symlinks are handled correctly
distviper.diff (text/plain), 1.16 KB, created by
rwmaillists
on 2014-10-23 22:37:58 UTC
(
hide
)
Description:
Adds a -H to all uses of find(1) in distviper so symlinks are handled correctly
Filename:
MIME Type:
Creator:
rwmaillists
Created:
2014-10-23 22:37:58 UTC
Size:
1.16 KB
patch
obsolete
>--- src/distviper.orig 2009-03-23 15:17:08.000000000 +0000 >+++ src/distviper 2014-10-23 22:58:26.000000000 +0100 >@@ -129,7 +129,7 @@ > # The direcotry holding the ports tree. > # > getDistFiles_thorough() { >- find "$portsdir" -type f -name distinfo | \ >+ find -H "$portsdir" -type f -name distinfo | \ > eval "xargs $extractFileCmd" | uniq > } > >@@ -198,11 +198,11 @@ > fi > > # Files before deletion. >-filesCount="$(($(find "$distdir" -type f|wc -l)))" >+filesCount="$(($(find -H "$distdir" -type f|wc -l)))" > filesDelete=0 > > # Seek and destroy files not in the $keepFiles list. >-for file in $(find "$distdir" -type f); { >+for file in $(find -H "$distdir" -type f); { > file="${file#$distdir/}" > > if (echo "$keepFiles" | grep -qx "$file"); then >@@ -215,9 +215,9 @@ > } > > # The number of deleted files >-filesDeleted="$(($filesCount - $(find "$distdir" -type f|wc -l)))" >+filesDeleted="$(($filesCount - $(find -H "$distdir" -type f|wc -l)))" > >-test -z "$demo" && find -d "$distdir" -type d -exec rmdir \{} \; 2> /dev/null >+test -z "$demo" && find -H -d "$distdir" -type d -exec rmdir \{} \; 2> /dev/null > > if [ -n "$verbose" ]; then > echo "$filesDelete files were suggested for deletion."
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 194567
: 148596 |
148676