Qual é o regex na instalação deste pacote?

3

Eu queria instalar libatk-bridge2.0 , então eu corri sudo apt-get install libatk-bridge2.0 :

$ sudo apt-get install libatk-bridge2.0
[sudo] password for christoph: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'libatk-bridge2.0-0' for regex 'libatk-bridge2.0'
Note, selecting 'libatk-bridge2.0-dev' for regex 'libatk-bridge2.0'
libatk-bridge2.0-0 is already the newest version (2.18.1-2ubuntu1).
The following additional packages will be installed:
  libatspi2.0-dev libdbus-1-dev libxtst-dev x11proto-record-dev
The following NEW packages will be installed:
  libatk-bridge2.0-dev libatspi2.0-dev libdbus-1-dev libxtst-dev
  x11proto-record-dev
0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Need to get 274 kB of archives.
After this operation, 1,804 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://archive.ubuntu.com/ubuntu xenial/main amd64 libdbus-1-dev amd64 1.10.6-1ubuntu3 [161 kB]
Get:2 http://archive.ubuntu.com/ubuntu xenial/main amd64 x11proto-record-dev all 1.14.2-1 [33.6 kB]
Get:3 http://archive.ubuntu.com/ubuntu xenial/main amd64 libxtst-dev amd64 2:1.2.2-1 [17.0 kB]
Get:4 http://archive.ubuntu.com/ubuntu xenial/main amd64 libatspi2.0-dev amd64 2.18.3-4ubuntu1 [59.2 kB]
Get:5 http://archive.ubuntu.com/ubuntu xenial/main amd64 libatk-bridge2.0-dev amd64 2.18.1-2ubuntu1 [2,824 B]
Fetched 274 kB in 0s (340 kB/s)               
Selecting previously unselected package libdbus-1-dev:amd64.
(Reading database ... 336246 files and directories currently installed.)
Preparing to unpack .../libdbus-1-dev_1.10.6-1ubuntu3_amd64.deb ...
Unpacking libdbus-1-dev:amd64 (1.10.6-1ubuntu3) ...
Selecting previously unselected package x11proto-record-dev.
Preparing to unpack .../x11proto-record-dev_1.14.2-1_all.deb ...
Unpacking x11proto-record-dev (1.14.2-1) ...
Selecting previously unselected package libxtst-dev:amd64.
Preparing to unpack .../libxtst-dev_2%3a1.2.2-1_amd64.deb ...
Unpacking libxtst-dev:amd64 (2:1.2.2-1) ...
Selecting previously unselected package libatspi2.0-dev.
Preparing to unpack .../libatspi2.0-dev_2.18.3-4ubuntu1_amd64.deb ...
Unpacking libatspi2.0-dev (2.18.3-4ubuntu1) ...
Selecting previously unselected package libatk-bridge2.0-dev:amd64.
Preparing to unpack .../libatk-bridge2.0-dev_2.18.1-2ubuntu1_amd64.deb ...
Unpacking libatk-bridge2.0-dev:amd64 (2.18.1-2ubuntu1) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up libdbus-1-dev:amd64 (1.10.6-1ubuntu3) ...
Setting up x11proto-record-dev (1.14.2-1) ...
Setting up libxtst-dev:amd64 (2:1.2.2-1) ...
Setting up libatspi2.0-dev (2.18.3-4ubuntu1) ...
Setting up libatk-bridge2.0-dev:amd64 (2.18.1-2ubuntu1) ...

Eu realmente só notei que algo estava errado quando descobri que não preciso de libatk-bridge2 alguns minutos depois, então eu quis purgar isso.

