[arch-commits] Commit in util-linux/trunk (2 files)

Christian Hesse eworm at archlinux.org
Thu Jun 27 10:10:10 UTC 2019


    Date: Thursday, June 27, 2019 @ 10:10:10
  Author: eworm
Revision: 356953

upgpkg: util-linux 2.34-3

lsblk: force to print PKNAME for partition

Added:
  util-linux/trunk/0001-lsblk-force-to-print-PKNAME-for-partition.patch
Modified:
  util-linux/trunk/PKGBUILD

------------------------------------------------------+
 0001-lsblk-force-to-print-PKNAME-for-partition.patch |   31 +++++++++++++++++
 PKGBUILD                                             |   10 ++++-
 2 files changed, 40 insertions(+), 1 deletion(-)

Added: 0001-lsblk-force-to-print-PKNAME-for-partition.patch
===================================================================
--- 0001-lsblk-force-to-print-PKNAME-for-partition.patch	                        (rev 0)
+++ 0001-lsblk-force-to-print-PKNAME-for-partition.patch	2019-06-27 10:10:10 UTC (rev 356953)
@@ -0,0 +1,31 @@
+From e3bb9bfb76c17b1d05814436ced62c05c4011f48 Mon Sep 17 00:00:00 2001
+From: Karel Zak <kzak at redhat.com>
+Date: Thu, 27 Jun 2019 09:22:18 +0200
+Subject: [PATCH 1/1] lsblk: force to print PKNAME for partition
+
+PKNAME (parent kernel device name) is based on printed tree according
+to parent -> child relationship. The tree is optional and not printed
+if partition specified (.e.g "lsblk -o+PKNAME /dev/sda1"), but old
+versions print the PKNAME also in this case.
+
+Addresses: https://github.com/karelzak/util-linux/issues/813
+Signed-off-by: Karel Zak <kzak at redhat.com>
+Signed-off-by: Christian Hesse <mail at eworm.de>
+---
+ misc-utils/lsblk.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/misc-utils/lsblk.c b/misc-utils/lsblk.c
+index e95af7af0..3ce6da730 100644
+--- a/misc-utils/lsblk.c
++++ b/misc-utils/lsblk.c
+@@ -1019,6 +1019,9 @@ static void device_to_scols(
+ 	DBG(DEV, ul_debugobj(dev, "add '%s' to scols", dev->name));
+ 	ON_DBG(DEV, if (ul_path_isopen_dirfd(dev->sysfs)) ul_debugobj(dev, " %s ---> is open!", dev->name));
+ 
++	if (!parent && dev->wholedisk)
++		parent = dev->wholedisk;
++
+ 	/* Do not print device more than one in --list mode */
+ 	if (!(lsblk->flags & LSBLK_TREE) && dev->is_printed)
+ 		return;

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2019-06-27 10:08:09 UTC (rev 356952)
+++ PKGBUILD	2019-06-27 10:10:10 UTC (rev 356953)
@@ -6,7 +6,7 @@
 pkgname=(util-linux libutil-linux)
 _pkgmajor=2.34
 pkgver=${_pkgmajor}
-pkgrel=2
+pkgrel=3
 pkgdesc="Miscellaneous system utilities for Linux"
 url='https://github.com/karelzak/util-linux'
 arch=('x86_64')
@@ -15,6 +15,7 @@
 options=('strip' 'debug')
 validpgpkeys=('B0C64D14301CC6EFAEDF60E4E4B71D5EEC39C284')  # Karel Zak
 source=("https://www.kernel.org/pub/linux/utils/util-linux/v$_pkgmajor/$pkgbase-$pkgver.tar."{xz,sign}
+        '0001-lsblk-force-to-print-PKNAME-for-partition.patch'
         pam-{login,common,runuser,su}
         'util-linux.sysusers'
         '60-rfkill.rules'
@@ -22,6 +23,7 @@
         'rfkill-block_.service')
 sha256sums=('743f9d0c7252b6db246b659c1e1ce0bd45d8d4508b4dfa427bbb4a3e9b9f62b5'
             'SKIP'
+            'cfadc020011f88c028dc50c4e6790f5bae385b881417d917a8706c6ff78613d9'
             '993a3096c2b113e6800f2abbd5d4233ebf1a97eef423990d3187d665d3490b92'
             'fc6807842f92e9d3f792d6b64a0d5aad87995a279153ab228b1b2a64d9f32f20'
             '95b7cdc4cba17494d7b87f37f8d0937ec54c55de0e3ce9d9ab05ad5cc76bf935'
@@ -31,6 +33,12 @@
             '8ccec10a22523f6b9d55e0d6cbf91905a39881446710aa083e935e8073323376'
             'a22e0a037e702170c7d88460cc9c9c2ab1d3e5c54a6985cd4a164ea7beff1b36')
 
+prepare() {
+  cd "$pkgbase-$pkgver"
+
+  patch -Np1 < ../0001-lsblk-force-to-print-PKNAME-for-partition.patch
+}
+
 build() {
   cd "$pkgbase-$pkgver"
 



More information about the arch-commits mailing list