Comment 3 for bug 2064955

Revision history for this message
Pavel-II (dzy4) wrote (last edit ):

Why report maked via ubuntu-bug update-manager-core can be Incomplete?

$ cat /etc/os-release
PRETTY_NAME="Ubuntu 23.10"
NAME="Ubuntu"
VERSION_ID="23.10"
VERSION="23.10 (Mantic Minotaur)"
VERSION_CODENAME=mantic
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=mantic
LOGO=ubuntu-logo

$ apt policy distro-info-data
distro-info-data:
  Installed: 0.58ubuntu0.3
  Candidate: 0.58ubuntu0.3
  Version table:
 *** 0.58ubuntu0.3 500
        500 http://ports.ubuntu.com/ubuntu-ports mantic-updates/main arm64 Packages
        500 http://ports.ubuntu.com/ubuntu-ports mantic-security/main arm64 Packages
        100 /var/lib/dpkg/status
     0.58 500
        500 http://ports.ubuntu.com/ubuntu-ports mantic/main arm64 Packages

$ ls -la /usr/share/distro-info/ubuntu.csv
-rw-r--r-- 2 root root 1248 Apr 9 18:31 /usr/share/distro-info/ubuntu.csv

ubuntu.csv has strange content, namely:
_eject_module()
{
 local cur prev OPTS
 COMPREPLY=()
 cur="${COMP_WORDS[COMP_CWORD]}"
 prev="${COMP_WORDS[COMP_CWORD-1]}"
 case $prev in
  '-a'|'--auto'|'-i'|'--manualeject')
   COMPREPLY=( $(compgen -W "off on" -- $cur) )
   return 0
   ;;
  '-c'|'--changerslot')
   # FIXME: there must be way to determine slots
   COMPREPLY=( $(compgen -W "slot" -- $cur) )
   return 0
   ;;
  '-x'|'--cdspeed')
   COMPREPLY=( $(compgen -W "$(eject --listspeed 2>/dev/null)" -- $cur) )
   return 0
   ;;
  '-h'|'--help'|'-V'|'--version')
   return 0
   ;;
 esac
 case $cur in
  -*)
   OPTS="--auto
    --changerslot
    --default
    --floppy
    --force
    --manualeject
    --no-unmount
    --no-partitions-unmount
    --noop
    --proc
    --tape
    --cdrom
    --scsi
    --trayclose
    --traytoggle
    --verbose
    --cdspeed
    --listspeed
    --help
    --version"
   COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
   return 0
   ;;
 esac
 local DEVS
 DEVS="$(for I in /sys/class/block/*/removable; do
  if [ $(cat $I) -ne 0 ]; then
   OLD_IFS=$IFS
   IFS='/';
   ARR=($I)
   echo "/dev/${ARR[4]}"
   IFS=$OLD_IFS
  fi
 done)"
 compopt -o bashdefault -o default
 COMPREPLY=( $(compgen -W "$DEVS" $cur) )
 return 0
}
complete -F _eject_module eject