Pacman

Historical bug tracker for the Pacman package manager.

The pacman bug tracker has moved to gitlab:
https://gitlab.archlinux.org/pacman/pacman/-/issues

This tracker remains open for interaction with historical bugs during the transition period. Any new bugs reports will be closed without further action.
Tasklist

FS#12483 - Package meta info: Repository

Attached to Project: Pacman
Opened by kludge (kludge) - Wednesday, 17 December 2008, 04:53 GMT
Last edited by Allan McRae (Allan) - Tuesday, 23 December 2008, 02:25 GMT
Task Type Feature Request
Category Backend/Core
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version 3.2.1
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

making a list of all packages installed from a given repository is a surprisingly non-trivial task.

pacman can list all *available* packages by repo (-Sl repo_name), and list all installed packages (-Q), but it takes some bashery to find all the packages installed from [community]. It's even more difficult to generate a list of all pkgs installed from [unsupported]; pacman -Qm shows all 'foreign' packages, but distinguishing between packages from [unsupported] and my 'private' pkgbuilds takes lots of invocations of wget and some ugly bash array work.

why? well, i've started banging away at a script to making voting a whole lot easier. honestly, i don't normally keep track of which packages i use are from [community]. i can't make very good use of aurvote if i don't know which packages i might want to vote for. further, voting for pkgs one-by-one on the web interface is cumbersome. so i need to generate installed lists of packages from [community] and [unsupported] so i can edit them and pass them to aurvote.

if pacman 'knew' this info, this would be an utterly trivial task. right now, it's a little slow and ugly.

i'll start looking at libalpm and pacman source to see if i can provide a patch.
This task depends upon

Closed by  Allan McRae (Allan)
Tuesday, 23 December 2008, 02:25 GMT
Reason for closing:  Not a bug
Additional comments about closing:  Pacman will never know what the AUR is
Comment by Allan McRae (Allan) - Wednesday, 17 December 2008, 05:09 GMT
Look in the pacman-contrib package (which contains officially contributed helper scripts) and you will find a script called paclist. "paclist community" lists all packages from the [community] repo.
Comment by kludge (kludge) - Wednesday, 17 December 2008, 05:32 GMT
got it. that's exactly what i was looking for [community]. thanks much for the tip!

still no love on [unsupported], though.
Comment by kludge (kludge) - Wednesday, 17 December 2008, 05:33 GMT
or, rather, this would be the killer i was looking for *if* pacman recognized [unsupported] as a repo distinct from the set of all "foreign" packages.
Comment by Dan McGee (toofishes) - Wednesday, 17 December 2008, 05:37 GMT
I don't think pacman will ever have a distinction between [unsupported] and those you build on your own- they are all just "packages not available in a sync repository." Pacman is distro-agnostic, in the sense that we don't want to tie it directly to Arch or the AUR.
Comment by kludge (kludge) - Wednesday, 17 December 2008, 05:50 GMT
seems to me like that depends on where pacman gets the repo information. i'm not claiming i understand the guts of pacman, but i'm imagining a variable that can be set in the PKGBUILD and gets shuffled into the .PKGINFO. it could have any arbitrary value.

i'm only suggesting a metadata field and the ability to search on it, not a real change in functionality.
Comment by Dan McGee (toofishes) - Wednesday, 17 December 2008, 05:58 GMT
Remember that packages themselves have no idea what repo they may or may not end up in- heck, they can even be in 6 repositories at once. We move packages from [testing] to [core] all the time, so having the repository in the PKGINFO isn't really possible. That is all done at repo-add and not makepkg time.
Comment by kludge (kludge) - Wednesday, 17 December 2008, 06:13 GMT
ah, so pacman 'knows' which repo a pkg came from only if the pkg is in a repo database that's mentioned in pacman.conf?

i'm tempted to rant about the difficulties of making voting more accessible, but i won't.
Comment by Allan McRae (Allan) - Wednesday, 17 December 2008, 07:33 GMT
Wouldn't passing the output of "pacman -Qm" to aurvote work. Sure, some packages might not be in the AUR, but does aurvote not handle that somewhat elegantly?
Comment by kludge (kludge) - Monday, 22 December 2008, 20:50 GMT
passing pacman -Qm to aurvote does work, but not elegantly at all. for every foreign package installed, aurvote (and my script, which just rips off aurvote's method) uses wget to search for the package name and then has to parse the returned html page. this is hideously slow and inefficient. it takes two to six minutes to check eight packages (six of which are in [unsupported]) against the aur. granted, i run through a very slow proxy, but it's still pretty ugly.

<mini-rant>to me, it's a question of social interface design. voting in the aur ([unsupported] *and* [community]) is a really powerful social mechanism and afaik is unique to arch. i want my vote to mean "i'd like to see this package promoted." so i don't necessarily want to vote for every package i have installed. however, actually voting in a manner that reflects my preferences and usage is an awkward and complicated process *at best*.

voting is an interaction, and i'd like the process of voting to be interactive (as opposed to manual (the web interface) or automatic (pacman -Qm | aurvote)). and i can do it with what i've written now, but the process of gathering the basic data set is slow and inelegant. repository metadata would make the process more efficient and elegant. that would make an interactive voting interface work better. i hope that will encourage more people to vote in a more meaningful way, and i feel like that would be A Good Thing for archlinux. i feel like i'm starting to repeat myself, and i realize this isn't really the right venue for this discussion, so...</mini-rant>
Comment by kludge (kludge) - Monday, 22 December 2008, 20:52 GMT
oh, also, checking each package against the aur requires a persistent internet connection. minor flaw in this day and age, i suppose, but my neighbor's wifi is pretty flaky ;)
Comment by Allan McRae (Allan) - Tuesday, 23 December 2008, 02:24 GMT
Checking every package against the AUR does require an internet connection, but so does voting on the AUR...

In the end, this bug is not about pacman, it is about the AUR and voting. If you want to know which packages you have are from the AUR, create a local repo and add all packages you build from the AUR to it. The you can just use the paclist tool. The tools are all provded for you to solve this problem.

Loading...