DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Packages and Ports

OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 4 Weeks Ago
ripe's Avatar
ripe ripe is offline
Shell Scout
 
Join Date: Feb 2013
Location: Occitanie, France
Posts: 90
Question Tree of packages.

Hi,
In the tree of packages port, e.g. https://ftp.fr.openbsd.org/pub/OpenB...ackages/amd64/, there is some packages 0ad to Xonotic and then a2pc to zzuf. Anyone knwo why the first packages are not with the others ?

0ad is a opensource game like Freeciv.

Reply With Quote
  #2   (View Single Post)  
Old 4 Weeks Ago
roddierod's Avatar
roddierod roddierod is offline
Real Name: Rod Person
VPN Cryptographer
 
Join Date: Apr 2008
Location: Pittsburgh, Pa
Posts: 417
Default

You mean sort order? Numbers, then Capitals then small letters. Least that is what I always assumed.
__________________
"The basic tool for the manipulation of reality is the manipulation of words. If you can control the meaning of words, you can control the people who must use the words." -Philip K. Dick
Reply With Quote
  #3   (View Single Post)  
Old 4 Weeks Ago
Beastie Beastie is offline
Daemonology student
 
Join Date: Jan 2009
Location: /dev/earth0
Posts: 323
Default

Yes, it's as roddierod said. I just wanted to add a small reminder that file systems on *BSD (and in general most FS on other - non-Microsoft - systems) are case sensitive, so you can easily have both ImageMagick and imagemagick in the same directory. And these will not be listed sequentially. You'll have the imagemagick in the list that comes after the last [A-Z]... file.
__________________
May the source be with you!
Reply With Quote
  #4   (View Single Post)  
Old 4 Weeks Ago
ripe's Avatar
ripe ripe is offline
Shell Scout
 
Join Date: Feb 2013
Location: Occitanie, France
Posts: 90
Default

Ah ok thanks you!
Reply With Quote
  #5   (View Single Post)  
Old 4 Weeks Ago
ibara's Avatar
ibara ibara is offline
Real-life IT professor
 
Join Date: Jan 2014
Posts: 717
Default

Ideally, ports would all be lowercase or begin with a numeral. But in practice, as you can see, there are some exceptions.
Reply With Quote
  #6   (View Single Post)  
Old 4 Weeks Ago
ripe's Avatar
ripe ripe is offline
Shell Scout
 
Join Date: Feb 2013
Location: Occitanie, France
Posts: 90
Default

I did not notice the sort with Capitals and then small letters, thanks to roddierod and Beastie I understand why the tree is like that.
Exceptions are often everywhere ahah! That life hihi
Reply With Quote
  #7   (View Single Post)  
Old 4 Weeks Ago
Beastie Beastie is offline
Daemonology student
 
Join Date: Jan 2009
Location: /dev/earth0
Posts: 323
Default

BTW, you'll get the same result on your own system using ls, because what servers do when you request a directory listing online is essentially the same as what happens on your local machine. The output is just neatly dressed in HTML/CSS using a templating engine. That's all.

ls -l /usr/local/etc should give you a similar mix of [a-z] and [A-Z].
__________________
May the source be with you!
Reply With Quote
  #8   (View Single Post)  
Old 4 Weeks Ago
ripe's Avatar
ripe ripe is offline
Shell Scout
 
Join Date: Feb 2013
Location: Occitanie, France
Posts: 90
Default

Yes I check
Code:
ls -l /usr/ports/
and it done the same sort.
Reply With Quote
  #9   (View Single Post)  
Old 4 Weeks Ago
ip6ix's Avatar
ip6ix ip6ix is online now
Real Name: Neil
Port Guard
 
Join Date: Sep 2017
Location: Wales, UK
Posts: 42
Default

On Linux systems (and I thought, on OpenBSD), the sort or collation in ls(1) is dependant on the value of the LC_COLLATE locale setting. For example in Linux doing:

Quote:
LC_COLLATE=en_GB.UTF-8 ls
results in ls producing output with 'a' alongside 'A' in the sorted output. Normally LC_COLLATE is set to C (or POSIX) to produce the caps first output.

I tried the same on OpenBSD but it didn't make a difference to the sort order, so I suspect this is not (yet?) supported on OpenBSD.
__________________
dc -e '[q]sa[ln0=aln256%Pln256/snlbx]sb12247225403800449909543746snlbxq'
Reply With Quote
Old 4 Weeks Ago
fvgit's Avatar
fvgit fvgit is online now
Spikes in tights
 
Join Date: May 2016
Location: perl -MMIME::Base64 -le 'print decode_base64("U2hlcndvb2QgRm9yZXN0")'
Posts: 196
Default

