[arch-general] package manager overlay script
Hello, im getting tired to be forced to remember many different options for various package managers on different distros. so i did a little script that allows me to do like "asd install foo" on any distro i got that script installed, and it will install the package using the systems package manager. so, before i hack this script to a better state, i was wondering does this kind of script/project already exist ? cheers .andre
On 15 April 2010 20:17, Andre "Osku" Schmidt <andre.osku.schmidt@osku.de> wrote:
Hello,
im getting tired to be forced to remember many different options for various package managers on different distros. so i did a little script that allows me to do like "asd install foo" on any distro i got that script installed, and it will install the package using the systems package manager.
so, before i hack this script to a better state, i was wondering does this kind of script/project already exist ?
Yes, everywhere. In people's startup profiles as aliases, in directories as executable scripts, and uhh.. -- GPG/PGP ID: B42DDCAD
Andre Osku Schmidt (2010-04-15 14:17):
Hello,
im getting tired to be forced to remember many different options for various package managers on different distros. so i did a little script that allows me to do like "asd install foo" on any distro i got that script installed, and it will install the package using the systems package manager.
so, before i hack this script to a better state, i was wondering does this kind of script/project already exist ?
Hi, Aren't shell aliases enough for this job? if [ -f /etc/arch-release ]; then alias list="pacman -Ql" alias owns="pacman -Qo" alias sea="pacman -Ss" alias inst="sudo pacman -S" alias rem="sudo pacman -Rsn" elif [ -f /etc/debian_version ]; then alias list="dpkg-query -L" alias owns="dpkg-query -S" alias sea="aptitude search" alias rem="aptitude purge" elif [ -f /etc/exherbo-release ]; then alias list="paludis -k" alias owns="paludis --full-match -o" function rem() { paludis -u --with-unused-dependencies -p $@ && \ read -q '?Continue [y/N]: ' && \ paludis -u --with-unused-dependencies $@ } fi -- -- Rogutės Sparnuotos
PackageKit On Apr 15, 2010 9:15 AM, "Rogutės Sparnuotos" <rogutes@googlemail.com> wrote: Andre Osku Schmidt (2010-04-15 14:17):
Hello,
im getting tired to be forced to remember many different options for various package... Hi,
Aren't shell aliases enough for this job? if [ -f /etc/arch-release ]; then alias list="pacman -Ql" alias owns="pacman -Qo" alias sea="pacman -Ss" alias inst="sudo pacman -S" alias rem="sudo pacman -Rsn" elif [ -f /etc/debian_version ]; then alias list="dpkg-query -L" alias owns="dpkg-query -S" alias sea="aptitude search" alias rem="aptitude purge" elif [ -f /etc/exherbo-release ]; then alias list="paludis -k" alias owns="paludis --full-match -o" function rem() { paludis -u --with-unused-dependencies -p $@ && \ read -q '?Continue [y/N]: ' && \ paludis -u --with-unused-dependencies $@ } fi -- -- Rogutės Sparnuotos
Am oder ungefähr am Donnerstag, 15. April 2010, schrieb Robert Howard:
PackageKit
This reminds me: Can PackageKit actually handle pacman? I have used PackageKit in the past with (K)ubuntu and when switching to arch (and the command line) I thought about trying PackageKit again but was not sure if that was safe … -- Ed
On 04/15/2010 10:41 AM, Edgar Kalkowski wrote:
Am oder ungefähr am Donnerstag, 15. April 2010, schrieb Robert Howard:
PackageKit
This reminds me: Can PackageKit actually handle pacman? I have used PackageKit in the past with (K)ubuntu and when switching to arch (and the command line) I thought about trying PackageKit again but was not sure if that was safe …
PackageKit works, but it doesn't seem to be able to update the databases itself (so you still have to do pacman -Sy), and it has no output, so you don't get warned if an update just broke something..
On Thu, 2010-04-15 at 16:15 +0300, Rogutės Sparnuotos wrote:
Andre Osku Schmidt (2010-04-15 14:17):
Hello,
im getting tired to be forced to remember many different options for various package managers on different distros. so i did a little script that allows me to do like "asd install foo" on any distro i got that script installed, and it will install the package using the systems package manager.
so, before i hack this script to a better state, i was wondering does this kind of script/project already exist ?
Hi,
Aren't shell aliases enough for this job?
if [ -f /etc/arch-release ]; then alias list="pacman -Ql" alias owns="pacman -Qo" alias sea="pacman -Ss" alias inst="sudo pacman -S" alias rem="sudo pacman -Rsn" elif [ -f /etc/debian_version ]; then alias list="dpkg-query -L" alias owns="dpkg-query -S" alias sea="aptitude search" alias rem="aptitude purge" elif [ -f /etc/exherbo-release ]; then alias list="paludis -k" alias owns="paludis --full-match -o" function rem() { paludis -u --with-unused-dependencies -p $@ && \ read -q '?Continue [y/N]: ' && \ paludis -u --with-unused-dependencies $@ } fi
yes, but i see couple issues with this. 1. you cant use "install" as alias (assuming system has coreutils) 2. maybe someone already has aliases named like these 3. how do you get the list of these commands if you forgot and then let the user to name them like he/her wants is not an option, as then the whole purpose is gone: one command, any distro. i then assume that this kind of project doesnt exist cause no one needs it or not all can/could settle on one command and options... i can already imagine some update versus upgrade "flame wars" ;P and i just realised, to make this kind of tool more useful, it would be nice if the output were formatted the same way on any distro... (this probably would involve lot of bash coding, or using apis) well, in the mean time, heres what i'm using/hacking http://gitorious.org/asd and as im a fresh arch user, if you have any tips on using pacman, please bash me :) (i just copied the commands from pacman rosetta) cheers .andre ps. it's called "asd" only cause it seemed the fastest keys to type on many keyboard layouts ;P pps. it's not really in a state i would recommend anyone to use it, but it suits my needs, and i'm more interested on hacking other things atm.
On 04/16/2010 04:37 AM, Andre "Osku" Schmidt wrote:
and as im a fresh arch user, if you have any tips on using pacman, please bash me :) (i just copied the commands from pacman rosetta)
The only thing I can think of that you might be missing through your approach is chaining commands together. For example, to update on Debian-based distros you have to do "sudo apt-get update; sudo apt-get upgrade", but on Arch you can combine the two commands ("sudo pacman -Sy; sudo pacman -Su") into one: sudo pacman -Syu. Similarly, if you want to update and then search, it's "sudo pacman -Sys searchterm". I assume you can do other combinations, but I can't think of any other useful ones. -Brendan Long
On Thu, Apr 15, 2010 at 8:17 AM, Andre "Osku" Schmidt <andre.osku.schmidt@osku.de> wrote:
Hello,
im getting tired to be forced to remember many different options for various package managers on different distros. so i did a little script that allows me to do like "asd install foo" on any distro i got that script installed, and it will install the package using the systems package manager.
so, before i hack this script to a better state, i was wondering does this kind of script/project already exist ?
Personally, I would rather remember own commands for each package manager, or, more likely, use a cheetsheet. I'm generally wary of putting abstraction layers where they can be avoided or relying on non-standard tools for tasks like system administration. That's why I don't use stuff like alias lls="ls -la" in my shell rc file - I would have to put this on every machine I touch lest I feel very awkward.
participants (7)
-
Andre "Osku" Schmidt
-
Brendan Long
-
Denis Kobozev
-
Edgar Kalkowski
-
Ray Rashif
-
Robert Howard
-
Rogutės Sparnuotos