mirror of
https://git.freebsd.org/ports.git
synced 2025-05-14 16:21:50 -04:00
- Stagify - Add LICENSE* - Remove IGNORE_TIMESTAMPS option - Handle file ownerships via pkg-plist macros - Silence superfluous warnings - Handle stripping of installed binaries - Pet portlint PR: 190120 Submitted by: mikeg@bsd-box.net (maintainer) Reviewed by: riggs Approved by: mentors (implicit), maintainer (timeout)
52 lines
1.4 KiB
C
52 lines
1.4 KiB
C
--- ./lapply.c.orig 2010-12-13 04:42:49.000000000 +0100
|
|
+++ ./lapply.c 2014-06-29 12:15:04.246544121 +0200
|
|
@@ -651,27 +651,37 @@
|
|
filechecklist:
|
|
if ( head == NULL ) {
|
|
if ( unlink( path ) != 0 ) {
|
|
- perror( path );
|
|
- goto error2;
|
|
- }
|
|
- if ( !quiet && !showprogress ) {
|
|
- printf( "%s: deleted\n", path );
|
|
- }
|
|
- if ( showprogress ) {
|
|
- progressupdate( PROGRESSUNIT, path );
|
|
- }
|
|
- } else {
|
|
- if ( ischildcase( path, head->path, case_sensitive )) {
|
|
- if ( unlink( path ) != 0 ) {
|
|
+ if ( !force || errno != ENOENT ) {
|
|
perror( path );
|
|
goto error2;
|
|
}
|
|
+ fprintf( stderr, "Warning: failed to remove %s: %s\n",
|
|
+ path, strerror( errno ));
|
|
+ } else {
|
|
if ( !quiet && !showprogress ) {
|
|
printf( "%s: deleted\n", path );
|
|
}
|
|
if ( showprogress ) {
|
|
progressupdate( PROGRESSUNIT, path );
|
|
}
|
|
+ }
|
|
+ } else {
|
|
+ if ( ischildcase( path, head->path, case_sensitive )) {
|
|
+ if ( unlink( path ) != 0 ) {
|
|
+ if ( !force || errno != ENOENT ) {
|
|
+ perror( path );
|
|
+ goto error2;
|
|
+ }
|
|
+ fprintf( stderr, "Warning: failed to remove %s: "
|
|
+ "%s\n", path, strerror( errno ));
|
|
+ } else {
|
|
+ if ( !quiet && !showprogress ) {
|
|
+ printf( "%s: deleted\n", path );
|
|
+ }
|
|
+ if ( showprogress ) {
|
|
+ progressupdate( PROGRESSUNIT, path );
|
|
+ }
|
|
+ }
|
|
} else {
|
|
/* remove head */
|
|
if ( rmdir( head->path ) != 0 ) {
|