Novo gerenciador de pacotes - O APT [RESOLVIDO]

1. Novo gerenciador de pacotes - O APT [RESOLVIDO]

Gabriel Henrique da Silva Ferreira
MrBlackWolf

(usa Arch Linux)

Enviado em 03/04/2016 - 18:43h

E aí pessoal, novo gerenciador de pacotes na área. Deem uma olhada na matéria e digam o que acham.

http://www.cyberciti.biz/faq/ubuntu-lts-debian-linux-apt-command-examples/


  


2. Re: Novo gerenciador de pacotes - O APT [RESOLVIDO]

Perfil removido
removido

(usa Nenhuma)

Enviado em 03/04/2016 - 20:00h

O Debian 8 aceita esta sintaxe.

Nota:

A note about differences from apt-get tool

The apt command is designed as an end-user tool and it may change behavior between versions. While it tries not to break backward compatibility this is not guaranteed either if a change seems beneficial for interactive use. All features of apt are available in dedicated APT tools like apt-get and apt-cache command as well. apt just changes the default value of some options. So you should prefer using these commands (potentially with some additional options enabled) in your scripts as they keep backward compatibility as much as possible.


----------------------------------------------------------------------------------------------------------------
# apt-get purge systemd (não é prá digitar isso!)

Encryption works. Properly implemented strong crypto systems are one of the few things that you can rely on. Unfortunately, endpoint security is so terrifically weak that NSA can frequently find ways around it. — Edward Snowden



3. Re: Novo gerenciador de pacotes - O APT [RESOLVIDO]

shoujo
shoujo

(usa Slackware)

Enviado em 03/04/2016 - 20:07h

Vai economizar 4 tecladas no teclado kkkkkkkk "-get"


4. Re: Novo gerenciador de pacotes - O APT

Perfil removido
removido

(usa Nenhuma)

Enviado em 03/04/2016 - 20:09h

Na verdade é um script que chama o apt-get, apt-cache dpkg e outros conforme o caso, confirmem com:
less $(which apt) 


Porem eu gostei disso (Não conhecia), embora use sempre que posso o aptitude.

* ~MrBlackWolf Valeria até enviar como dica, facilita a vida na hora de digitar os comandos.


------------------------------------------------------
KISS principle, RTFM and STFW = 42


5. Re: Novo gerenciador de pacotes - O APT

IceStorms
IceStorms

(usa openSUSE)

Enviado em 03/04/2016 - 20:15h

Antes tarde do que nunca.
No FreeBSD e GhostBSD se usava pkg_add para instalar programas, agora se usa somente pkg. Isso dá mais agilidade pra quem precisa digitar muito esse comando.

Será que os derivados também vão usar esse comando (apt)?

________________________________________________
O Projeto Fedora procura sempre liderar, nunca seguir
Fedora MATE
Linux Mint Xfce
¨¨¨¨¨¨¨¨¨


6. Re: Novo gerenciador de pacotes - O APT [RESOLVIDO]

Perfil removido
removido

(usa Nenhuma)

Enviado em 03/04/2016 - 20:16h

Já o utilizo por algum tempo. Na prática, tem mais enfeites como a colorização da saída e uma barra de progresso verde.

Ainda uso o apt-get para instalar alguns pacotes (principalmente os do KDE), devido ao parâmetro --no-install-recommends para evitar a instalação de pacotes desnecessários, e também para limpeza do cache (apt-get clean).
--
LinuxCounter: #596371


7. Re: Novo gerenciador de pacotes - O APT

Perfil removido
removido

(usa Nenhuma)

Enviado em 03/04/2016 - 20:26h

erisrjr escreveu:

Na verdade é um script que chama o apt-get, apt-cache dpkg e outros conforme o caso, confirmem com:
less $(which apt) 


Porem eu gostei disso (Não conhecia), embora use sempre que posso o aptitude.

* ~MrBlackWolf Valeria até enviar como dica, facilita a vida na hora de digitar os comandos.


