Summary: | app-portage/portage-utils-0.1.24 does not properly parse the profile location | ||
---|---|---|---|
Product: | Portage Development | Reporter: | Georgi Georgiev <chutz+bugs.gentoo.org> |
Component: | Tools | Assignee: | Portage Utils Team <portage-utils> |
Status: | RESOLVED FIXED | ||
Severity: | normal | Keywords: | InVCS |
Priority: | High | ||
Version: | 2.1 | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
portae-utils-chdir.patch
portage-utils-chdir.patch |
Description
Georgi Georgiev
2007-02-26 10:26:18 UTC
Please attach a patch. Created attachment 111367 [details, diff]
portae-utils-chdir.patch
Fair enough, here is the patch. I don't know if changing the directory is the proper way to do it, but the current working directory doesn't seem to affect anything else so why not.
Created attachment 111369 [details, diff]
portage-utils-chdir.patch
Oh, what the hell, the chdir should have been outside the loop (not that it makes any differnece).
Thanks. This should be in the 0.1.25 This is released in 0.1.25 Bug #168334 ; q -r dies with a segfault after emerge --sync Bug #168442 ; does not properly parse the profile location Bug #170795 ; add a -E/--eclass option to qgrep Bug #170797 ; add a -s/--skip-comments option to qgrep Bug #171024 ; opening '/usr/portage/.metadata.x' failed Bug #171374 ; Misc enhancements for qgrep Bug #172240 ; -A/-B options for qgrep (context lines) Bug #172338 ; qgrepping through installed ebuilds (in the VDB) Bug #173005 ; Colorized output for qgrep. Closing This change breaks things. We will have to revert it and or come up with a new patch. This patch comes from vapier to address the breakage caused by your patch. --- main.c 8 Apr 2007 19:45:41 -0000 1.136 +++ main.c 9 Apr 2007 23:01:13 -0000 @@ -508,7 +508,10 @@ void initialize_portage_env(void) f = 0; if (readlink("/etc/make.profile", profile, sizeof(profile)) == -1) strcpy(profile, "/etc/make.profile"); - chdir("/etc"); + if (profile[0] != '/') { + memmove(profile+5, profile, strlen(profile)); + memcpy(profile, "/etc/", 5); + } do { if (f == 0) snprintf(portage_file, sizeof(portage_file), "%s/make.defaults", profile); Closing bug |