partprobe returns with error if no disk label is present
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
parted (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Running partprobe on a disk with no disk label returns with an error in Trusty. This is not the case in Precise or Saucy, nor is it the case with parted 3.1 compiled from source. In my opinion, even if there is no disk label or partition table present, partprobe has done its job and should exit 0.
On a side note, this functionality breaks a script that I wrote, since it will fail on any error, and I would prefer to keep it that way.
Precise:
==========
matt@matt-snia:~$ lsb_release -rd
Description: Ubuntu 12.04.4 LTS
Release: 12.04
matt@matt-snia:~$ apt-cache policy parted
parted:
Installed: 2.3-8ubuntu5.1
matt@matt-snia:~$ sudo parted /dev/sdf print
Error: /dev/sdf: unrecognised disk label
matt@matt-snia:~$ sudo partprobe /dev/sdf
matt@matt-snia:~$ echo $?
0
==========
Trusty:
==========
matt@matt-test:~$ lsb_release -rd
Description: Ubuntu 14.04 LTS
Release: 14.04
matt@matt-test:~$ apt-cache policy parted
parted:
Installed: 2.3-19ubuntu1
matt@matt-test:~$ sudo parted /dev/sdb print
Error: /dev/sdb: unrecognised disk label
matt@matt-test:~$ sudo partprobe /dev/sdb
Error: /dev/sdb: unrecognised disk label
matt@matt-test:~$ echo $?
1
==========
Parted 3.1:
==========
matt@matt-
partprobe (GNU parted) 3.1
matt@matt-
matt@matt-
0
==========
I found this bug report that is contradictory to mine:
https:/ /bugs.launchpad .net/ubuntu/ +source/ parted/ +bug/1104797
Is this the expected behavior then? But if so, should Ubuntu be deviating from upstream behavior like this?