------------------------------------------------------
KISS principle, RTFM and STFW = 42


Aqui é um binário:

~ $ file $(which apt)
/usr/bin/apt: ELF 64-bit LSB executable, x86-64, version 1 (SYSV),
dynamically linked (uses shared libs), for GNU/Linux 2.6.24,
BuildID[sha1]=8fed5cc761bb8a3fdc1503c2db1f0b868442301e, stripped


SO: Ubuntu 14.04.4 LTS

--
LinuxCounter: #596371


8. Re: Novo gerenciador de pacotes - O APT [RESOLVIDO]

Gabriel Henrique da Silva Ferreira
MrBlackWolf

(usa Arch Linux)

Enviado em 04/04/2016 - 00:08h

Vale ressaltar essa parte do texto:

" apt-get is the first front end tool. apt is a second tool which overcomes some design mistakes of apt-get"

É uma ferramenta separada do apt-get.


9. Re: Novo gerenciador de pacotes - O APT [RESOLVIDO]

Perfil removido
removido

(usa Nenhuma)

Enviado em 04/04/2016 - 02:14h

Bom dia,

Sim, já conhecia! Baixei o 16.04 LTS RC e já o usei.


Abraço!!

Att,
Jbaf 2016
Slackware 14.1 (KDE), Debian 8.3 (MATE)
Computer Associates - " CA-Clipper 5 - A melhor e eterna ferramenta de programação já existente !!"


10. Re: Novo gerenciador de pacotes - O APT [RESOLVIDO]

Patrick Costa da Silva
patrickpcs

(usa Nenhuma)

Enviado em 04/04/2016 - 03:08h

Tirando a barra de progresso, não vi muita utilidade não =x
http://goo.gl/g6NiFp


11. Re: Novo gerenciador de pacotes - O APT [RESOLVIDO]

Perfil removido
removido

(usa Nenhuma)

Enviado em 04/04/2016 - 11:59h

No Debian 8 é um binário:

/usr/bin/apt: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=466203593b8f7e12e2b6ef732899ed8418bf3704, stripped


----------------------------------------------------------------------------------------------------------------
# apt-get purge systemd (não é prá digitar isso!)

Encryption works. Properly implemented strong crypto systems are one of the few things that you can rely on. Unfortunately, endpoint security is so terrifically weak that NSA can frequently find ways around it. — Edward Snowden



12. Mutação?

Perfil removido
removido

(usa Nenhuma)

Enviado em 09/04/2016 - 12:50h

Resumo da opera:
O comando apt no LinuxMint, é diferente do mesmo no Ubuntu, e desconheço o motivo disso.




~ ru4n e ~listeiro_037

Vi a pouco em uma instalação com Ubuntu LTS 14.04.4 64Bits, nele é realmente um binário.
O meu teste inicial, foi realizado em uma maquina com o LinuxMint 17.3 dos meus tios, que me acionaram no plano de suporte "Family premium 24X7 full assistance" enquanto lia o VOL.

Vejam só:


LinuxMint 17.3

lsb_release -a
No LSB modules are available.
Distributor ID: LinuxMint
Description: Linux Mint 17.3 Rosa
Release: 17.3
Codename: rosa




Tipo de arquivo

file $(which apt)
/usr/local/bin/apt: Python script, ASCII text executable



Vejam o código dele no Mint:


#! /usr/bin/python

import sys, os

