Public bug reported:

I've got a script that includes "parted <device> print" in a pipeline
with other things processing the output.  This works fine usually, but I
just saw the error

Error: The backup GPT table is corrupt, but the primary appears OK, so
that will be used.

and processing appeared to freeze because the following "OK/Cancel" does
not include a newline and the pipeline held it in a buffer so it never
appeared on the console.  There would be no way to answer anyway.

So consider this two or three feature requests:
- Since the message says "that one will be used" make to program just do that 
(it's just a "print" after all.)
- Provide an option to assume "yes" for such questions (or to assume cancel")
- Provide a command to fix the broken table with data from the good one

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: parted 3.3-4
ProcVersionSignature: Ubuntu 5.4.0-48.52-generic 5.4.60
Uname: Linux 5.4.0-48-generic x86_64
ApportVersion: 2.20.11-0ubuntu27.9
Architecture: amd64
CasperMD5CheckResult: skip
Date: Sun Oct 18 11:16:37 2020
InstallationDate: Installed on 2020-09-19 (29 days ago)
InstallationMedia: Xubuntu 20.04 LTS "Focal Fossa" - Release amd64 (20200423)
SourcePackage: parted
UpgradeStatus: No upgrade log present (probably fresh install)

** Affects: parted (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug focal

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1900344

Title:
  Error behavior in "print" command does not work well in a pipeline

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/parted/+bug/1900344/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to