Live data from Hacker News

The apt command: Combining apt-get and apt-cache and adds a progress bar (2014)

mvogt.wordpress.com

31–40 of 77 posts

Re: The apt command: Combining apt-get and apt-cache and adds a progress bar (2014)

#31
post #3

Earlier quoted context omitted.

Same here, I can't believe we're a few years late. Much better than the apt-get / apt-cache stupidity.

Harsh, this must have really upset you.

Perhaps not upset, just intolerant of really lame, unintuitive crap software?

Re: The apt command: Combining apt-get and apt-cache and adds a progress bar (2014)

#32
post #8

I've never understood why debian insists on having these be different commands. It would make sense if install, search, upgrade and uninstall were all discrete, but the way it is today feels half implemented.

Same. Having to search for what you wanted to install via apt-cache, but then actually install it via apt-get, was a triumph of some unexplainable factor over usability.

I want to say it has to do with keeping each "idea" as a separate program, but the fact that apt-get can install, uninstall, list packages, etc. seems to go against that idea

Re: The apt command: Combining apt-get and apt-cache and adds a progress bar (2014)

#33
also don't forget apt-file (very useful to find out which package contains the library/binary you want to install) and dpkg -L to figure out what a particular package installed on your system.

I switched to debian some time ago and it's interesting so many different commands are used for package management, this said I personally have an alias ap=sudo aptitude -t jessie-backports alias and use that as a command line interface for search/install, and run the full aptitude gui only when doing updates

Re: The apt command: Combining apt-get and apt-cache and adds a progress bar (2014)

#34

There's another thing about apt that's bothered me: apt-cache search isn't a very good search engine. Its most common use case is finding the exact name of some library/framework package, ie, "apt-cache search someframework". For common frameworks, this produces hundred of search results for packages that use the framework and mention this in their description, while the framework itself is in the list but very diffi…

I have this problem too. If I did myself shelling out to grep with pcre flags to find a simple library then there's a UX issue.

> If I find myself shelling out to grep with pcre flags, I am using unix pipes as intended

Fixed that for you.

Re: The apt command: Combining apt-get and apt-cache and adds a progress bar (2014)

#35
If you'd like to try this right away (not have to wait) on any version of Debian/Ubuntu (just need pip) try this script I wrote several years ago:

https://pypi.python.org/pypi/apt-wrapper/

No prog bar but it handles all common tasks, ppa's, and elevates with sudo automatically. For example:

    > pip install apt-wrapper 
    > apt in foobar

Re: The apt command: Combining apt-get and apt-cache and adds a progress bar (2014)

#37
I love this, but its terminal magic isn't working properly for me. "apt install stuff" places a progress bar at the moment, then prints some misaligned stuff and then finally manages to clear the screen (!).

Any terminal settings I need to adjust? I'm using OS X's Terminal.app, terminal declared as xterm-256color, via SSH, under zsh.

Re: The apt command: Combining apt-get and apt-cache and adds a progress bar (2014)

#38

There's another thing about apt that's bothered me: apt-cache search isn't a very good search engine. Its most common use case is finding the exact name of some library/framework package, ie, "apt-cache search someframework". For common frameworks, this produces hundred of search results for packages that use the framework and mention this in their description, while the framework itself is in the list but very diffi…

I have this problem too. If I did myself shelling out to grep with pcre flags to find a simple library then there's a UX issue.

Search uses regular expressions so generally no need for grep unless you need more complex filters; --names-only has the -n short-form:

  apt-cache search -n 
More generally apt-get and apt-cache are designed to be backward-compatible for use in scripts whereas apt is not[0]:

  SCRIPT USAGE AND DIFFERENCES FROM OTHER APT TOOLS

       The apt(8) commandline 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.
[0] http://manpages.ubuntu.com/manpages/xenial/en/man8/apt.8.htm...
Post reply on HN