Quote:
I tried the same on OpenBSD but it didn't make a difference to the sort order, so I suspect this is not (yet?) supported on OpenBSD.
The setlocale(3) manpage has the answer:
Quote:
(...) On OpenBSD, the only useful value for the category is LC_CTYPE. It sets
the locale used for character encoding, character classification, and
case conversion. For compatibility with natural language support in
packages(7), all other categories LC_COLLATE, LC_MESSAGES, LC_MONETARY,
LC_NUMERIC, and LC_TIME can be set and retrieved, too, but their values
are ignored by the OpenBSD C library.
A category of LC_ALL sets the
entire locale generically.
Reply With Quote
Old 3 Weeks Ago
IdOp's Avatar
IdOp IdOp is offline
Too dumb for a smartphone
 
Join Date: May 2008
Location: twisting on the daemon's fork(2)
Posts: 877
Default

I tried it on Slackware Linux and got the same result each time.

Here are the default environment variables I have:

LC_ALL=POSIX

LC_COLLATE=C

LC_CTYPE=en_US.UTF-8

First, the default behaviour:

% ls -1
A
Z
a


and then:

% LC_COLLATE=en_GB.UTF-8 ls -1
A
Z
a




PS: I also tried changing LC_CTYPE instead of LC_COLLATE, with the same result.
Reply With Quote
Old 3 Weeks Ago
ip6ix's Avatar
ip6ix ip6ix is online now
Real Name: Neil
Port Guard
 
Join Date: Sep 2017
Location: Wales, UK
Posts: 42
Default

Now that's odd. I'm on Arch Linux:

Code:
% mkdir foo && cd foo
% touch 01 AA BB CC aa bb cc
% LC_COLLATE=C ls -1
01
AA
BB
CC
aa
bb
cc
% LC_COLLATE=en_GB.UTF-8 ls -1
01
aa
AA
bb
BB
cc
CC
% locale
LANG=en_GB.UTF-8
LC_CTYPE="en_GB.UTF-8"
LC_NUMERIC="en_GB.UTF-8"
LC_TIME="en_GB.UTF-8"
LC_COLLATE=C
LC_MONETARY="en_GB.UTF-8"
LC_MESSAGES="en_GB.UTF-8"
LC_PAPER="en_GB.UTF-8"
LC_NAME="en_GB.UTF-8"
LC_ADDRESS="en_GB.UTF-8"
LC_TELEPHONE="en_GB.UTF-8"
LC_MEASUREMENT="en_GB.UTF-8"
LC_IDENTIFICATION="en_GB.UTF-8"
LC_ALL=
__________________
dc -e '[q]sa[ln0=aln256%Pln256/snlbx]sb12247225403800449909543746snlbxq'
Reply With Quote
Old 3 Weeks Ago
IdOp's Avatar
IdOp IdOp is offline
Too dumb for a smartphone
 
Join Date: May 2008
Location: twisting on the daemon's fork(2)
Posts: 877
Default

Thanks! Here's some further information from my system:

% export LC_CTYPE LC_COLLATE

% echo $LC_CTYPE
en_US.UTF-8


% echo $LC_COLLATE
C


Those are what I reported above. But then this:

% locale
LANG=en_US
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=POSIX


Note that LC_CTYPE and LC_COLLATE are not the same as above, and are reported in double quotes, which seems to indicate default settings. This seems odd to me, but I am not too familiar with these kinds of settings at all.

If someone has a ready explanation, that would be cool, but please don't spend much time on it since I am ok with how it is working.
Reply With Quote
Old 3 Weeks Ago
ip6ix's Avatar
ip6ix ip6ix is online now
Real Name: Neil
Port Guard
 
Join Date: Sep 2017
Location: Wales, UK
Posts: 42
Default

I believe "POSIX" is the default, unconfigured setting. I'm unfamiliar with Slackware, but a cursory Google search came up with this: https://docs.slackware.com/slackware:localization

On Arch, adding the line

Code:
LANG=en_GB.UTF-8
to /etc/locale.conf was enough to configure the locale globally. This file is read by /etc/profile.d/locale.sh, again on Arch. Similar, comparable mechanisms are available on Slackware.
__________________
dc -e '[q]sa[ln0=aln256%Pln256/snlbx]sb12247225403800449909543746snlbxq'
Reply With Quote
Old 3 Weeks Ago
IdOp's Avatar
IdOp IdOp is offline
Too dumb for a smartphone
 
Join Date: May 2008
Location: twisting on the daemon's fork(2)
Posts: 877
Default

Thank you for that I will have to take a look; global things are probably set in /etc/profile, and then I added some tweaks. With your link, the locale man page and some experimenting I should probably be able to figure it out.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Ports tree for 5.9 Locked shep OpenBSD Installation and Upgrading 1 25th February 2016 11:03 AM
OpenBSD 4.8 ports tree locked! ocicat News 0 2nd August 2010 07:31 PM
Is my ports tree corrupt or sth? TerryP FreeBSD Ports and Packages 1 29th June 2010 09:51 PM
GCC in src tree or in ports tree vigol FreeBSD Ports and Packages 2 6th December 2009 04:34 PM
Mount smb in zfs tree mururoa FreeBSD Installation and Upgrading 0 15th November 2009 04:02 PM


All times are GMT. The time now is 11:17 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick