Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 437986 - app-admin/eselect - eselect profile set default/bsd/fbsd/amd64/9.1 will not work correctly
Summary: app-admin/eselect - eselect profile set default/bsd/fbsd/amd64/9.1 will not w...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: eselect (show other bugs)
Hardware: All FreeBSD
: Normal normal (vote)
Assignee: Gentoo eselect Team
URL:
Whiteboard:
Keywords: InVCS, PATCH
Depends on:
Blocks: new-fbsd-stage
  Show dependency tree
 
Reported: 2012-10-11 14:38 UTC by Yuta SATOH
Modified: 2012-10-23 18:10 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
sample patch for profile.eselect (437986.patch,592 bytes, patch)
2012-10-11 14:42 UTC, Yuta SATOH
Details | Diff
sample patch for profile.eselect and package-manager.bash.in (437986-new.patch,1.24 KB, patch)
2012-10-11 17:37 UTC, Yuta SATOH
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yuta SATOH 2012-10-11 14:38:06 UTC
Gentoo/FreeBSD has - in keyword.
e.g. amd64-fbsd, x86-fbsd

However, it is not defined in the regular expression of /usr/share/eselect/modules/profile.eselect.

<snip>
                # do a reverse lookup and find the arch associated with ${target}
                parch=$(sed -n -e \
                        "s|^\([[:alnum:]]\+\)[[:space:]].*${target}[[:space:]].*$|\1|p" \
                        "${repopath}/profiles/profiles.desc")
                [[ ${arch} != "${parch}" && -z ${force} ]] \
                        && die -q "${target} is not a valid profile for ${arch}"</snip>


Reproducible: Always

Steps to Reproduce:
# eselect profile list
Available profile symlink targets:
  [1]   default/bsd/fbsd/amd64/9.0 *
  [2]   default/bsd/fbsd/amd64/9.1
# eselect profile set default/bsd/fbsd/amd64/9.1
!!! Error: default/bsd/fbsd/amd64/9.0 is not a valid profile for amd64-fbsd
exiting
Comment 1 Yuta SATOH 2012-10-11 14:42:45 UTC
Created attachment 326286 [details, diff]
sample patch for profile.eselect
Comment 2 Yuta SATOH 2012-10-11 14:46:32 UTC
BSD team,

dev-util/catalyst-2.0.11 will now run the `eselect profile set default/bsd/fbsd/amd64/9.1`
If you are creating new stages of 9.1 version, we need to fix this bug.
Comment 3 Yuta SATOH 2012-10-11 17:37:11 UTC
Created attachment 326308 [details, diff]
sample patch for profile.eselect and package-manager.bash.in

I found new bug. New patch to fix both.

Steps to Reproduce on amd64-fbsd)
# rm /etc/make.profile /etc/portage/make.profile
# eselect profile list
!!! Warning: Unknown architecture. Please submit a bug including the output of 'uname -m'
!!! Error: Cannot determine architecture
!!! Error: Failed to get a list of valid profiles
exiting

FYI)
# uname -a
FreeBSD gfbsd 9.1_rc1-Gentoo FreeBSD Gentoo 9.1_rc1 #0: Thu Sep 20 04:13:02 JST 2012     root@:/usr/src/sys/amd64/compile/GENERIC  amd64
Comment 4 Ulrich Müller gentoo-dev 2012-10-11 19:49:41 UTC
Fixed in Git: <http://git.overlays.gentoo.org/gitweb/?p=proj/eselect.git;a=commit;h=1be0f713e5b1412f021198b283b30aa7592dfc22>

I've also added the underscore to the regexp in the profile module, because it's allowed too in architecture names: <http://dev.gentoo.org/~ulm/pms/5/pms.html#x1-260003.1.6>
Comment 5 Ulrich Müller gentoo-dev 2012-10-23 18:10:34 UTC
Fixed in eselect-1.3.3.
Thank you for reporting.