SHA256
1
0
forked from pool/coreutils
OBS User unknown 2008-01-07 11:24:05 +00:00 committed by Git OBS Bridge
parent 3b98ba0aad
commit 63063c2e49
3 changed files with 69 additions and 2 deletions

View File

@ -0,0 +1,58 @@
---
src/cp.c | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
Index: b/src/cp.c
===================================================================
--- a/src/cp.c
+++ b/src/cp.c
@@ -404,6 +404,7 @@ make_dir_parents_private (char const *co
slash++;
while ((slash = strchr (slash, '/')))
{
+ int src_errno;
/* Add this directory to the list of directories whose modes need
fixing later. */
struct dir_attr *new = xmalloc (sizeof *new);
@@ -413,12 +414,22 @@ make_dir_parents_private (char const *co
*attr_list = new;
*slash = '\0';
+ src_errno = (stat (src, &new->st) != 0
+ ? errno
+ : S_ISDIR (new->st.st_mode)
+ ? 0
+ : ENOTDIR);
+ if (src_errno)
+ {
+ error (0, src_errno, _("failed to get attributes of %s"),
+ quote (src));
+ return false;
+ }
if (stat (dir, &stats) != 0)
{
mode_t src_mode;
mode_t omitted_permissions;
mode_t mkdir_mode;
- int src_errno;
/* This component does not exist. We must set
*new_dst and new->st.st_mode inside this loop because,
@@ -426,17 +437,6 @@ make_dir_parents_private (char const *co
make_dir_parents_private creates only e_dir/../a if
./b already exists. */
*new_dst = true;
- src_errno = (stat (src, &new->st) != 0
- ? errno
- : S_ISDIR (new->st.st_mode)
- ? 0
- : ENOTDIR);
- if (src_errno)
- {
- error (0, src_errno, _("failed to get attributes of %s"),
- quote (src));
- return false;
- }
src_mode = new->st.st_mode;
/* If the ownership or special mode bits might change,

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Mon Jan 7 11:12:01 CET 2008 - jblunck@suse.de
- fix a cp bug with -p --parents
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Dec 12 11:27:08 CET 2007 - rguenther@suse.de Wed Dec 12 11:27:08 CET 2007 - rguenther@suse.de

View File

@ -1,7 +1,7 @@
# #
# spec file for package coreutils (Version 6.9.90) # spec file for package coreutils (Version 6.9.90)
# #
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany. # Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine # This file and all modifications and additions to the pristine
# package are under the same license as the package itself. # package are under the same license as the package itself.
# #
@ -20,7 +20,7 @@ Obsoletes: libselinux <= 1.23.11-3 libselinux-32bit >= 9 libselinux-64bit =
AutoReqProv: on AutoReqProv: on
PreReq: %{install_info_prereq} PreReq: %{install_info_prereq}
Version: 6.9.90 Version: 6.9.90
Release: 6 Release: 9
Summary: GNU Core Utilities Summary: GNU Core Utilities
Source: coreutils-%{version}.tar.bz2 Source: coreutils-%{version}.tar.bz2
Source1: su.pamd Source1: su.pamd
@ -39,6 +39,7 @@ Patch20: coreutils-6.8-su.diff
Patch21: coreutils-6.8.0-pie.diff Patch21: coreutils-6.8.0-pie.diff
Patch22: coreutils-5.3.0-sbin4su.diff Patch22: coreutils-5.3.0-sbin4su.diff
Patch23: coreutils-getaddrinfo.diff Patch23: coreutils-getaddrinfo.diff
Patch24: coreutils-6.9.90-preserve_mode-fix.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description %description
@ -107,6 +108,7 @@ Authors:
%patch21 %patch21
%patch22 %patch22
%patch23 -p1 %patch23 -p1
%patch24 -p1
%build %build
AUTOPOINT=true autoreconf -fi AUTOPOINT=true autoreconf -fi
@ -171,6 +173,8 @@ rm -rf $RPM_BUILD_ROOT
%dir %{_prefix}/share/locale/*/LC_TIME %dir %{_prefix}/share/locale/*/LC_TIME
%changelog %changelog
* Mon Jan 07 2008 - jblunck@suse.de
- fix a cp bug with -p --parents
* Wed Dec 12 2007 - rguenther@suse.de * Wed Dec 12 2007 - rguenther@suse.de
- adjust test-getaddrinfo to not fail w/o network connection - adjust test-getaddrinfo to not fail w/o network connection
* Mon Dec 10 2007 - ro@suse.de * Mon Dec 10 2007 - ro@suse.de