Live data from Hacker News

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

mvogt.wordpress.com

21–30 of 77 posts

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

#22
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 difficult to find. The --names-only flag fixes this, but it's not the default so it's one more thing to worry about.

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

#23
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 here, I've always found them strange.

In contrast, pacman or guix are quite intuitive and feel better designed.

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

#25

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.

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

#26
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.

I hear you. Back when I was on debian I had a small script I called apt-o ('o' for oblivious) which combined the two -- as you mention.

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

#27
post #24

Will it take twice the amount of time with the progress bar enabled?

I can't answer specifically for `apt`, but many commands take significantly longer if you let them display to stdout versus piping their output to a file or `/dev/null`. cf.:

  $ time ls -R /usr
  real    0m7.570s
  user    0m0.104s
  sys     0m2.286s

  $ time ls -R /usr > /dev/null
  real    0m0.193s
  user    0m0.036s
  sys     0m0.154s

(edit: when will I grok HN markup?? cough support markdown cough)

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

#28
post #27
post #24

Will it take twice the amount of time with the progress bar enabled?

I can't answer specifically for `apt`, but many commands take significantly longer if you let them display to stdout versus piping their output to a file or `/dev/null`. cf.: $ time ls -R /usr real 0m7.570s user 0m0.104s sys 0m2.286s $ time ls -R /usr > /dev/null real 0m0.193s user 0m0.036s sys 0m0.154s (edit: when will I grok HN markup?? cough support markdown cough )

Did you run those two commands in sequence? Did you account for disk-cache effects? Try running it 4 times, alternating the versions and see what your last 2 times are ...

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

#30
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.

"aptitude [...] is a friendly frontend to apt."

"The primary command line tool is aptitude. apt-get fulfills a similar purpose and although it is no longer the recommended primary tool some still use it."

If you prefer the apt-* commands: "You can also use Wajig, for an unified and more logical command-line interface to all package management functions." (Apparently, apt is the new Wajig, except that apt doesn't automagically sudo, which Wajig did.)

See https://wiki.debian.org/DebianPackageManagement

Post reply on HN