$ sudo apt-get purge libatk-bridge2.0
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'libatk-bridge2.0-0' for regex 'libatk-bridge2.0'
Note, selecting 'libatk-bridge2.0-dev' for regex 'libatk-bridge2.0'
The following packages were automatically installed and are no longer required:
  accountsservice-ubuntu-schemas adium-theme-ubuntu appstream apt-xapian-index
  apturl-common dbus-property-service dleyna-server fonts-droid-fallback
  fonts-noto-mono gdebi-core gedit-common gir1.2-atspi-2.0 gir1.2-gmenu-3.0
  gir1.2-secret-1 gir1.2-udisks-2.0 gksu gnome-control-center-data
  gnome-software-common gnome-video-effects gtk2-engines-murrine
  guile-2.0-libs iio-sensor-proxy indicator-network intel-gpu-tools
  latexila-data liba11y-profile-manager-0.1-0 libandroid-properties1
  libappindicator1 libappstream3 libatspi2.0-dev libboost-log1.58.0
  libboost-regex1.58.0 libboost-thread1.58.0 libconnectivity-qt1
  libcontent-hub0 libdbus-1-dev libdbus-cpp5 libdleyna-connector-dbus-1.0-1
  libdleyna-core-1.0-3 libdmapsharing-3.0-2 libept1.5.0 libevent-2.0-5
  libfreerdp-plugins-standard libgexiv2-2 libgflags2v5 libgksu2-0
  libgoogle-glog0v5 libgpod-common libgpod4 libgssdp-1.0-3 libgupnp-1.0-4
  libgupnp-av-1.0-2 libgupnp-dlna-2.0-3 libhardware2 libhybris
  libhybris-common1 libhybris-utils libindicator7 liblibertine1
  liblttng-ust-ctl2 liblttng-ust0 libmedia1 libminiupnpc10 libnatpmp1
  libonline-accounts-client1 libonline-accounts-daemon1 libonline-accounts-qt1
  liboxideqt-qmlplugin liboxideqtcore0 liboxideqtquick0 libprocess-cpp3
  libqmenumodel0 libqofono-qt5-0 libqqwing2v5 libqt5multimediaquick-p5
  libqt5positioning5 libqt5systeminfo5 libqt5xmlpatterns5 libsgutils2-2
  libssh-4 libsystemsettings1 libtrust-store2 libubuntu-app-launch2
  libubuntu-download-manager-client1 libubuntu-download-manager-common1
  libudm-common1 libunwind8 liburcu4 libwhoopsie-preferences0 libxapian-1.3-5
  libxtst-dev network-manager-openvpn ofono oneconf-common oxideqt-codecs
  python-aptdaemon python-attr python-cups python-dbus python-debian
  python-debtagshw python-defer python-dirspec python-gpgme python-oneconf
  python-pam python-piston-mini-client python-pyasn1-modules python-serial
  python-service-identity python-twisted-bin python-twisted-core
  python-twisted-web python-xapian python-zope.interface python3-brlapi
  python3-gi-cairo python3-gnupg python3-louis python3-mako python3-oneconf
  python3-piston-mini-client python3-speechd python3-xapian1.3 qmenumodel-qml
  qml-module-qt-labs-folderlistmodel qml-module-qt-labs-settings
  qml-module-qtmultimedia qml-module-qtsysteminfo
  qml-module-ubuntu-connectivity qml-module-ubuntu-onlineaccounts
  qml-module-ubuntu-onlineaccounts2 qml-module-ubuntu-web
  qtdeclarative5-accounts-plugin qtdeclarative5-gsettings1.0
  qtdeclarative5-ofono0.2 qtdeclarative5-qtquick2-plugin
  qtdeclarative5-ubuntu-content1 qtdeclarative5-ubuntu-settings-components
  realmd remmina-common rhythmbox-data shotwell-common
  software-center-aptdaemon-plugins sqlite3 syslinux syslinux-common
  syslinux-legacy system-image-common system-image-dbus texlive
  transmission-common ubuntu-keyboard-data ubuntu-wallpapers
  ubuntu-wallpapers-xenial ubuntuone-client-data ubuntuone-credentials-common
  unity-webapps-qml urfkill usb-creator-common webapp-container webbrowser-app
  whoopsie-preferences x11proto-record-dev xbrlapi
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  apparmor-easyprof apparmor-easyprof-ubuntu click click-apparmor
  gir1.2-click-0.4 gir1.2-gee-0.8 libclick-0.4-0 pinentry-curses
  python3-apparmor python3-apparmor-click python3-click-package
  python3-libapparmor
Suggested packages:
  click-reviewers-tools ubuntu-app-launch-tools | upstart-app-launch-tools
  pinentry-doc