def usage():
print "apt"
print "Usage: apt command [options]"
print " apt help command [options]"
print ""
print "Commands:"
print "add-repository - Add entries to apt sources.list"
print "autoclean - Erase old downloaded archive files"
print "autoremove - Remove automatically all unused packages"
print "build - Build binary or source packages from sources"
print "build-dep - Configure build-dependencies for source packages"
print "changelog - View a package's changelog"
print "check - Verify that there are no broken dependencies"
print "clean - Erase downloaded archive files"
print "contains - List packages containing a file"
print "content - List files contained in a package"
print "deb - Install a .deb package"
print "depends - Show raw dependency information for a package"
print "dist-upgrade - Perform an upgrade, possibly installing and removing packages"
print "download - Download the .deb file for a package"
print "dselect-upgrade - Follow dselect selections"
print "held - List all held packages"
print "help - Show help for a command"
print "hold - Hold a package"
print "install - Install/upgrade packages"
print "policy - Show policy settings"
print "purge - Remove packages and their configuration files"
print "recommends - List missing recommended packages for a particular package"
print "rdepends - Show reverse dependency information for a package"
print "reinstall - Download and (possibly) reinstall a currently installed package"
print "remove - Remove packages"
print "search - Search for a package by name and/or expression"
print "show - Display detailed information about a package"
print "source - Download source archives"
print "sources - Edit /etc/apt/sources.list with nano"
print "unhold - Unhold a package"
print "update - Download lists of new/upgradable packages"
print "upgrade - Perform a safe upgrade"
print "version - Show the installed version of a package"
print " This apt has Super Cow Powers"
sys.exit(1)

if len(sys.argv) < 2:
usage()

sudo="sudo"
if os.getuid() == 0 :
sudo=""

if os.environ.get("EDITOR") != None:
editor = os.environ.get("EDITOR")
else:
editor = "/usr/bin/editor"
argcommand = sys.argv[1]
argsuffix = sys.argv[2:]
showHelp = False
if argcommand == "help":
if len(sys.argv) < 3:
usage()
showHelp = True
argcommand = sys.argv[2]
argsuffix = sys.argv[3:]
argoptions = ""
for argoption in argsuffix:
argoptions = argoptions + " " + argoption

if argcommand in ["install", "remove", "update", "upgrade", "dist-upgrade", "clean", "dselect-upgrade", "build-dep", "check", "autoremove", "autoclean"]:
aptcommand = "apt-get"
command = sudo + " " + aptcommand + " " + argcommand + argoptions
elif argcommand in ["source", "moo"]:
aptcommand = "apt-get"
command = aptcommand + " " + argcommand + argoptions
elif argcommand in ["search", "show", "changelog"]:
aptcommand = "aptitude"
command = aptcommand + " " + argcommand + argoptions
elif argcommand in ["recommends"]:
command = "/usr/lib/linuxmint/mintSystem/mint-apt-recommends.py " + argoptions
elif argcommand in ["reinstall"]:
aptcommand = "aptitude"
command = sudo + " " + aptcommand + " " + argcommand + argoptions
elif argcommand in ["stats", "depends", "rdepends", "policy"]:
aptcommand = "apt-cache"
command = aptcommand + " " + argcommand + argoptions
elif argcommand == "sources":
command = sudo + " " + editor + " /etc/apt/sources.list"
elif argcommand == "held":
command = "dpkg --get-selections | grep hold"
elif argcommand == "contains":
command = "dpkg -S" + argoptions + " | sort"
elif argcommand == "content":
command = "dpkg -L" + argoptions + " | sort"
elif argcommand == "hold":
command = "echo " + argoptions + " hold | sudo dpkg --set-selections"
elif argcommand == "unhold":
command = "echo " + argoptions + " install | sudo dpkg --set-selections"
elif argcommand == "version":
command = "/usr/lib/linuxmint/common/version.py" + argoptions
elif argcommand == "purge":
command = sudo + " apt-get remove --purge" + argoptions
elif argcommand == "build":
command = sudo + " dpkg-buildpackage" + argoptions
elif argcommand == "deb":
command = sudo + " dpkg -i" + argoptions
elif argcommand == "download":
command = "LC_ALL=C apt-cache depends " + argoptions + " |grep -v \"Conflicts:\|Replaces:\"|awk '{print $NF}'|sed -e 's/[<>]//g'|xargs aptitude download -r"
elif argcommand == "add-repository":
command = sudo + " add-apt-repository" + argoptions
else:
usage()

