[modules-dev] Initial repository management tool
Dave Bristor
David.Bristor at Sun.COM
Thu Jul 19 15:51:13 PDT 2007
Andreas Sterbenz wrote:
> Dave Bristor wrote:
>
>>> . getMAIText(): should this really say "platform?" if platform is
>>> null, etc? Rather than an empty string, or "generic", or "n/a"?
>>
>>
>> I like "generic" for platform and arch, if for no other reason than
>> I'm used to it in bugster. Do you have a suggestion for time and
>> file? I kind of want to convey what it is that's unknown. I left
>> them as-is for now, but am open to suggestions. Perhaps it would help
>> if there were column headings?
>
>
> For time and file, I can imagine "n/a", "-", or "" (leaving it blank).
> Column headings would seem useful.
I added column headings, used n/a when appropriate, and shortened the width of
the output.
>>> . the distinction between "list" and "find" (and "query") seems
>>> rather subtle. Do we need those as separate commands? Or could module
>>> name and version merely be optional parameters?
>>
>>
>> I used ruby "gems" as a model, as suggested by Stanley and the EG:
>> http://rubygems.org/read/chapter/2#page3
>> http://docs.rubygems.org/read/book/2
>> Gem has separate commands for list vs. query. Unix, etc. have
>> directory listing sepate from directory searching. That's the
>> rationale. Conceptually listing and findind seem separate to me (my
>> $0.02).
>
>
> Well, I use "ls" both to list all files and to list ("find") a
> particular file:
>
> # ls -l
> # ls -l JRepo.java
> # ls -l *.java
>
> Unix find serves a different purpose. I use it when I need to use its
> more complex options (-type, -perm, -mtime, etc) or to search for
> something in a large directory hierarchy.
>
> The current JRepo "list" and "find" don't have that those differences
> and there is no conflict in their options, so I am not sure what the
> advantage of keeping them separate is. FWIW, "gem list" also supports
> listing modules with a given name.
I tried it your way, and am convinced. So currently the only command is
"list", which takes an optional module name; as with gem, the name arg is the
beginning of the name and all matches will be printed:
% /data/ws/db-jam/build/solaris-i586/bin/jrepo list -p -v -r
http://openjdk.java.net/projects/modules/samplerepo java
Bootstrap repository
Name Version Platform Arch Modified Filename
java.se 1.7 generic generic n/a n/a
java.classpath 1.7 generic generic n/a n/a
In other news: by popular request, Command is now a static class; ListCommand
is not because it depends on state in JRepo itself (e.g. moduleName). As I
add more commands (install will hopefully be next) I hope to make ListCommand
and others be static.
Tests passing and webrev updated:
http://javaweb.sfbay/java/jdk/ws/libs/rev/6559117/
Thanks,
Dave
>
> Andreas.
>
More information about the modules-dev
mailing list