The following packages will be REMOVED:
  a11y-profile-manager-indicator* account-plugin-facebook*
  account-plugin-flickr* account-plugin-google* activity-log-manager*
  adwaita-icon-theme* aisleriot* apport-gtk* apturl* bamfdaemon* baobab*
  cheese* compiz* compiz-gnome* dconf-editor* deja-dup* eog* evince*
  evolution* evolution-data-server* evolution-plugins* file-roller* firefox*
  gcr* gdebi* gedit* ghex* gir1.2-appindicator3-0.1* gir1.2-gtk-3.0*
  gir1.2-gtksource-3.0* gir1.2-keybinder-3.0* gir1.2-peas-1.0* gir1.2-rb-3.0*
  gir1.2-totem-1.0* gir1.2-vte-2.91* gir1.2-webkit2-4.0* gir1.2-wnck-3.0*
  gkbd-capplet* gnome-bluetooth* gnome-calculator* gnome-calendar*
  gnome-disk-utility* gnome-font-viewer* gnome-icon-theme* gnome-keyring*
  gnome-mahjongg* gnome-mines* gnome-orca* gnome-power-manager*
  gnome-screensaver* gnome-screenshot* gnome-search-tool* gnome-session-bin*
  gnome-session-canberra* gnome-software* gnome-sudoku* gnome-system-log*
  gnome-system-monitor* gnome-terminal* gnome-user-guide* gnome-user-share*
  gstreamer1.0-clutter-3.0* gucharmap* gvfs-backends* humanity-icon-theme*
  ibus* ibus-gtk3* ibus-table* indicator-application* indicator-appmenu*
  indicator-bluetooth* indicator-keyboard* indicator-printers* kazam*
  language-selector-gnome* latexila* libaccount-plugin-1.0-0*
  libaccount-plugin-generic-oauth* libaccount-plugin-google*
  libappindicator3-1* libatk-adaptor* libatk-bridge2.0-0*
  libatk-bridge2.0-dev* libavahi-ui-gtk3-0* libcanberra-gtk3-0*
  libcanberra-gtk3-module* libchamplain-0.12-0* libchamplain-gtk-0.12-0*
  libcheese-gtk25* libcheese8* libclutter-1.0-0* libclutter-gst-3.0-0*
  libclutter-gtk-1.0-0* libcryptui0a* libedataserverui-1.2-1*
  libevdocument3-4* libevolution* libevview3-3* libgail-3-0* libgcr-ui-3-1*
  libgnome-bluetooth13* libgnome-desktop-3-12* libgnomekbd8* libgtk-3-0*
  libgtk-3-bin* libgtk-3-common* libgtkhex-3-0* libgtkmm-3.0-1v5*
  libgtksourceview-3.0-1* libgtkspell3-3-0* libgucharmap-2-90-7*
  libgweather-3-6* libido3-0.1-0* libindicator3-7* libkeybinder-3.0-0*
  libmetacity-private3a* libnautilus-extension1a* libnm-gtk0* libnma0*
  libpeas-1.0-0* libpeas-1.0-0-python3loader*
  libreoffice-avmedia-backend-gstreamer* librhythmbox-core9* libtimezonemap1*
  libtotem0* libunity-control-center1* libunity-core-6.0-9*
  libunity-gtk3-parser0* libunity-misc4* libunity-settings-daemon1*
  libunity-webapps0* libvte-2.91-0* libwebkit2gtk-4.0-37*
  libwebkit2gtk-4.0-37-gtk2* libwebkitgtk-3.0-0* libwnck-3-0* libyelp0*
  light-themes* meld* mousetweaks* nautilus* nautilus-dropbox*
  nautilus-megasync* nautilus-sendto* nautilus-share* network-manager-gnome*
  network-manager-pptp-gnome* notify-osd* onboard* onboard-data* oneconf*
  pinentry-gnome3* policykit-1-gnome* python-aptdaemon.gtk3widgets*
  python-ubuntu-sso-client* python3-aptdaemon.gtk3widgets* python3-pyatspi*
  remmina* remmina-plugin-rdp* remmina-plugin-vnc* rhythmbox*
  rhythmbox-plugin-zeitgeist* rhythmbox-plugins* seahorse* seahorse-daemon*
  session-shortcuts* sessioninstaller* shotwell* simple-scan* software-center*
  software-properties-gtk* system-config-printer-gnome* totem* totem-plugins*
  transmission-gtk* ubuntu-artwork* ubuntu-desktop* ubuntu-docs* ubuntu-mono*
  ubuntu-release-upgrader-gtk* ubuntu-session* ubuntu-software*
  ubuntu-sso-client* unity* unity-asset-pool* unity-control-center*
  unity-control-center-signon* unity-greeter* unity-gtk3-module*
  unity-scope-calculator* unity-scope-gdrive* unity-scope-manpages*
  unity-services* unity-settings-daemon* unity-tweak-tool*
  unity-webapps-common* unity-webapps-service* update-manager*
  update-notifier* usb-creator-gtk* vino* xdg-user-dirs-gtk* xdiagnose* yelp*
  zeitgeist-datahub* zenity*
