Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   ArchLinux User Repository (http://www.linux-archive.org/archlinux-user-repository/)
-   -   make pacman case-insensitive. (http://www.linux-archive.org/archlinux-user-repository/711763-make-pacman-case-insensitive.html)

Dave Reisner 10-12-2012 12:47 PM

make pacman case-insensitive.
 
On Fri, Oct 12, 2012 at 08:43:53PM +0800, Tianjiao Yin wrote:
> Hello, all:
>
> When we run "pacman -S Firefox", we will get "error: target not found:
> Firefox" because there is only firefox, not Firefox, in repo. IMHO it
> could be better if pacman is case insensitive.
>
> Regards,
> Mizuchi

Pardon? This is already the case:

$ pacman -Ssq FIREFOX | wc -l
184

Sure enough, we use case insensitive regex. From lib/libalpm/db.c:

if(regcomp(&reg, targ, REG_EXTENDED | REG_NOSUB | REG_ICASE | REG_NEWLINE) != 0) {
...

Please make sure pacman isn't an alias or wrapper to some other program
that isn't pacman.

Cheers,
Dave

Dave Reisner 10-12-2012 01:11 PM

make pacman case-insensitive.
 
On Fri, Oct 12, 2012 at 02:59:22PM +0200, Karol Blazewicz wrote:
> On Fri, Oct 12, 2012 at 2:47 PM, Dave Reisner <d@falconindy.com> wrote:
> > On Fri, Oct 12, 2012 at 08:43:53PM +0800, Tianjiao Yin wrote:
> >> Hello, all:
> >>
> >> When we run "pacman -S Firefox", we will get "error: target not found:
> >> Firefox" because there is only firefox, not Firefox, in repo. IMHO it
> >> could be better if pacman is case insensitive.
> >>
> >> Regards,
> >> Mizuchi
> >
> > Pardon? This is already the case:
>
> Are you sure?
>
> $ sudo pacman -S Firefox
> error: target not found: Firefox
> $ type -a pacman
> pacman is /usr/bin/pacman

Oh. No, -S and -R are not. This is intentional and will not be changed.

"Lone_Wolf" 10-12-2012 02:22 PM

make pacman case-insensitive.
 
> Hello, all:
>
> When we run "pacman -S Firefox", we will get "error: target not found:
> Firefox" because there is only firefox, not Firefox, in repo. IMHO it
> could be better if pacman is case insensitive.
>
> Regards,
> Mizuchi
>
>
Bad idea for several reasons :

- Arch package names are all lower-case .
- linux filesystems are case sensitive by default
On linux This.txt and this.txt are 2 DIFFERENT files.

Case Matters.


All times are GMT. The time now is 09:19 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.