On an installation of Debian GNU/Linux 7.0 with subsequent updates
from testing (Linux 3.12.9-1 amd64) I noticed a strange output while
running "apt-get remove" or "apt-get purge" in order to remove/purge
libreoffice packages.

Here are the libreoffice packages:

$ dpkg-query -l 'libreoffice*' | tail -n +6 | gawk '{print $1,$2,$3}'
ii libreoffice 1:4.1.4-2+b1
ii libreoffice-base 1:4.1.4-2+b1
ii libreoffice-base-core 1:4.1.4-2+b1
un libreoffice-bundled <none>
ii libreoffice-calc 1:4.1.4-2+b1
ii libreoffice-common 1:4.1.4-2
ii libreoffice-core 1:4.1.4-2+b1
un libreoffice-dev <none>
ii libreoffice-draw 1:4.1.4-2+b1
ii libreoffice-emailmerge 1:4.1.4-2
un libreoffice-evolution <none>
un libreoffice-filter-binfilter <none>
un libreoffice-filter-mobiledev <none>
un libreoffice-gcj <none>
un libreoffice-gnome <none>
un libreoffice-grammarcheck <none>
un libreoffice-gtk <none>
un libreoffice-help-4.1 <none>
ii libreoffice-impress 1:4.1.4-2+b1
ii libreoffice-java-common 1:4.1.4-2
un libreoffice-kab <none>
un libreoffice-kde <none>
un libreoffice-l10n-3.5 <none>
un libreoffice-l10n-3.6 <none>
un libreoffice-l10n-4.1 <none>
un libreoffice-l10n-en-us <none>
ii libreoffice-math 1:4.1.4-2+b1
un libreoffice-mysql-connector <none>
un libreoffice-officebean <none>
un libreoffice-pdfimport <none>
un libreoffice-presentation-minimizer <none>
un libreoffice-presenter-console <none>
un libreoffice-report-builder <none>
ii libreoffice-report-builder-bin 1:4.1.4-2+b1
un libreoffice-script-provider-bsh <none>
un libreoffice-script-provider-js <none>
un libreoffice-script-provider-python <none>
un libreoffice-sdbc-postgresql <none>
un libreoffice-style <none>
un libreoffice-style-andromeda <none>
un libreoffice-style-crystal <none>
un libreoffice-style-default <none>
ii libreoffice-style-galaxy 1:4.1.4-2
un libreoffice-style-hicontrast <none>
un libreoffice-style-oxygen <none>
ii libreoffice-style-tango 1:4.1.4-2
un libreoffice-unbundled <none>
un libreoffice-wiki-publisher <none>
ii libreoffice-writer 1:4.1.4-2+b1
un libreoffice-writer2latex <none>
un libreoffice-writer2xhtml <none>

In order to uninstall all libreoffice packages I ran the following
apt-get command with a simple regular expression:

$ sudo apt-get remove 'libreoffice.*'
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'libreoffice.org-calc' for regex 'libreoffice.*'
Note, selecting 'libreoffice.org-writer' for regex 'libreoffice.*'
Package 'libreoffice.org-calc' is not installed, so not removed
Package 'libreoffice.org-writer' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

I'd say this output is unexpected because apt-get does not select
installed libreoffice packages listed by dpkg-query.

But if the regular expression starts with ^ I get the expected result:

$ sudo apt-get remove '^libreoffice.*'
Reading package lists... Done
Building dependency tree
Reading state information... Done
[ many lines deleted ]
The following packages were automatically installed and are no longer required:
  fonts-lyx fonts-opensymbol libboost-date-time1.54.0 libboost-system1.54.0
  libcdr-0.0-0 libclucene-contribs1 libcmis-0.3-3 libexttextcat-2.0-0
  libexttextcat-data libhsqldb1.8.0-java libhyphen0 liblangtag-common
  liblangtag1 libmspub-0.0-0 libmwaw-0.1-1 libmythes-1.2-0 libodfgen-0.0-0
  liborcus-0.6-0 libvisio-0.0-0 libwps-0.2-2 lp-solve uno-libs3 ure
  xfonts-mathml
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
  libreoffice libreoffice-base libreoffice-base-core libreoffice-calc
  libreoffice-common libreoffice-core libreoffice-draw libreoffice-emailmerge
  libreoffice-impress libreoffice-java-common libreoffice-math
  libreoffice-report-builder-bin libreoffice-style-galaxy
  libreoffice-style-tango libreoffice-writer python3-uno
0 upgraded, 0 newly installed, 16 to remove and 0 not upgraded.
After this operation, 287 MB disk space will be freed.
Do you want to continue? [Y/n]

After reading apt-get(8) and regex(7) manpages I'd say that using
apt-get with 'libreoffice.*' or '^libreoffice.*' should give the same
result.

$ apt-get --version
apt 0.9.15 for amd64 compiled on Jan 25 2014 22:25:33
Supported modules:
*Ver: Standard .deb
*Pkg:  Debian dpkg interface (Priority 30)
 Pkg:  Debian APT solver interface (Priority -1000)
 S.L: 'deb' Standard Debian binary tree
 S.L: 'deb-src' Standard Debian source tree
 Idx: Debian Source Index
 Idx: Debian Package Index
 Idx: Debian Translation Index
 Idx: Debian dpkg status file
 Idx: EDSP scenario file

$ sudo apt-get check
Reading package lists... Done
Building dependency tree
Reading state information... Done

Any comments?

-- rpr.


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/CAN-5ny=q9xj9gme88uq116bpyh-uehx8woydzf_fecvbjrm...@mail.gmail.com

Reply via email to