All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dpkg: Use less as pager
@ 2019-06-19 10:32 Ricardo Ribalda Delgado
  2019-06-19 11:04 ` Adrian Bunk
  0 siblings, 1 reply; 3+ messages in thread
From: Ricardo Ribalda Delgado @ 2019-06-19 10:32 UTC (permalink / raw)
  To: openembedded-core, ross.burton; +Cc: Ricardo Ribalda Delgado

Debian traditionaly uses /usr/bin/pager as the system pager, which is a
link to the user preferred pager. This is a Debianism.

Without this patch:

root@qt5122:~# dpkg -l
sh: pager: command not found
dpkg-query: error: showing package list on pager subprocess returned error exit status 127

Signed-off-by: Ricardo Ribalda Delgado <ricardo@ribalda.com>
---
 meta/recipes-devtools/dpkg/dpkg.inc         |  2 +-
 meta/recipes-devtools/dpkg/dpkg/pager.patch | 21 +++++++++++++++++++++
 meta/recipes-devtools/dpkg/dpkg_1.19.4.bb   |  1 +
 3 files changed, 23 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-devtools/dpkg/dpkg/pager.patch

diff --git a/meta/recipes-devtools/dpkg/dpkg.inc b/meta/recipes-devtools/dpkg/dpkg.inc
index fee7a75814..21ebf2d926 100644
--- a/meta/recipes-devtools/dpkg/dpkg.inc
+++ b/meta/recipes-devtools/dpkg/dpkg.inc
@@ -4,7 +4,7 @@ SECTION = "base"
 
 DEPENDS = "zlib bzip2 perl ncurses"
 DEPENDS_class-native = "bzip2-replacement-native zlib-native virtual/update-alternatives-native gettext-native perl-native"
-RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} perl"
+RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} perl less"
 RDEPENDS_${PN}_class-native = ""
 
 UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/d/dpkg/"
diff --git a/meta/recipes-devtools/dpkg/dpkg/pager.patch b/meta/recipes-devtools/dpkg/dpkg/pager.patch
new file mode 100644
index 0000000000..e56b9d28af
--- /dev/null
+++ b/meta/recipes-devtools/dpkg/dpkg/pager.patch
@@ -0,0 +1,21 @@
+pager: Use less instead of pager
+
+pager is a Debianism. Istead use directly pager.
+
+Upstream-Status: Inappropriate [OE-Core integration specific]
+
+Suggested-by: Burton, Ross <ross.burton@intel.com>
+Signed-off-by: Ricardo Ribalda <ricardo@ribalda.com>
+diff --git a/lib/dpkg/dpkg.h b/lib/dpkg/dpkg.h
+index 2bb067a..6cbce80 100644
+--- a/lib/dpkg/dpkg.h
++++ b/lib/dpkg/dpkg.h
+@@ -95,7 +95,7 @@ DPKG_BEGIN_DECLS
+ #define MAXUPDATES         250
+ 
+ #define DEFAULTSHELL        "sh"
+-#define DEFAULTPAGER        "pager"
++#define DEFAULTPAGER        "less"
+ 
+ #define MD5HASHLEN           32
+ #define MAXTRIGDIRECTIVE     256
diff --git a/meta/recipes-devtools/dpkg/dpkg_1.19.4.bb b/meta/recipes-devtools/dpkg/dpkg_1.19.4.bb
index 77fbfb5c91..b83868fec0 100644
--- a/meta/recipes-devtools/dpkg/dpkg_1.19.4.bb
+++ b/meta/recipes-devtools/dpkg/dpkg_1.19.4.bb
@@ -12,6 +12,7 @@ SRC_URI = "${DEBIAN_MIRROR}/main/d/${BPN}/${BPN}_${PV}.tar.xz \
            file://0006-add-musleabi-to-known-target-tripets.patch \
            file://0007-dpkg-deb-build.c-Remove-usage-of-clamp-mtime-in-tar.patch \
            file://0001-dpkg-Support-muslx32-build.patch \
+           file://pager.patch \
            "
 SRC_URI_append_class-native = " \
                                 file://tweak-options-require-tar-1.27.patch \
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] dpkg: Use less as pager
  2019-06-19 10:32 [PATCH] dpkg: Use less as pager Ricardo Ribalda Delgado
@ 2019-06-19 11:04 ` Adrian Bunk
  2019-06-19 11:19   ` Burton, Ross
  0 siblings, 1 reply; 3+ messages in thread
From: Adrian Bunk @ 2019-06-19 11:04 UTC (permalink / raw)
  To: Ricardo Ribalda Delgado; +Cc: openembedded-core

On Wed, Jun 19, 2019 at 12:32:51PM +0200, Ricardo Ribalda Delgado wrote:
>...
> --- a/meta/recipes-devtools/dpkg/dpkg.inc
> +++ b/meta/recipes-devtools/dpkg/dpkg.inc
> @@ -4,7 +4,7 @@ SECTION = "base"
>  
>  DEPENDS = "zlib bzip2 perl ncurses"
>  DEPENDS_class-native = "bzip2-replacement-native zlib-native virtual/update-alternatives-native gettext-native perl-native"
> -RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} perl"
> +RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} perl less"
>...

Is this part actually required?
busybox also provides a less.

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] dpkg: Use less as pager
  2019-06-19 11:04 ` Adrian Bunk
@ 2019-06-19 11:19   ` Burton, Ross
  0 siblings, 0 replies; 3+ messages in thread
From: Burton, Ross @ 2019-06-19 11:19 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: Ricardo Ribalda Delgado, OE-core

I'd say we can assume that less exists.

On Wed, 19 Jun 2019 at 12:05, Adrian Bunk <bunk@stusta.de> wrote:
>
> On Wed, Jun 19, 2019 at 12:32:51PM +0200, Ricardo Ribalda Delgado wrote:
> >...
> > --- a/meta/recipes-devtools/dpkg/dpkg.inc
> > +++ b/meta/recipes-devtools/dpkg/dpkg.inc
> > @@ -4,7 +4,7 @@ SECTION = "base"
> >
> >  DEPENDS = "zlib bzip2 perl ncurses"
> >  DEPENDS_class-native = "bzip2-replacement-native zlib-native virtual/update-alternatives-native gettext-native perl-native"
> > -RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} perl"
> > +RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} perl less"
> >...
>
> Is this part actually required?
> busybox also provides a less.
>
> cu
> Adrian
>
> --
>
>        "Is there not promise of rain?" Ling Tan asked suddenly out
>         of the darkness. There had been need of rain for many days.
>        "Only a promise," Lao Er said.
>                                        Pearl S. Buck - Dragon Seed
>


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-06-19 11:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-19 10:32 [PATCH] dpkg: Use less as pager Ricardo Ribalda Delgado
2019-06-19 11:04 ` Adrian Bunk
2019-06-19 11:19   ` Burton, Ross

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.