Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

more output, default to print all #221

Closed
wants to merge 1 commit into from

Conversation

vanhauser-thc
Copy link

if several -print-... options are given it is unclear which output refers to what as everything is just printed as printf("<item>\n");. This puts an identified before the entry to clarify this.

If a lib for removing was not found, no error/warning was given, this adds a success/failure message.

Also if no parameters are given it defaults to "print all", which is less to type and more convenient than a no-op as previously.

I did these changes just for me, if you like them accept, if not its fine :)

@@ -1585,7 +1591,7 @@ template<class ElfFile>
static void patchElf2(ElfFile && elfFile, const FileContents & fileContents, std::string fileName)
{
if (printInterpreter)
printf("%s\n", elfFile.getInterpreter().c_str());
printf("INTERPRETER: %s\n", elfFile.getInterpreter().c_str());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry. We cannot merge this as this would break our use in nixpkgs, which expects no prefix in many places.

@Mic92
Copy link
Member

Mic92 commented Aug 10, 2021

In particular it breaks the following usecase:

$ foo=$(patchelf --print-interpreter /run/current-system/sw/bin/ls)
$ echo $foo
/nix/store/cvr0kjg2q7z2wwhjblx6c73rv422k8cm-glibc-2.33-47/lib/ld-linux-x86-64.so.2

@Mic92 Mic92 closed this Aug 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants