Public bug reported:

(Please, see also this Debian Bug: <https://www.mail-archive.com/debian-
bugs-d...@lists.debian.org/msg1800428.html>)

Dear Maintainer(s) (and please sorry for my bad English),
I also found on some attempts to use ddru_findbad are
failing for me like this:

    ...
    /usr/bin/ddru_findbad: 1028: arithmetic expression: expecting ')': " 
(698,64-/dev/loop8:) "

I also used as workarounds instead "export LANG=C" before using it
"export LC_ALL=C", "export LC_ALL=C.utf8" or "export LC_ALL=POSIX",
where "export LC_ALL=C" is 2 or 3 seconds slower than the other
solutions.

A minimal improvement might be this (one from the three workarounds):
/usr/bin/ddru_findbad:1012
-        LANG=C $GFDISK -lu "$TARGET" | grep -a "$TARGET" | grep -a -v Disk >
tempddrfdisk
+        LC_ALL=POSIX $GFDISK -lu "$TARGET" | grep -a "$TARGET" | grep -a -v 
Disk >
tempddrfdisk

Kind regards,
linux_joy

Used Terminal Commands under the Lubuntu-24.04-Live-DVD-ISO (I first tried with 
the ddru_findbad.sh-Script, which i had downloaded from 
<https://sourceforge.net/projects/ddrutility/> and then succsessfully processed 
under Fedora 40):
(Please, see also the attached file 
"20241017_ddrutility__ddru_findbad__Terminal-Log_for_Launchpad-Bug-Report.txt":)

locale
locale charmap
locale -a
sudo apt-get install gddrescue
apt show sleuthkit
apt show gddrescue
sudo apt-get install ddrutility
bash
locale
echo $LANG
ls -al
exit
cd /media/lubuntu/...
ls -al
bash
mkdir sh__Local_Package__LANG=de_DE.UTF-8
cd sh__Local_Package__LANG=de_DE.UTF-8
cp 
/media/lubuntu/.../Fedora-40_Datenrettung/ddrutility-Paket/ddrutility-2.8/ddru_findbad.sh
 .
ls -al
locale
sudo sh ddru_findbad.sh /media/lubuntu/.../disk.img /media/lubuntu/.../disk.log
fdisk -lu /media/lubuntu/.../disk.img | grep /media/lubuntu/.../disk.img
sudo fdisk -lu /media/lubuntu/.../disk.img | grep /media/lubuntu/.../disk.img
exit
bash
mkdir bash__Local_Package__LANG=de_DE.UTF-8
cd bash__Local_Package__LANG=de_DE.UTF-8
cp 
/media/lubuntu/.../Fedora-40_Datenrettung/ddrutility-Paket/ddrutility-2.8/ddru_findbad.sh
 .
ls -al
locale
sudo bash ddru_findbad.sh /media/lubuntu/.../disk.img 
/media/lubuntu/.../disk.log
fdisk -lu /media/lubuntu/.../disk.img | grep /media/lubuntu/.../disk.img
exit
bash
exit
lacale -a
locale -a
bash
mkdir sh__Local_Package__LC_ALL=C
cd sh__Local_Package__LC_ALL=C
cp 
/media/lubuntu/.../Fedora-40_Datenrettung/ddrutility-Paket/ddrutility-2.8/ddru_findbad.sh
 .
ls -al
locale
export LC_ALL=C
locale
sudo sh ddru_findbad.sh /media/lubuntu/.../disk.img /media/lubuntu/.../disk.log
fdisk -lu /media/lubuntu/.../disk.img | grep /media/lubuntu/.../disk.img
exit
bash
mkdir bash__Local_Package__LC_ALL=C
cd bash__Local_Package__LC_ALL=C
cp 
/media/lubuntu/.../Fedora-40_Datenrettung/ddrutility-Paket/ddrutility-2.8/ddru_findbad.sh
 .
ls -al
locale
export LC_ALL=C
locale
sudo bash ddru_findbad.sh /media/lubuntu/.../disk.img 
/media/lubuntu/.../disk.log
fdisk -lu /media/lubuntu/.../disk.img | grep /media/lubuntu/.../disk.img
exit
locale -a
bash
mkdir sh__Local_Package__LC_ALL=C.utf8
cd sh__Local_Package__LC_ALL=C.utf8
cp 
/media/lubuntu/.../Fedora-40_Datenrettung/ddrutility-Paket/ddrutility-2.8/ddru_findbad.sh
 .
ls -al
locale
export LC_ALL=C.utf8
locale
sudo sh ddru_findbad.sh /media/lubuntu/.../disk.img /media/lubuntu/.../disk.log
fdisk -lu /media/lubuntu/.../disk.img | grep /media/lubuntu/.../disk.img
exit
bash
mkdir bash__Local_Package__LC_ALL=C.utf8
cd bash__Local_Package__LC_ALL=C.utf8
cp 
/media/lubuntu/.../Fedora-40_Datenrettung/ddrutility-Paket/ddrutility-2.8/ddru_findbad.sh
 .
ls -al
locale
export LC_ALL=C.utf8
locale
sudo bash ddru_findbad.sh /media/lubuntu/.../disk.img 
/media/lubuntu/.../disk.log
fdisk -lu /media/lubuntu/.../disk.img | grep /media/lubuntu/.../disk.img
exit
locale -a
bash
mkdir sh__Local_Package__LC_ALL=POSIX
cd sh__Local_Package__LC_ALL=POSIX
cp 
/media/lubuntu/.../Fedora-40_Datenrettung/ddrutility-Paket/ddrutility-2.8/ddru_findbad.sh
 .
ls -al
locale
export LC_ALL=POSIX
locale
sudo sh ddru_findbad.sh /media/lubuntu/.../disk.img /media/lubuntu/.../disk.log
fdisk -lu /media/lubuntu/.../disk.img | grep /media/lubuntu/.../disk.img
exit
bash
mkdir bash__Local_Package__LC_ALL=POSIX
cd bash__Local_Package__LC_ALL=POSIX
cp 
/media/lubuntu/.../Fedora-40_Datenrettung/ddrutility-Paket/ddrutility-2.8/ddru_findbad.sh
 .
ls -al
locale
export LC_ALL=POSIX
locale
sudo bash ddru_findbad.sh /media/lubuntu/.../disk.img 
/media/lubuntu/.../disk.log
fdisk -lu /media/lubuntu/.../disk.img | grep /media/lubuntu/.../disk.img
exit
locale -a
bash
mkdir Ubuntu-24.04-Package__Original__LANG=C
cd Ubuntu-24.04-Package__Original__LANG=C
locale
cat --number /usr/bin/ddru_findbad | grep 1012
sudo ddru_findbad /media/lubuntu/.../disk.img /media/lubuntu/.../disk.log
fdisk -lu /media/lubuntu/.../disk.img | grep /media/lubuntu/.../disk.img
exit
bash
mkdir Ubuntu-24.04-Package__LC_ALL=C
cd Ubuntu-24.04-Package__LC_ALL=C
locale
cat --number /usr/bin/ddru_findbad | grep 1012
sudo nano /usr/bin/ddru_findbad
cat --number /usr/bin/ddru_findbad | grep 1012
locale
sudo ddru_findbad /media/lubuntu/.../disk.img /media/lubuntu/.../disk.log
fdisk -lu /media/lubuntu/.../disk.img | grep /media/lubuntu/.../disk.img
exit
bash
mkdir Ubuntu-24.04-Package__LC_ALL=C.utf8
cd Ubuntu-24.04-Package__LC_ALL=C.utf8
locale
cat --number /usr/bin/ddru_findbad | grep 1012
sudo nano /usr/bin/ddru_findbad
cat --number /usr/bin/ddru_findbad | grep 1012
locale
sudo ddru_findbad /media/lubuntu/.../disk.img /media/lubuntu/.../disk.log
fdisk -lu /media/lubuntu/.../disk.img | grep /media/lubuntu/.../disk.img
exit
bash
mkdir Ubuntu-24.04-Package__LC_ALL=POSIX
cd Ubuntu-24.04-Package__LC_ALL=POSIX
locale
cat --number /usr/bin/ddru_findbad | grep 1012
sudo nano /usr/bin/ddru_findbad
cat --number /usr/bin/ddru_findbad | grep 1012
locale
sudo ddru_findbad /media/lubuntu/.../disk.img /media/lubuntu/.../disk.log
fdisk -lu /media/lubuntu/.../disk.img | grep /media/lubuntu/.../disk.img
exit
cat --number 
/media/lubuntu/.../Fedora-40_Datenrettung/ddrutility-Paket/ddrutility-2.8/ddru_findbad.sh
 | grep 1012
cd
cd /media/lubuntu/...
locale -a
mkdir Ubuntu-24.04-Package__Tries_With_LC_ALL
cd Ubuntu-24.04-Package__Tries_With_LC_ALL
locale
cat --number /usr/bin/ddru_findbad | grep 1012
sudo nano /usr/bin/ddru_findbad
cat --number /usr/bin/ddru_findbad | grep 1012
locale
sudo ddru_findbad /media/lubuntu/.../disk.img /media/lubuntu/.../disk.log
LC_ALL=C sudo ddru_findbad /media/lubuntu/.../disk.img 
/media/lubuntu/.../disk.log
LC_ALL=C.utf8 sudo ddru_findbad /media/lubuntu/.../disk.img 
/media/lubuntu/.../disk.log
LC_ALL=POSIX sudo ddru_findbad /media/lubuntu/.../disk.img 
/media/lubuntu/.../disk.log
fdisk -lu /media/lubuntu/.../disk.img | grep /media/lubuntu/.../disk.img
locale
cat --number /usr/bin/ddru_findbad | grep 1012
cat --number 
/media/lubuntu/.../Fedora-40_Datenrettung/ddrutility-Paket/ddrutility-2.8/ddru_findbad.sh
 | grep 1012
cd

ProblemType: Bug
DistroRelease: Ubuntu 24.04
Package: ddrutility 2.8-4
ProcVersionSignature: Ubuntu 6.8.0-31.31-generic 6.8.1
Uname: Linux 6.8.0-31-generic x86_64
ApportVersion: 2.28.1-0ubuntu2
Architecture: amd64
CasperMD5CheckResult: pass
CasperVersion: 1.498
CurrentDesktop: LXQt
Date: Thu Oct 17 09:03:43 2024
LiveMediaBuild: Lubuntu 24.04 LTS "Noble Numbat" - Release amd64 (20240425.1)
SourcePackage: ddrutility
UpgradeStatus: No upgrade log present (probably fresh install)

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


** Tags: amd64 apport-bug noble

** Attachment added: 
"20241017_ddrutility__ddru_findbad__Terminal-Log_for_Launchpad-Bug-Report.txt"
   
https://bugs.launchpad.net/bugs/2084781/+attachment/5828894/+files/20241017_ddrutility__ddru_findbad__Terminal-Log_for_Launchpad-Bug-Report.txt

** Description changed:

  (Please, see also this Debian Bug: <https://www.mail-archive.com/debian-
  bugs-d...@lists.debian.org/msg1800428.html>)
- 
  
  Dear Maintainer(s) (and please sorry for my bad English),
  I also found on some attempts to use ddru_findbad are
  failing for me like this:
  
-     ...
-     /usr/bin/ddru_findbad: 1028: arithmetic expression: expecting ')': " 
(698,64-/dev/loop8:) "
+     ...
+     /usr/bin/ddru_findbad: 1028: arithmetic expression: expecting ')': " 
(698,64-/dev/loop8:) "
  
  I also used as workarounds instead "export LANG=C" before using it
  "export LC_ALL=C", "export LC_ALL=C.utf8" or "export LC_ALL=POSIX",
  where "export LC_ALL=C" is 2 or 3 seconds slower than the other
  solutions.
  
- 
  A minimal improvement might be this (one from the three workarounds):
  /usr/bin/ddru_findbad:1012
- -        $GFDISK -lu "$TARGET" | grep -a "$TARGET" | grep -a -v Disk > 
+ -        LANG=C $GFDISK -lu "$TARGET" | grep -a "$TARGET" | grep -a -v Disk >
  tempddrfdisk
- +        LC_ALL=POSIX $GFDISK -lu "$TARGET" | grep -a "$TARGET" | grep -a -v 
Disk > 
+ +        LC_ALL=POSIX $GFDISK -lu "$TARGET" | grep -a "$TARGET" | grep -a -v 
Disk >
  tempddrfdisk
- 
  
  Kind regards,
  linux_joy
  
- 
- 
- 
  Used Terminal Commands under the Lubuntu-24.04-Live-DVD-ISO (I first tried 
with the ddru_findbad.sh-Script, which i had downloaded from 
<https://sourceforge.net/projects/ddrutility/> and then succsessfully processed 
under Fedora 40):
  (Please, see also the attached file 
"20241017_ddrutility__ddru_findbad__Terminal-Log_for_Launchpad-Bug-Report.txt":)
- 
  
  locale
  locale charmap
  locale -a
  sudo apt-get install gddrescue
  apt show sleuthkit
  apt show gddrescue
  sudo apt-get install ddrutility
  bash
  locale
  echo $LANG
  ls -al
  exit
  cd /media/lubuntu/...
  ls -al
  bash
  mkdir sh__Local_Package__LANG=de_DE.UTF-8
  cd sh__Local_Package__LANG=de_DE.UTF-8
  cp 
/media/lubuntu/.../Fedora-40_Datenrettung/ddrutility-Paket/ddrutility-2.8/ddru_findbad.sh
 .
  ls -al
  locale
  sudo sh ddru_findbad.sh /media/lubuntu/.../disk.img 