# Color highlighting
if argcommand in ["search", "show", "content", "version", "policy", "depends", "rdepends"] and len(argoptions.strip()) > 1:
command = command + " | highlight" + argoptions

if (showHelp):
print "\"apt "+ argcommand + argoptions + "\" is equivalent to \"" + command + "\""
else:
os.system(command)






Qual pacote é o dono do arquivo:
dpkg -S  $(which apt)
mintsystem: /usr/local/bin/apt



Informações do pacote no Mint:

aptitude show mintsystem
Package: mintsystem
State: installed
Automatically installed: no
Version: 8.1.6
Priority: opcional
Section: admin
Maintainer: Clement Lefebvre <clem@linuxmint.com>
Architecture: all
Uncompressed Size: 154 k
Depends: python, dconf-gsettings-backend | gsettings-backend, aptitude, cowsay,
fortune, fortunes-husse, mint-common, mint-info, zenity
Description: Linux Mint System Base Package
Used by the desktop and other mint tools to gather information and process
common system tasks.




===============================

Ubuntu 14.04.4 LTS:


 lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.4 LTS
Release: 14.04
Codename: trusty




file $(which apt)
/usr/bin/apt: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=525122cbb544713de21b2091de7bd3500c0ee07d, stripped



dpkg -S  $(which apt)
apt: /usr/bin/apt



Informações do pacote no Ubuntu:


aptitude show apt
Pacote: apt
Essencial: sim
Estado: instalado
Automaticamente instalado: não
Versão: 1.0.1ubuntu2.12
Prioridade: importante
Seção: admin
Mantenedor: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Arquitetura: amd64
Tamanho Descompactado: 3.663 k
Depende de: libapt-pkg4.12 (>= 0.9.16), libc6 (>= 2.15), libgcc1 (>= 1:4.1.1), libstdc++6 (>= 4.6), ubuntu-keyring, gnupg
Sugere: aptitude | synaptic | wajig, dpkg-dev (>= 1.17.2), apt-doc, python-apt
Conflita com: python-apt (< 0.7.93.2~), python-apt (< 0.7.93.2~), apt
Quebra: manpages-it (< 2.80-4~), manpages-it (< 2.80-4~), manpages-pl (< 20060617-3~), manpages-pl (< 20060617-3~), openjdk-6-jdk (< 6b24-1.11-0ubuntu1~), openjdk-6-jdk (< 6b24-1.11-0ubuntu1~),
sun-java5-jdk (> 0), sun-java5-jdk (> 0), sun-java6-jdk (> 0), sun-java6-jdk (> 0)
Substitui: manpages-it (< 2.80-4~), manpages-it (< 2.80-4~), manpages-pl (< 20060617-3~), manpages-pl (< 20060617-3~), openjdk-6-jdk (< 6b24-1.11-0ubuntu1~), openjdk-6-jdk (< 6b24-1.11-0ubuntu1~),
sun-java5-jdk (> 0), sun-java5-jdk (> 0), sun-java6-jdk (> 0), sun-java6-jdk (> 0)
Descrição: gerenciador de pacotes em linha de comando
Este pacote fornece ferramentas em linha de comando para busca e gerenciamento assim como consultas de informações sobre pacotes como um acesso de baixo nível a todas as funcionalidades da biblioteca
libapt-pkg.

These include:
* apt-get for retrieval of packages and information about them from authenticated sources and for installation, upgrade and removal of packages together with their dependencies
* apt-cache for querying available information about installed as well as installable packages
* apt-cdrom to use removable media as a source for packages
* apt-config as an interface to the configuration settings
* apt-key as an interface to manage authentication keys



------------------------------------------------------
KISS principle, RTFM and STFW = 42



01 02



Patrocínio

Site hospedado pelo provedor RedeHost.
Linux banner

Destaques

Artigos

Dicas

Tópicos

Top 10 do mês

Scripts