Welcome to the Pacman bug tracker. Please search the current bugs and feature requests before filing a new one! Use advanced search and select "Search in Comments".

* Please select the correct category and version.
* Write a descriptive summary, background info, and provide a reproducible test case whenever possible.

FS#31749 - Add a whitelist to the NoExtract functionality

Attached to Project: Pacman
Opened by JB (techryda) - Monday, 01 October 2012, 13:45 GMT
Last edited by Allan McRae (Allan) - Sunday, 02 February 2014, 06:59 GMT
Task Type Feature Request
Category General
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version 4.1.2
Due in Version 4.2.0
Due Date Undecided
Percent Complete 100%
Votes 4
Private No


In pacman.conf it would be useful to add a NoExtractWhitelist= or NoExtractException= directive.

NoExtract = usr/share/locale/*
NoExtractException = usr/share/locale/en_US/*

The use case I have in mind for this is the /usr/share/locale/ directory.
On my laptop I have no problem with this directory, but I install arch to usb keys frequently and
it would be good to be able to blacklist the the 100MB+ and ~2500 files that I don't use w/o having to add every locale
other than my own to the NoExtract line.
This task depends upon

Closed by  Allan McRae (Allan)
Sunday, 02 February 2014, 06:59 GMT
Reason for closing:  Implemented
Additional comments about closing:  git commit dfcea145
Comment by Greg (dolby) - Monday, 01 October 2012, 14:23 GMT
I recommend using localepurge:
It does exactly what you want.
Comment by JB (techryda) - Monday, 01 October 2012, 14:57 GMT
Thanks for the link Greg, unfortunately it doesn't do what I need.

I want to prevent the locale files for other languages from ever being written.
I want to save write cycles and wasted time on my flash drives. Localepurge, according
to what I've read, waits until after your package manager finishes and then cleans up.
I could add an inotify watch to do that, but it would actually write to the drive even

Also, my proposed solution would be generally useful. I can't think of any other case right now
but I'm sure it would prove itself in other use cases.
Comment by Patrick Steinhardt (pks) - Saturday, 01 June 2013, 22:12 GMT
A better alternative might be to enable (Perl) regular expressions for NoExtract. Your use-case might be solved with negative look-aheads then:

NoExtract = usr/share/locale/(?!en_US)*
Comment by Patrick Steinhardt (pks) - Monday, 03 June 2013, 10:51 GMT
The attached patch adds the possibility to use extended Perl regular expressions for NoExtract.