/media/lubuntu/.../disk.log
  fdisk -lu /media/lubuntu/.../disk.img | grep /media/lubuntu/.../disk.img
  sudo fdisk -lu /media/lubuntu/.../disk.img | grep /media/lubuntu/.../disk.img
  exit
  bash
  mkdir bash__Local_Package__LANG=de_DE.UTF-8
  cd bash__Local_Package__LANG=de_DE.UTF-8
  cp 
/media/lubuntu/.../Fedora-40_Datenrettung/ddrutility-Paket/ddrutility-2.8/ddru_findbad.sh
 .
  ls -al
  locale
  sudo bash ddru_findbad.sh /media/lubuntu/.../disk.img 
/media/lubuntu/.../disk.log
  fdisk -lu /media/lubuntu/.../disk.img | grep /media/lubuntu/.../disk.img
  exit
  bash
  exit
  lacale -a
  locale -a
  bash
  mkdir sh__Local_Package__LC_ALL=C
  cd sh__Local_Package__LC_ALL=C
  cp 
/media/lubuntu/.../Fedora-40_Datenrettung/ddrutility-Paket/ddrutility-2.8/ddru_findbad.sh
 .
  ls -al
  locale
  export LC_ALL=C
  locale
  sudo sh ddru_findbad.sh /media/lubuntu/.../disk.img 
/media/lubuntu/.../disk.log
  fdisk -lu /media/lubuntu/.../disk.img | grep /media/lubuntu/.../disk.img
  exit
  bash
  mkdir bash__Local_Package__LC_ALL=C
  cd bash__Local_Package__LC_ALL=C
  cp 
/media/lubuntu/.../Fedora-40_Datenrettung/ddrutility-Paket/ddrutility-2.8/ddru_findbad.sh
 .
  ls -al
  locale
  export LC_ALL=C
  locale
  sudo bash ddru_findbad.sh /media/lubuntu/.../disk.img 
/media/lubuntu/.../disk.log
  fdisk -lu /media/lubuntu/.../disk.img | grep /media/lubuntu/.../disk.img
  exit
  locale -a
  bash
  mkdir sh__Local_Package__LC_ALL=C.utf8
  cd sh__Local_Package__LC_ALL=C.utf8
  cp 
/media/lubuntu/.../Fedora-40_Datenrettung/ddrutility-Paket/ddrutility-2.8/ddru_findbad.sh
 .
  ls -al
  locale
  export LC_ALL=C.utf8
  locale
  sudo sh ddru_findbad.sh /media/lubuntu/.../disk.img 
/media/lubuntu/.../disk.log
  fdisk -lu /media/lubuntu/.../disk.img | grep /media/lubuntu/.../disk.img
  exit
  bash
  mkdir bash__Local_Package__LC_ALL=C.utf8
  cd bash__Local_Package__LC_ALL=C.utf8
  cp 
/media/lubuntu/.../Fedora-40_Datenrettung/ddrutility-Paket/ddrutility-2.8/ddru_findbad.sh
 .
  ls -al
  locale
  export LC_ALL=C.utf8
  locale
  sudo bash ddru_findbad.sh /media/lubuntu/.../disk.img 
/media/lubuntu/.../disk.log
  fdisk -lu /media/lubuntu/.../disk.img | grep /media/lubuntu/.../disk.img
  exit
  locale -a
  bash
  mkdir sh__Local_Package__LC_ALL=POSIX
  cd sh__Local_Package__LC_ALL=POSIX
  cp 
/media/lubuntu/.../Fedora-40_Datenrettung/ddrutility-Paket/ddrutility-2.8/ddru_findbad.sh
 .
  ls -al
  locale
  export LC_ALL=POSIX
  locale
  sudo sh ddru_findbad.sh /media/lubuntu/.../disk.img 
/media/lubuntu/.../disk.log
  fdisk -lu /media/lubuntu/.../disk.img | grep /media/lubuntu/.../disk.img
  exit
  bash
  mkdir bash__Local_Package__LC_ALL=POSIX
  cd bash__Local_Package__LC_ALL=POSIX
  cp 
/media/lubuntu/.../Fedora-40_Datenrettung/ddrutility-Paket/ddrutility-2.8/ddru_findbad.sh
 .
  ls -al
  locale
  export LC_ALL=POSIX
  locale
  sudo bash ddru_findbad.sh /media/lubuntu/.../disk.img 
