FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux Pacman Development

 
 
LinkBack Thread Tools
 
Old 05-19-2012, 01:40 PM
Allan McRae
 
Default Allow leading "local/" in query operations

I find that when copying the output of "pacman -Qs foo" into a
"pacman -Qi" operation to get more information on the packages, I
consistently copy the "local/" prefix. It is a minor usability
improvement to strip this if present.

Signed-off-by: Allan McRae <allan@archlinux.org>
---
src/pacman/query.c | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/src/pacman/query.c b/src/pacman/query.c
index a1cc1cf..07509fa 100644
--- a/src/pacman/query.c
+++ b/src/pacman/query.c
@@ -554,6 +554,11 @@ int pacman_query(alpm_list_t *targets)
for(i = targets; i; i = alpm_list_next(i)) {
const char *strname = i->data;

+ /* strip leading "local/" */
+ if(strncmp(strname, "local/", 6) == 0) {
+ strname+=6;
+ }
+
if(config->op_q_isfile) {
alpm_pkg_load(config->handle, strname, 1, 0, &pkg);
} else {
--
1.7.10.2
 

Thread Tools




All times are GMT. The time now is 08:15 PM.

VBulletin, Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org