All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andreas Henriksson <andreas@fatal.se>
To: Ron <ron@debian.org>, 785116@bugs.debian.org
Cc: util-linux@vger.kernel.org
Subject: Re: Bug#785116: util-linux: blkid -s returns too much information
Date: Wed, 13 May 2015 08:36:04 +0200	[thread overview]
Message-ID: <20150513063604.GA466@fatal.se> (raw)
In-Reply-To: <20150512132634.1127.8640.reportbug@hex.shelbyville.oz>

Hello Ron!

On Tue, May 12, 2015 at 10:56:34PM +0930, Ron wrote:
> Package: util-linux
> Version: 2.25.2-6
> Severity: important
> 
> Hi, 
> 
> Sometime between wheezy and jessie, it appears blkid -s got broken.
> In jessie it now does this:
> 
>  # blkid -s UUID -o export /dev/sdb1
>  DEVNAME=/dev/sdb1
>  UUID=fb936a62-4a21-4cc5-a55e-da21aa3f6685

The reason DEVNAME is printed is because you're using the export
output format.

This behaviour was introduced in:

commit dab33573876270fec7550252bcc29c34e9ad3889
Author: Karel Zak <kzak@redhat.com>
Date:   Fri Mar 2 14:05:26 2012 +0100

    blkid: add DEVNAME= to export output format
    
    Reported-by: Balamurugan Arumugam <barumuga@redhat.com>
    Signed-off-by: Karel Zak <kzak@redhat.com>

diff --git a/misc-utils/blkid.c b/misc-utils/blkid.c
index b0524ca..dfdb8b9 100644
--- a/misc-utils/blkid.c
+++ b/misc-utils/blkid.c
@@ -310,6 +310,8 @@ static void print_value(int output, int num, const char *devname,
                print_udev_format(name, value);
 
        } else if (output & OUTPUT_EXPORT_LIST) {
+               if (num == 1 && devname)
+                       printf("DEVNAME=%s\n", devname);
                fputs(name, stdout);
                fputs("=", stdout);
                safe_print(value, valsz);

Apparently this behaviour is established since a very long time:
$ git describe dab33573876270fec7550252bcc29c34e9ad3889
v2.21-40-gdab3357
Possibly changing the output format now could be risky.
It's very unfortunate that Debian has lagged so long with updating
util-linux which means we notice these things so long after they
appeared.

> 
> Which is a bit unfortunate when the reason for doing that was to get
> the UUID for an fstab entry in an installer preseed file :)

Lets ask upstream if DEVNAME is considered a tag which should
be included in the tag filtering.... CCed.

Regards,
Andreas Henriksson

       reply	other threads:[~2015-05-13  6:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20150512132634.1127.8640.reportbug@hex.shelbyville.oz>
2015-05-13  6:36 ` Andreas Henriksson [this message]
2015-05-13 10:37   ` Bug#785116: util-linux: blkid -s returns too much information Karel Zak
2015-05-13 21:20     ` Ron
2015-05-14  6:30       ` Karel Zak
2015-05-15  9:35       ` Andreas Henriksson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150513063604.GA466@fatal.se \
    --to=andreas@fatal.se \
    --cc=785116@bugs.debian.org \
    --cc=ron@debian.org \
    --cc=util-linux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.