[Bug 833101] Re: perf uses less at the default pager, but the linux-tools packages have no dependency for it
Packaging bug, won't fix in the kernel team. ** Changed in: linux-linaro Status: New = Won't Fix -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/833101 Title: perf uses less at the default pager, but the linux-tools packages have no dependency for it To manage notifications about this bug go to: https://bugs.launchpad.net/linaro-ubuntu/+bug/833101/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
Re: [Bug 833101] Re: perf uses less at the default pager, but the linux-tools packages have no dependency for it
On Thu, May 10, 2012 at 12:30:52PM -, Avik Sil wrote: Does this patch look OK? diff --git a/tools/perf/util/pager.c b/tools/perf/util/pager.c index 1915de2..d6f23de 100644 --- a/tools/perf/util/pager.c +++ b/tools/perf/util/pager.c @@ -57,8 +57,12 @@ void setup_pager(void) } if (!pager) pager = getenv(PAGER); - if (!pager) - pager = less; + if (!pager) { + if (!access(/usr/bin/pager, X_OK)) + pager = /usr/bin/pager; + else + pager = less; To conform to the existing code style, you might want to write the code as follows: + if (!pager) { + if (!access(/usr/bin/pager, X_OK)) + pager = /usr/bin/pager; + } + if (!pager) + pager = less; Functionally, the code looks OK to me either way. Cheers ---Dave -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/833101 Title: perf uses less at the default pager, but the linux-tools packages have no dependency for it To manage notifications about this bug go to: https://bugs.launchpad.net/linaro-ubuntu/+bug/833101/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 833101] Re: perf uses less at the default pager, but the linux-tools packages have no dependency for it
Does this patch look OK? diff --git a/tools/perf/util/pager.c b/tools/perf/util/pager.c index 1915de2..d6f23de 100644 --- a/tools/perf/util/pager.c +++ b/tools/perf/util/pager.c @@ -57,8 +57,12 @@ void setup_pager(void) } if (!pager) pager = getenv(PAGER); - if (!pager) - pager = less; + if (!pager) { + if (!access(/usr/bin/pager, X_OK)) + pager = /usr/bin/pager; + else + pager = less; + } else if (!*pager || !strcmp(pager, cat)) return; -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/833101 Title: perf uses less at the default pager, but the linux-tools packages have no dependency for it To manage notifications about this bug go to: https://bugs.launchpad.net/linaro-ubuntu/+bug/833101/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 833101] Re: perf uses less at the default pager, but the linux-tools packages have no dependency for it
Brad, does the patch in comment #11 look good here? -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/833101 Title: perf uses less at the default pager, but the linux-tools packages have no dependency for it To manage notifications about this bug go to: https://bugs.launchpad.net/linaro-ubuntu/+bug/833101/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 833101] Re: perf uses less at the default pager, but the linux-tools packages have no dependency for it
@Avik, If it's as simple as setting the PAGER environment variable, why do I want to apply the patch? If you think it's the right thing to do however, I'd suggest trying to push it upstream. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/833101 Title: perf uses less at the default pager, but the linux-tools packages have no dependency for it To manage notifications about this bug go to: https://bugs.launchpad.net/linaro-ubuntu/+bug/833101/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 833101] Re: perf uses less at the default pager, but the linux-tools packages have no dependency for it
PAGER is for customisation. A package which might not work if PAGER is not set is a broken package. However, the proposed change (http://git.linaro.org/gitweb?p=people/ynk /linux-linaro- tracking.git;a=commit;h=49561d58a14351d136518f25bd686f9a6ca41b69) has some problems. In particular, it will mess up PATH in the environment, because strtok() causes the string it is used on to be modified. Since perf runs other subprocesses, this may lead to problems. Why don't we just use /usr/bin/pager as the default? This is the whole point of the Debian alternatives system. So: If PAGER is set, try use its value. Don't bother to search: it's up to the user to specify sensible preferences. Otherwise, if /usr/bin/pager exists, use that. Otherwise, fall back to the legacy behaviour (i.e., try to run less). This should work just fine for the non-Debian folks. Cheers ---Dave -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/833101 Title: perf uses less at the default pager, but the linux-tools packages have no dependency for it To manage notifications about this bug go to: https://bugs.launchpad.net/linaro-ubuntu/+bug/833101/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 833101] Re: perf uses less at the default pager, but the linux-tools packages have no dependency for it
@Dave, I could live with something like that. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/833101 Title: perf uses less at the default pager, but the linux-tools packages have no dependency for it To manage notifications about this bug go to: https://bugs.launchpad.net/linaro-ubuntu/+bug/833101/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 833101] Re: perf uses less at the default pager, but the linux-tools packages have no dependency for it
Granted the code in perf/util/pager.c looks borked in that else if after if (!pager) doesn't look like it will ever get executed. However, if you just set your PAGER env variable to either more or cat should do the job. ** Changed in: linux (Ubuntu) Assignee: (unassigned) = Brad Figg (brad-figg) ** Changed in: linux (Ubuntu) Status: Confirmed = In Progress -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/833101 Title: perf uses less at the default pager, but the linux-tools packages have no dependency for it To manage notifications about this bug go to: https://bugs.launchpad.net/linaro-ubuntu/+bug/833101/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 833101] Re: perf uses less at the default pager, but the linux-tools packages have no dependency for it
** Changed in: linaro-ubuntu Status: Fix Committed = Fix Released -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/833101 Title: perf uses less at the default pager, but the linux-tools packages have no dependency for it To manage notifications about this bug go to: https://bugs.launchpad.net/linaro-ubuntu/+bug/833101/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 833101] Re: perf uses less at the default pager, but the linux-tools packages have no dependency for it
New patch accepted: http://git.linaro.org/gitweb?p=people/ynk/linux- linaro-tracking.git;a=commit;h=49561d58a14351d136518f25bd686f9a6ca41b69 ** Changed in: linaro-ubuntu Status: Confirmed = Fix Committed -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/833101 Title: perf uses less at the default pager, but the linux-tools packages have no dependency for it To manage notifications about this bug go to: https://bugs.launchpad.net/linaro-ubuntu/+bug/833101/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 833101] Re: perf uses less at the default pager, but the linux-tools packages have no dependency for it
** No longer affects: linux-meta (Ubuntu) -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/833101 Title: perf uses less at the default pager, but the linux-tools packages have no dependency for it To manage notifications about this bug go to: https://bugs.launchpad.net/linaro-ubuntu/+bug/833101/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 833101] Re: perf uses less at the default pager, but the linux-tools packages have no dependency for it
Patch not merged yet, moving it to 12.02 ** Changed in: linaro-ubuntu Milestone: 12.01 = 12.02 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/833101 Title: perf uses less at the default pager, but the linux-tools packages have no dependency for it To manage notifications about this bug go to: https://bugs.launchpad.net/linaro-ubuntu/+bug/833101/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 833101] Re: perf uses less at the default pager, but the linux-tools packages have no dependency for it
** Tags added: patch -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/833101 Title: perf uses less at the default pager, but the linux-tools packages have no dependency for it To manage notifications about this bug go to: https://bugs.launchpad.net/linaro-ubuntu/+bug/833101/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 833101] Re: perf uses less at the default pager, but the linux-tools packages have no dependency for it
The attached patch seems to fix the issue. ** Patch added: perf-less.patch https://bugs.launchpad.net/ubuntu/+source/linux-meta/+bug/833101/+attachment/2676642/+files/perf-less.patch -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/833101 Title: perf uses less at the default pager, but the linux-tools packages have no dependency for it To manage notifications about this bug go to: https://bugs.launchpad.net/linaro-ubuntu/+bug/833101/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 833101] Re: perf uses less at the default pager, but the linux-tools packages have no dependency for it
No update as such. Moving it to 12.01. ** Changed in: linaro-ubuntu Milestone: 11.12 = 12.01 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/833101 Title: perf uses less at the default pager, but the linux-tools packages have no dependency for it To manage notifications about this bug go to: https://bugs.launchpad.net/linaro-ubuntu/+bug/833101/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 833101] Re: perf uses less at the default pager, but the linux-tools packages have no dependency for it
Avik, any update on this one? If not yet fixed, please move it to 12.01. Thanks. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/833101 Title: perf uses less at the default pager, but the linux-tools packages have no dependency for it To manage notifications about this bug go to: https://bugs.launchpad.net/linaro-ubuntu/+bug/833101/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 833101] Re: perf uses less at the default pager, but the linux-tools packages have no dependency for it
** Changed in: linaro-ubuntu Status: New = Confirmed ** Changed in: linaro-ubuntu Milestone: 11.11 = 11.12 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/833101 Title: perf uses less at the default pager, but the linux-tools packages have no dependency for it To manage notifications about this bug go to: https://bugs.launchpad.net/linaro-ubuntu/+bug/833101/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 833101] Re: perf uses less at the default pager, but the linux-tools packages have no dependency for it
Yes, this issue is still present in 11.11 nano image. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/833101 Title: perf uses less at the default pager, but the linux-tools packages have no dependency for it To manage notifications about this bug go to: https://bugs.launchpad.net/linaro-ubuntu/+bug/833101/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 833101] Re: perf uses less at the default pager, but the linux-tools packages have no dependency for it
Thanks for confirming the issue. Will let the bug assigned to you then. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/833101 Title: perf uses less at the default pager, but the linux-tools packages have no dependency for it To manage notifications about this bug go to: https://bugs.launchpad.net/linaro-ubuntu/+bug/833101/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 833101] Re: perf uses less at the default pager, but the linux-tools packages have no dependency for it
Avik, can you check if this is still an issue with our 11.11 images? Thanks. ** Changed in: linaro-ubuntu Importance: Undecided = Medium ** Changed in: linaro-ubuntu Assignee: (unassigned) = Avik Sil (aviksil) -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/833101 Title: perf uses less at the default pager, but the linux-tools packages have no dependency for it To manage notifications about this bug go to: https://bugs.launchpad.net/linaro-ubuntu/+bug/833101/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 833101] Re: perf uses less at the default pager, but the linux-tools packages have no dependency for it
** Changed in: linaro-ubuntu Milestone: 11.10 = 11.11 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/833101 Title: perf uses less at the default pager, but the linux-tools packages have no dependency for it To manage notifications about this bug go to: https://bugs.launchpad.net/linaro-ubuntu/+bug/833101/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 833101] Re: perf uses less at the default pager, but the linux-tools packages have no dependency for it
Still present in linux-linaro-tools-3.0.0-1006 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/833101 Title: perf uses less at the default pager, but the linux-tools packages have no dependency for it To manage notifications about this bug go to: https://bugs.launchpad.net/linux-linaro/+bug/833101/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 833101] Re: perf uses less at the default pager, but the linux-tools packages have no dependency for it
** Also affects: linaro-ubuntu Importance: Undecided Status: New ** Changed in: linaro-ubuntu Milestone: None = 11.10 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/833101 Title: perf uses less at the default pager, but the linux-tools packages have no dependency for it To manage notifications about this bug go to: https://bugs.launchpad.net/linaro-ubuntu/+bug/833101/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 833101] Re: perf uses less at the default pager, but the linux-tools packages have no dependency for it
This issue only affects lightweight images which (coincidentally) don't have apport. I believe this problem should be self-explanatory, even without additional logs. ** Changed in: linux (Ubuntu) Status: Incomplete = Confirmed -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/833101 Title: perf uses less at the default pager, but the linux-tools packages have no dependency for it To manage notifications about this bug go to: https://bugs.launchpad.net/linux-linaro/+bug/833101/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 833101] Re: perf uses less at the default pager, but the linux-tools packages have no dependency for it
** Summary changed: - perf uses less at the default pager, but the linux-tools packages have dependency for it + perf uses less at the default pager, but the linux-tools packages have no dependency for it -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/833101 Title: perf uses less at the default pager, but the linux-tools packages have no dependency for it To manage notifications about this bug go to: https://bugs.launchpad.net/linux-linaro/+bug/833101/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs