[pacman-dev] [PATCH] cachemoney: add new contrib script

Dan McGee dpmcgee at gmail.com
Tue Aug 2 08:42:13 EDT 2011

On Tue, Aug 2, 2011 at 7:35 AM, Dave Reisner <d at falconindy.com> wrote:
> On Tue, Aug 02, 2011 at 11:42:05AM +1000, Allan McRae wrote:
>> On 01/08/11 02:15, Dave Reisner wrote:
>> >On Sun, Jul 31, 2011 at 01:47:03PM +1000, Allan McRae wrote:
>> >>
>> >>Do this script cover all or most of the features of these scripts?
>> >>I'm sure the maintainers would be "happy" if there is a name
>> >>conflict if the script we supply covers their functionality.
>> >>
>> >
>> >Time to re-review!
>> <snip>
>> I agree with passing over those scripts snipped here...   I agree
>> that the following two are really what this script is aiming to
>> replace:
>> >>>* clearcache
>> >
>> >bash4. Its nearly at feature parity with mine. Doesn't offer the same
>> >level of output control or the ability to move packages. It's written by
>> >DJ Mills, so this one actually works. It has the interesting approach of
>> >extracting and parsing the .PKGINFO file from each .pkg.tar?(.*) so its
>> >possibly more accurate, but very slow. This is the only one worth
>> >talking about in comparison with mine.
>> I guess the reading of .PKGINFO now is mostly redundant these days
>> as the version is more completely specified with the addition of
>> epoch instead of "force"  (which really made packages impossible to
>> order...)
> The "bonus" is that you'll catch files not fitting my naming schema. I
> think that this is somewhat of an odd case and not really required.
>> >>>* pacprune
>> >
>> >Late entry. Pat Brisbin's bash script which is meant to be mostly
>> >utilitarian, but scores extremely high in that category. Doesn't,
>> >however, offer the ability to do things like prune uninstalled packages
>> >easily. Size calculations is possible for the crafty, but not inline
>> >with another operation.
>> From your description of these scripts, I think we should include
>> your script in contrib.
>> Minor comments:
>>  - Add paccache (or whatever it is named...) to contrib/.gitignore
> done
>>  - Adjust "cachemoney - clean yo pacman cache, dawg"....
> already done.
>>  - whitespace:
>> +     function parse_filename(filename,     parts, count, i, pkgname, arch) {
> Intentional awk-ism. You have no direct way of locally scoping a
> variable except by declaring it as part of the function parameter list
> (parameters are always optional). By convention, there's a chunk of
> whitespace between "required" parameters and scoped variables.
>>  - Adjust "Bad dog, no biscuit. You will be prompted for privilege
>> escalation."
> done.
>>  - is the ":" in front of the "a" right?
>> +while getopts ':a:c:dfhi:k:m:rsuvz' opt; do
> Intentional. It causes getopts to squelch its own error reporting so
> that I can do it myself.
>>  - it should also (re)move and .sig file alongside the package
> Yes, good point. Will implement this.
> In the meantime, I've also made the diskspace option the default, since
> its only adding a single fork (and the stat call itself is fairly light
> even for a thousand packages).

Damn- you're going to have to turn this into a patch as I just pushed
a version from your repo. This is also the second time you have
forgotten to update gitignore, young grasshopper.


More information about the pacman-dev mailing list