mattly / bork

the Bash-Operated Reconciling Kludge
Other
218 stars 27 forks source link

fix apt status for outdated packages #89

Closed dylanvaughn closed 7 years ago

dylanvaughn commented 7 years ago

Hello!

I am trying bork on Ubuntu 16.04 and am getting an error and incorrect results when checking a package's status:

dylan@ubuntu-trusty:~/tmp$ cat test.sh
ok apt humanity-icon-theme
dylan@ubuntu-trusty:~/tmp$ ~/from-github/bork/bin/bork status test.sh 
E: Command line option --dry-run is not understood in combination with the other options
ok: apt humanity-icon-theme      
dylan@ubuntu-trusty:~/tmp$ ~/my-fork-with-fix/bork/bin/bork status test.sh
outdated: apt humanity-icon-theme
humanity-icon-theme             install

It looks like the issue is here:

https://github.com/mattly/bork/blob/master/types/apt.sh#L25

dylan@ubuntu-trusty:~/tmp$ sudo apt-get -u update --dry-run
E: Command line option --dry-run is not understood in combination with the other options
dylan@ubuntu-trusty:~/tmp$ sudo apt-get upgrade --dry-run | grep "^Inst" | awk '{print $2}'
libssl1.0.0
libssl1.0.0:i386
humanity-icon-theme
dylan@ubuntu-trusty:~/tmp$ 

I am also seeing the same error on Ubuntu 14.04.

Thanks, Dylan

edrex commented 7 years ago

Hi Dylan, I just ported my bork files to work on Ubuntu, and hit this issue.

Review:

Thanks!