News for hackers. Stuff that matters.
Re:The apt command: Combining apt-get and apt-cache and adds... by deelowe on Saturday March 05, 2016 @11:28AM (#11229912)
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.
Re:The apt command: Combining apt-get and apt-cache and adds... by CydeWeys on Saturday March 05, 2016 @11:36AM (#11229936)
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.
Re:The apt command: Combining apt-get and apt-cache and adds... by Drdrdrq on Saturday March 05, 2016 @11:43AM (#11229960)
Not sure why you were downvoted, I agree 100%. I try to use aptitude CLI for exactly this reason.
Re:The apt command: Combining apt-get and apt-cache and adds... by colejohnson66 on Saturday March 05, 2016 @01:01PM (#11230211)
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... by jafingi on Saturday March 05, 2016 @05:06PM (#11231293)
And remove an application with apt-get? I prefer yum and dnf much over apt.
Re:The apt command: Combining apt-get and apt-cache and adds... by adricnet on Saturday March 05, 2016 @11:39AM (#11229944)
Only one of them requires readwrite system administrator privileges (eg sudo). apt-cache can be run by any user as it doesn't expose any secret data and can't be used to make changes. apt-get can install and uninstall software as well as download packages and thus needs root privileges in the classic UNIX model.
Re:The apt command: Combining apt-get and apt-cache and adds... by CydeWeys on Saturday March 05, 2016 @11:53AM (#11229999)
apt-get doesn't fail when run as non-root, it only fails when you run it as non-root when you try to some of the commands that require root privileges (such as installing system level packages). It has lots of commands that don't need root privileges. I don't see much reason why "list all the packages available for installation", as well as the other commands in apt-cache, aren't included in that list.
Re:The apt command: Combining apt-get and apt-cache and adds... by pherq on Saturday March 05, 2016 @11:48AM (#11229980)
apt-get source works fine without super-user privileges, so it isn't just that some have to be run as root.
Re:The apt command: Combining apt-get and apt-cache and adds... by krylon on Sunday March 06, 2016 @04:16AM (#11233037)
On CentOS, I can do "yum search something" as a regular user, while "yum install something" or "yum upgrade" require root privileges.

I think it's similar with the pkg command on FreeBSD.

Re:The apt command: Combining apt-get and apt-cache and adds... by konfou on Sunday March 06, 2016 @06:22AM (#11233334)
and same with pacman on Arch (and derivatives)
Re:The apt command: Combining apt-get and apt-cache and adds... by currysausage on Saturday March 05, 2016 @12:58PM (#11230200)
"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

Re:The apt command: Combining apt-get and apt-cache and adds... by miken123 on Saturday March 05, 2016 @03:08PM (#11230828)
Yeah, until you do an upgrade:

"The upgrade process for some previous releases recommended the use of aptitude for the upgrade. This tool is not recommended for upgrades from wheezy to jessie."

See https://www.debian.org/releases/stable/amd64/release-notes/c...

Re:The apt command: Combining apt-get and apt-cache and adds... by creshal on Saturday March 05, 2016 @04:23PM (#11231151)
Debian's zigzagging between package management frontends (dselect, apt-*, aptitude, dpkg, now apt?, … all in use in parallel) is incredibly frustrating. Pacman e.g. is so much easier to use because everything's in one well-structured command.
Re:The apt command: Combining apt-get and apt-cache and adds... by toyg on Saturday March 05, 2016 @05:48PM (#11231463)
It probably reflects the classic problem of developer turnover in OSS projects and the resulting approach to technical debt. Old developers fade away, young guns come through (often still in academia), "this code is all crap, let's chuck it out and build something better, how hard can it be?"...
Re:The apt command: Combining apt-get and apt-cache and adds... by julian-klode on Sunday March 06, 2016 @06:55AM (#11233448)
Well, just use apt(8):

apt install - Install packages

apt remove - Remove packages

apt upgrade - Upgrade packages without removing

apt full-upgrade - Upgrade packages, allowing removals

apt update - Refresh sources

apt show - Show a package

apt list - List packages, you can filter by stuff like --installed or --upgradable

Re:The apt command: Combining apt-get and apt-cache and adds... by creshal on Sunday March 06, 2016 @12:00PM (#11234455)
1. "Just use $newtool" has been Debian's spiel for every past release, and every time it's a different one.

2. Why full-upgrade and not dist-upgrade like in all the other debian package managers? Would that little bit of internal consistency really have hurt?

3. Still does not seem to cover all use cases.

Re:The apt command: Combining apt-get and apt-cache and adds... by __david__ on Monday March 07, 2016 @02:50AM (#11237648)
I don't know what you mean. dselect is like 2000 era, and was replaced by "aptitude" at least 15 years ago. "apt" has been around since the beginning and still works just fine. The fact that "aptitude" has some overlap with "apt" is a detail--its real strength is that its curses ui (which was a massive improvement over dselect).
Re:The apt command: Combining apt-get and apt-cache and adds... by nextos on Saturday March 05, 2016 @12:08PM (#11230039)
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... by hndl on Saturday March 05, 2016 @12:17PM (#11230064)
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... by asymmetric on Saturday March 05, 2016 @02:29PM (#11230646)
The way I see it, the distinction is that apt-get requires the network to be up, whereas apt-cache, as the name suggests, doesn't.
Re:The apt command: Combining apt-get and apt-cache and adds... by __david__ on Saturday March 05, 2016 @03:24PM (#11230910)
Except for "apt-get remove".