Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 379616 Details for
Bug 514936
install-xattr fails with "No such file or directory" if the binary to be installed has already been pax-marked
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch with fix as well as added a test case
file_514936.txt (text/plain), 2.13 KB, created by
Jason Zaman
on 2014-06-24 19:23:10 UTC
(
hide
)
Description:
patch with fix as well as added a test case
Filename:
MIME Type:
Creator:
Jason Zaman
Created:
2014-06-24 19:23:10 UTC
Size:
2.13 KB
patch
obsolete
>From 7574ad30905532748cfe2789e4434e06d6389355 Mon Sep 17 00:00:00 2001 >From: Jason Zaman <jason@perfinion.com> >Date: Tue, 24 Jun 2014 23:07:08 +0400 >Subject: [PATCH] Correctly determine dst path if src is in a dir > >There is a mismatch between how install and install-xattr determines >the destination path. > >When running `install src/a dst/' the correct output is `dst/a'. > >install-xattr was incorrectly joining the paths so thought the output >was `dst/src/a' which did not exist. > >A test case has been added to the test script too. > >Signed-off-by: Jason Zaman <jason@perfinion.com> >--- > misc/install-xattr/checkcopyattrs.sh | 11 ++++++++++- > misc/install-xattr/install-xattr.c | 2 +- > 2 files changed, 11 insertions(+), 2 deletions(-) > >diff --git a/misc/install-xattr/checkcopyattrs.sh b/misc/install-xattr/checkcopyattrs.sh >index 2e8f30f..0249013 100755 >--- a/misc/install-xattr/checkcopyattrs.sh >+++ b/misc/install-xattr/checkcopyattrs.sh >@@ -2,7 +2,7 @@ > set -e > > touch a b c >-mkdir -p d e >+mkdir -p d e f > setfattr -n user.foo -v "bar" a > setfattr -n user.bas -v "x" a > setfattr -n user.pax.flags -v "mr" a >@@ -27,6 +27,15 @@ setfattr -n user.pax.flags -v "r" c > [ "$(getfattr --only-values -n user.pax.flags d/b)" == "p" ] > [ "$(getfattr --only-values -n user.pax.flags d/c)" == "r" ] > >+# This tests if the src file was inside a directory >+# the correct dst location should be f/a. NOT f/d/a. >+./install-xattr d/a f >+ >+[ -x f/a ] >+[ ! -x f/d/a ] >+[ "$(getfattr --only-values -n user.foo f/a)" == "bar" ] >+[ "$(getfattr --only-values -n user.bas f/a)" == "x" ] >+ > ./install-xattr -t e a b c > > [ "$(getfattr --only-values -n user.foo e/a)" == "bar" ] >diff --git a/misc/install-xattr/install-xattr.c b/misc/install-xattr/install-xattr.c >index 3d70b5e..f2157fd 100644 >--- a/misc/install-xattr/install-xattr.c >+++ b/misc/install-xattr/install-xattr.c >@@ -382,7 +382,7 @@ main(int argc, char* argv[]) > if (S_ISDIR(s.st_mode)) > continue; > >- path = path_join(target, argv[i]); >+ path = path_join(target, basename(argv[i])); > copyxattr(argv[i], path); > free(path); > } >-- >1.8.5.5
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 514936
:
379594
|
379612
| 379616