The following NEW packages will be installed:
  apparmor-easyprof apparmor-easyprof-ubuntu click click-apparmor
  gir1.2-click-0.4 gir1.2-gee-0.8 libclick-0.4-0 pinentry-curses
  python3-apparmor python3-apparmor-click python3-click-package
  python3-libapparmor
0 upgraded, 12 newly installed, 206 to remove and 0 not upgraded.
Need to get 350 kB of archives.
After this operation, 592 MB disk space will be freed.
Do you want to continue? [Y/n] n
Abort.

Como você pode ver, ele pretende excluir muitas coisas. O comando install e o comando purge dizem algo sobre um regex. Mas como é libatk-bridge2.0 um regex? É claro que foo é um regex que corresponde apenas a foo , mas se libatk-bridge2.0 tiver apenas a única string correspondente libatk-bridge2.0 , o apt-get não deve selecionar por exemplo libatk-bridge2.0-0 para ele.

É claro que é muito fácil remover os pacotes exatos que foram instalados por você, se você ainda tiver a saída ...

$ sudo apt-get purge libatk-bridge2.0-dev libatspi2.0-dev libdbus-1-dev libxtst-dev   x11proto-record-dev
[sudo] password for christoph: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  libatk-bridge2.0-dev* libatspi2.0-dev* libdbus-1-dev* libxtst-dev*
  x11proto-record-dev*
0 upgraded, 0 newly installed, 5 to remove and 0 not upgraded.
After this operation, 1,804 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 336354 files and directories currently installed.)
Removing libatk-bridge2.0-dev:amd64 (2.18.1-2ubuntu1) ...
Removing libatspi2.0-dev (2.18.3-4ubuntu1) ...
Removing libdbus-1-dev:amd64 (1.10.6-1ubuntu3) ...
Removing libxtst-dev:amd64 (2:1.2.2-1) ...
Removing x11proto-record-dev (1.14.2-1) ...
Processing triggers for man-db (2.7.5-1) ...

... mas por que isso aconteceu?

    
por UTF-8 17.09.2016 / 23:12

2 respostas

1

TL; DR O nome real do pacote é libatk-bridge2.0-0 portanto libatk-bridge2.0 corresponde: libatk-bridge2.0-0 (que é praticamente sempre lá) e libatk-bridge2.0-dev .

Você não instalou libatk-bridge2.0 que instalou outras coisas:

Note, selecting 'libatk-bridge2.0-0' for regex 'libatk-bridge2.0'
Note, selecting 'libatk-bridge2.0-dev' for regex 'libatk-bridge2.0'
libatk-bridge2.0-0 is already the newest version (2.18.1-2ubuntu1).
The following additional packages will be installed:
  libatspi2.0-dev libdbus-1-dev libxtst-dev x11proto-record-dev
The following NEW packages will be installed:
  libatk-bridge2.0-dev libatspi2.0-dev libdbus-1-dev libxtst-dev
  x11proto-record-dev
0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.

E libatk-bridge2.0 combinaram com eles porque o nome real do pacote é libatk-bridge2.0-0 .

Em seguida, seu purge usou libatk-bridge2.0 novamente e correspondeu a libatk-bridge2.0-0 a ser removido. Provocar:

The following packages will be REMOVED:
  ***A LOT OF STUFF**

Isso remove muitas coisas porque o ATK (e sua ponte DBUS) está perto da parte inferior da árvore de dependências do GNOME. Portanto, praticamente tudo que dependia do ambiente GNOME e do GTK foi marcado para eliminação.

apt-get realiza correspondências de regex quando não consegue encontrar um nome de pacote exato. De man apt-get ( install seção de comando):

 If no package matches the given expression and the expression
 contains one of '.', '?' or '*' then it is assumed to be a POSIX
 regular expression, and it is applied to all package names in the
 database. Any matches are then installed (or removed). Note that
 matching is done by substring so 'lo.*' matches 'how-lo' and
 'lowest'. If this is undesired, anchor the regular expression with
 a '^' or '$' character, or create a more specific regular
 expression.

Então, sim, libatk-bridge2.0 tem um ponto ( . ), portanto, é bom o suficiente como uma regex em apt-get .

    
por 18.09.2016 / 23:35
0
Os curingas regex de

serão verdadeiros quando o que você pesquisa estiver contido no que você está procurando. já que os dois pacotes que está tentando desinstalar possuem a palavra que você inseriu em seus nomes, ela retorna true. você poderia tentar adicionar delimitadores regex para string de início e fim, mas tudo isso de lado, o apt-get remove o trabalho? você poderia ter deletado um arquivo de configuração que tivesse dependências nele.

    
por 18.09.2016 / 01:27