/media/lubuntu/.../disk.log
  fdisk -lu /media/lubuntu/.../disk.img | grep /media/lubuntu/.../disk.img
  exit
  locale -a
  bash
  mkdir Ubuntu-24.04-Package__Original__LANG=C
  cd Ubuntu-24.04-Package__Original__LANG=C
  locale
  cat --number /usr/bin/ddru_findbad | grep 1012
  sudo ddru_findbad /media/lubuntu/.../disk.img /media/lubuntu/.../disk.log
  fdisk -lu /media/lubuntu/.../disk.img | grep /media/lubuntu/.../disk.img
  exit
  bash
  mkdir Ubuntu-24.04-Package__LC_ALL=C
  cd Ubuntu-24.04-Package__LC_ALL=C
  locale
  cat --number /usr/bin/ddru_findbad | grep 1012
  sudo nano /usr/bin/ddru_findbad
  cat --number /usr/bin/ddru_findbad | grep 1012
  locale
  sudo ddru_findbad /media/lubuntu/.../disk.img /media/lubuntu/.../disk.log
  fdisk -lu /media/lubuntu/.../disk.img | grep /media/lubuntu/.../disk.img
  exit
  bash
  mkdir Ubuntu-24.04-Package__LC_ALL=C.utf8
  cd Ubuntu-24.04-Package__LC_ALL=C.utf8
  locale
  cat --number /usr/bin/ddru_findbad | grep 1012
  sudo nano /usr/bin/ddru_findbad
  cat --number /usr/bin/ddru_findbad | grep 1012
  locale
  sudo ddru_findbad /media/lubuntu/.../disk.img /media/lubuntu/.../disk.log
  fdisk -lu /media/lubuntu/.../disk.img | grep /media/lubuntu/.../disk.img
  exit
  bash
  mkdir Ubuntu-24.04-Package__LC_ALL=POSIX
  cd Ubuntu-24.04-Package__LC_ALL=POSIX
  locale
  cat --number /usr/bin/ddru_findbad | grep 1012
  sudo nano /usr/bin/ddru_findbad
  cat --number /usr/bin/ddru_findbad | grep 1012
  locale
  sudo ddru_findbad /media/lubuntu/.../disk.img /media/lubuntu/.../disk.log
  fdisk -lu /media/lubuntu/.../disk.img | grep /media/lubuntu/.../disk.img
  exit
  cat --number 
/media/lubuntu/.../Fedora-40_Datenrettung/ddrutility-Paket/ddrutility-2.8/ddru_findbad.sh
 | grep 1012
  cd
  cd /media/lubuntu/...
  locale -a
  mkdir Ubuntu-24.04-Package__Tries_With_LC_ALL
  cd Ubuntu-24.04-Package__Tries_With_LC_ALL
  locale
  cat --number /usr/bin/ddru_findbad | grep 1012
  sudo nano /usr/bin/ddru_findbad
  cat --number /usr/bin/ddru_findbad | grep 1012
  locale
  sudo ddru_findbad /media/lubuntu/.../disk.img /media/lubuntu/.../disk.log
  LC_ALL=C sudo ddru_findbad /media/lubuntu/.../disk.img 
/media/lubuntu/.../disk.log
  LC_ALL=C.utf8 sudo ddru_findbad /media/lubuntu/.../disk.img 
/media/lubuntu/.../disk.log
  LC_ALL=POSIX sudo ddru_findbad /media/lubuntu/.../disk.img 
/media/lubuntu/.../disk.log
  fdisk -lu /media/lubuntu/.../disk.img | grep /media/lubuntu/.../disk.img
  locale
  cat --number /usr/bin/ddru_findbad | grep 1012
  cat --number 
/media/lubuntu/.../Fedora-40_Datenrettung/ddrutility-Paket/ddrutility-2.8/ddru_findbad.sh
 | grep 1012
  cd
  
  ProblemType: Bug
  DistroRelease: Ubuntu 24.04
  Package: ddrutility 2.8-4
  ProcVersionSignature: Ubuntu 6.8.0-31.31-generic 6.8.1
  Uname: Linux 6.8.0-31-generic x86_64
  ApportVersion: 2.28.1-0ubuntu2
  Architecture: amd64
  CasperMD5CheckResult: pass
  CasperVersion: 1.498
  CurrentDesktop: LXQt
  Date: Thu Oct 17 09:03:43 2024
  LiveMediaBuild: Lubuntu 24.04 LTS "Noble Numbat" - Release amd64 (20240425.1)
  SourcePackage: ddrutility
  UpgradeStatus: No upgrade log present (probably fresh install)

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

Title:
  ddrutility: ddru_findbad fails if fdisk output uses translated strings
  (ddru_findbad.sh: 1027: arithmetic expression: expecting...)

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


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to