You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wookie.apache.org by Mark Johnson <ma...@barrenfrozenwasteland.com> on 2010/04/03 17:37:16 UTC

build-widget includes hidden files

I just noticed that my widget (which I manage with git) took a lot longer to 
build than the others included with Wookie.
Upon investigation, it looks like this is because when creating the archive, 
all hidden files are included as well. In my case, this includes the entire Git 
repository.

Is this the correct behaviour? As far as I'm aware the none of the required 
files for a widget are hidden, and I'm hard pressed to think of an example when 
one would want a hidden file in a widget. Should the build-widget processed be 
changed to ignore hidden files?

Mark

Re: build-widget includes hidden files

Posted by Mark Johnson <ma...@barrenfrozenwasteland.com>.
On Sunday 04 Apr 2010 11:05:57 Scott Wilson wrote:
> On 4 Apr 2010, at 00:05, Mark Johnson wrote:
> > On Saturday 03 Apr 2010 22:51:02 Scott Wilson wrote:
> >> On 3 Apr 2010, at 22:14, Mark Johnson wrote:
> >>> On Saturday 03 Apr 2010 21:32:50 Scott Wilson wrote:
> >>>> On 3 Apr 2010, at 20:38, Mark Johnson wrote:
> >>>>> On Saturday 03 Apr 2010 19:56:17 Scott Wilson wrote:
> >>>>>> On 3 Apr 2010, at 16:37, Mark Johnson wrote:
> >>>>>> I wonder if it all zips up all the .svn metadata when building the
> >>>>>> included widgets..? Hmm, nope it doesn't appear to.
> >>>>>>
> >>>>>> I wonder what the difference is with the git files?
> >>>>>
> >>>>> Very strange indeed!
> >>>>> The ownership and permissions on the .git and .svn folders appear to
> >>>>> be the same...
> >>>>> There's no hard coding in the build process to specifically ignore
> >>>>> subversion stuff is there?
> >>>>
> >>>> After a little digging... there is a default excludes set in Ant's Zip
> >>>> task:
> >>>>
> >>>> There are a set of definitions that are excluded by default from all
> >>>> directory-based tasks. They are: **/*~
> >>>>    **/#*#
> >>>>    **/.#*
> >>>>    **/%*%
> >>>>    **/._*
> >>>>    **/CVS
> >>>>    **/CVS/**
> >>>>    **/.cvsignore
> >>>>    **/SCCS
> >>>>    **/SCCS/**
> >>>>    **/vssver.scc
> >>>>    **/.svn
> >>>>    **/.svn/**
> >>>>    **/.DS_Store
> >>>> So that would explain it!
> >>>
> >>> Indeed I would! Can we add something to the build.xml to exclude .git
> >>> also? (I'm not familiar with ant configuration so I honestly have no
> >>> idea).
> >>
> >> Yes, I think if we had an exclude attribute to the zip ant task in
> >> widgets/build.xml that should do it:
> >>
> >> 	    <zip destfile="${widget.build.dir}/${widget.shortname}.wgt"
> >> 	         basedir="${wookie.widgets.dir}/${widget.shortname}"
> >> 		 excludes="**/.git **/.git/**"
> >> 	    />
> >>
> >> Try this and see if it works.
> >
> > That does the job, thanks! However, as Gav suspected, it does seem to
> > override the defaults. I created a dummy .cvs folder to see if it was
> > included, and it was, so some additional thought is required if we want
> > .git excluded by default (should probably exclude .gitignore as well,
> > like the defaults do with .cvsignore).
> 
> Ah, I hadn't thought of that, its not in the Ant doc I read; maybe it could
>  be fixed with:
> 
> 	    <zip destfile="${widget.build.dir}/${widget.shortname}.wgt"
> 	         basedir="${wookie.widgets.dir}/${widget.shortname}"
> 		 excludes="**/.git **/.git/**"
> 		 defaultexcludes="yes"
> 	    />
> 

Sweet, then job's a good'n!

Cheers
Mark

Re: build-widget includes hidden files

Posted by Scott Wilson <sc...@gmail.com>.
On 4 Apr 2010, at 00:05, Mark Johnson wrote:

> On Saturday 03 Apr 2010 22:51:02 Scott Wilson wrote:
>> On 3 Apr 2010, at 22:14, Mark Johnson wrote:
>>> On Saturday 03 Apr 2010 21:32:50 Scott Wilson wrote:
>>>> On 3 Apr 2010, at 20:38, Mark Johnson wrote:
>>>>> On Saturday 03 Apr 2010 19:56:17 Scott Wilson wrote:
>>>>>> On 3 Apr 2010, at 16:37, Mark Johnson wrote:
>>>>>> I wonder if it all zips up all the .svn metadata when building the
>>>>>> included widgets..? Hmm, nope it doesn't appear to.
>>>>>> 
>>>>>> I wonder what the difference is with the git files?
>>>>> 
>>>>> Very strange indeed!
>>>>> The ownership and permissions on the .git and .svn folders appear to be
>>>>> the same...
>>>>> There's no hard coding in the build process to specifically ignore
>>>>> subversion stuff is there?
>>>> 
>>>> After a little digging... there is a default excludes set in Ant's Zip
>>>> task:
>>>> 
>>>> There are a set of definitions that are excluded by default from all
>>>> directory-based tasks. They are: **/*~
>>>>    **/#*#
>>>>    **/.#*
>>>>    **/%*%
>>>>    **/._*
>>>>    **/CVS
>>>>    **/CVS/**
>>>>    **/.cvsignore
>>>>    **/SCCS
>>>>    **/SCCS/**
>>>>    **/vssver.scc
>>>>    **/.svn
>>>>    **/.svn/**
>>>>    **/.DS_Store
>>>> So that would explain it!
>>> 
>>> Indeed I would! Can we add something to the build.xml to exclude .git
>>> also? (I'm not familiar with ant configuration so I honestly have no
>>> idea).
>> 
>> Yes, I think if we had an exclude attribute to the zip ant task in
>> widgets/build.xml that should do it:
>> 
>> 	    <zip destfile="${widget.build.dir}/${widget.shortname}.wgt"
>> 	         basedir="${wookie.widgets.dir}/${widget.shortname}"
>> 		 excludes="**/.git **/.git/**"
>> 	    />
>> 
>> Try this and see if it works.
> 
> That does the job, thanks! However, as Gav suspected, it does seem to override 
> the defaults. I created a dummy .cvs folder to see if it was included, and it 
> was, so some additional thought is required if we want .git excluded by 
> default (should probably exclude .gitignore as well, like the defaults do with 
> .cvsignore).

Ah, I hadn't thought of that, its not in the Ant doc I read; maybe it could be fixed with:

	    <zip destfile="${widget.build.dir}/${widget.shortname}.wgt"
	         basedir="${wookie.widgets.dir}/${widget.shortname}"
		 excludes="**/.git **/.git/**"
		 defaultexcludes="yes"
	    />


> Cheers
> Mark


Re: build-widget includes hidden files

Posted by Mark Johnson <ma...@barrenfrozenwasteland.com>.
On Saturday 03 Apr 2010 22:51:02 Scott Wilson wrote:
> On 3 Apr 2010, at 22:14, Mark Johnson wrote:
> > On Saturday 03 Apr 2010 21:32:50 Scott Wilson wrote:
> >> On 3 Apr 2010, at 20:38, Mark Johnson wrote:
> >>> On Saturday 03 Apr 2010 19:56:17 Scott Wilson wrote:
> >>>> On 3 Apr 2010, at 16:37, Mark Johnson wrote:
> >>>> I wonder if it all zips up all the .svn metadata when building the
> >>>> included widgets..? Hmm, nope it doesn't appear to.
> >>>>
> >>>> I wonder what the difference is with the git files?
> >>>
> >>> Very strange indeed!
> >>> The ownership and permissions on the .git and .svn folders appear to be
> >>> the same...
> >>> There's no hard coding in the build process to specifically ignore
> >>> subversion stuff is there?
> >>
> >> After a little digging... there is a default excludes set in Ant's Zip
> >> task:
> >>
> >> There are a set of definitions that are excluded by default from all
> >> directory-based tasks. They are: **/*~
> >>     **/#*#
> >>     **/.#*
> >>     **/%*%
> >>     **/._*
> >>     **/CVS
> >>     **/CVS/**
> >>     **/.cvsignore
> >>     **/SCCS
> >>     **/SCCS/**
> >>     **/vssver.scc
> >>     **/.svn
> >>     **/.svn/**
> >>     **/.DS_Store
> >> So that would explain it!
> >
> > Indeed I would! Can we add something to the build.xml to exclude .git
> > also? (I'm not familiar with ant configuration so I honestly have no
> > idea).
> 
> Yes, I think if we had an exclude attribute to the zip ant task in
>  widgets/build.xml that should do it:
> 
> 	    <zip destfile="${widget.build.dir}/${widget.shortname}.wgt"
> 	         basedir="${wookie.widgets.dir}/${widget.shortname}"
> 		 excludes="**/.git **/.git/**"
> 	    />
> 
> Try this and see if it works.

That does the job, thanks! However, as Gav suspected, it does seem to override 
the defaults. I created a dummy .cvs folder to see if it was included, and it 
was, so some additional thought is required if we want .git excluded by 
default (should probably exclude .gitignore as well, like the defaults do with 
.cvsignore).

Cheers
Mark

RE: build-widget includes hidden files

Posted by "Gav..." <ga...@16degrees.com.au>.

> -----Original Message-----
> From: Scott Wilson [mailto:scott.bradley.wilson@gmail.com]
> Sent: Sunday, 4 April 2010 7:51 AM
> To: wookie-dev@incubator.apache.org
> Subject: Re: build-widget includes hidden files
> 
> 
> On 3 Apr 2010, at 22:14, Mark Johnson wrote:
> 
> > On Saturday 03 Apr 2010 21:32:50 Scott Wilson wrote:
> >> On 3 Apr 2010, at 20:38, Mark Johnson wrote:
> >>> On Saturday 03 Apr 2010 19:56:17 Scott Wilson wrote:
> >>>> On 3 Apr 2010, at 16:37, Mark Johnson wrote:
> >>>> I wonder if it all zips up all the .svn metadata when building the
> >>>> included widgets..? Hmm, nope it doesn't appear to.
> >>>>
> >>>> I wonder what the difference is with the git files?
> >>>>
> >>>
> >>> Very strange indeed!
> >>> The ownership and permissions on the .git and .svn folders appear
> to be
> >>> the same...
> >>> There's no hard coding in the build process to specifically ignore
> >>> subversion stuff is there?
> >>
> >> After a little digging... there is a default excludes set in Ant's
> Zip
> >> task:
> >>
> >> There are a set of definitions that are excluded by default from all
> >> directory-based tasks. They are: **/*~
> >>     **/#*#
> >>     **/.#*
> >>     **/%*%
> >>     **/._*
> >>     **/CVS
> >>     **/CVS/**
> >>     **/.cvsignore
> >>     **/SCCS
> >>     **/SCCS/**
> >>     **/vssver.scc
> >>     **/.svn
> >>     **/.svn/**
> >>     **/.DS_Store
> >> So that would explain it!
> >>
> > Indeed I would! Can we add something to the build.xml to exclude .git
> also?
> > (I'm not familiar with ant configuration so I honestly have no idea).
> 
> Yes, I think if we had an exclude attribute to the zip ant task in
> widgets/build.xml that should do it:
> 
> 	    <zip destfile="${widget.build.dir}/${widget.shortname}.wgt"
> 	         basedir="${wookie.widgets.dir}/${widget.shortname}"
> 		 excludes="**/.git **/.git/**"
> 	    />
> 
> Try this and see if it works.

Hopefully, but bear in mind specifying an excludes line may override (cancel
out) the default exclude definitions you mentioned above ? Mentioned just in
case ...

Gav...

> 
> >
> > Cheers
> > Mark
> >




Re: build-widget includes hidden files

Posted by Scott Wilson <sc...@gmail.com>.
On 3 Apr 2010, at 22:14, Mark Johnson wrote:

> On Saturday 03 Apr 2010 21:32:50 Scott Wilson wrote:
>> On 3 Apr 2010, at 20:38, Mark Johnson wrote:
>>> On Saturday 03 Apr 2010 19:56:17 Scott Wilson wrote:
>>>> On 3 Apr 2010, at 16:37, Mark Johnson wrote:
>>>> I wonder if it all zips up all the .svn metadata when building the
>>>> included widgets..? Hmm, nope it doesn't appear to.
>>>> 
>>>> I wonder what the difference is with the git files?
>>>> 
>>> 
>>> Very strange indeed!
>>> The ownership and permissions on the .git and .svn folders appear to be
>>> the same...
>>> There's no hard coding in the build process to specifically ignore
>>> subversion stuff is there?
>> 
>> After a little digging... there is a default excludes set in Ant's Zip
>> task:
>> 
>> There are a set of definitions that are excluded by default from all
>> directory-based tasks. They are: **/*~
>>     **/#*#
>>     **/.#*
>>     **/%*%
>>     **/._*
>>     **/CVS
>>     **/CVS/**
>>     **/.cvsignore
>>     **/SCCS
>>     **/SCCS/**
>>     **/vssver.scc
>>     **/.svn
>>     **/.svn/**
>>     **/.DS_Store
>> So that would explain it!
>> 
> Indeed I would! Can we add something to the build.xml to exclude .git also? 
> (I'm not familiar with ant configuration so I honestly have no idea).

Yes, I think if we had an exclude attribute to the zip ant task in widgets/build.xml that should do it:

	    <zip destfile="${widget.build.dir}/${widget.shortname}.wgt"
	         basedir="${wookie.widgets.dir}/${widget.shortname}"
		 excludes="**/.git **/.git/**"
	    />

Try this and see if it works.

> 
> Cheers
> Mark
> 


Re: build-widget includes hidden files

Posted by Mark Johnson <ma...@barrenfrozenwasteland.com>.
On Saturday 03 Apr 2010 21:32:50 Scott Wilson wrote:
> On 3 Apr 2010, at 20:38, Mark Johnson wrote:
> > On Saturday 03 Apr 2010 19:56:17 Scott Wilson wrote:
> >> On 3 Apr 2010, at 16:37, Mark Johnson wrote:
> >> I wonder if it all zips up all the .svn metadata when building the
> >> included widgets..? Hmm, nope it doesn't appear to.
> >>
> >> I wonder what the difference is with the git files?
> >>
> >
> > Very strange indeed!
> > The ownership and permissions on the .git and .svn folders appear to be
> > the same...
> > There's no hard coding in the build process to specifically ignore
> > subversion stuff is there?
> 
> After a little digging... there is a default excludes set in Ant's Zip
>  task:
> 
> There are a set of definitions that are excluded by default from all
>  directory-based tasks. They are: **/*~
>      **/#*#
>      **/.#*
>      **/%*%
>      **/._*
>      **/CVS
>      **/CVS/**
>      **/.cvsignore
>      **/SCCS
>      **/SCCS/**
>      **/vssver.scc
>      **/.svn
>      **/.svn/**
>      **/.DS_Store
> So that would explain it!
> 
Indeed I would! Can we add something to the build.xml to exclude .git also? 
(I'm not familiar with ant configuration so I honestly have no idea).

Cheers
Mark


Re: build-widget includes hidden files

Posted by Scott Wilson <sc...@gmail.com>.
On 3 Apr 2010, at 20:38, Mark Johnson wrote:

> On Saturday 03 Apr 2010 19:56:17 Scott Wilson wrote:
>> On 3 Apr 2010, at 16:37, Mark Johnson wrote:
>> I wonder if it all zips up all the .svn metadata when building the included
>> widgets..? Hmm, nope it doesn't appear to.
>> 
>> I wonder what the difference is with the git files?
>> 
>>> Mark
>> 
> Very strange indeed!
> The ownership and permissions on the .git and .svn folders appear to be the 
> same...
> There's no hard coding in the build process to specifically ignore subversion 
> stuff is there?

After a little digging... there is a default excludes set in Ant's Zip task:

There are a set of definitions that are excluded by default from all directory-based tasks. They are:
     **/*~
     **/#*#
     **/.#*
     **/%*%
     **/._*
     **/CVS
     **/CVS/**
     **/.cvsignore
     **/SCCS
     **/SCCS/**
     **/vssver.scc
     **/.svn
     **/.svn/**
     **/.DS_Store
So that would explain it!

> 
> Mark


Re: build-widget includes hidden files

Posted by Mark Johnson <ma...@barrenfrozenwasteland.com>.
On Saturday 03 Apr 2010 19:56:17 Scott Wilson wrote:
> On 3 Apr 2010, at 16:37, Mark Johnson wrote:
> I wonder if it all zips up all the .svn metadata when building the included
>  widgets..? Hmm, nope it doesn't appear to.
> 
> I wonder what the difference is with the git files?
> 
> > Mark
> 
Very strange indeed!
The ownership and permissions on the .git and .svn folders appear to be the 
same...
There's no hard coding in the build process to specifically ignore subversion 
stuff is there?

Mark

Re: build-widget includes hidden files

Posted by Scott Wilson <sc...@gmail.com>.
On 3 Apr 2010, at 16:37, Mark Johnson wrote:

> I just noticed that my widget (which I manage with git) took a lot longer to 
> build than the others included with Wookie.
> Upon investigation, it looks like this is because when creating the archive, 
> all hidden files are included as well. In my case, this includes the entire Git 
> repository.
> 
> Is this the correct behaviour? As far as I'm aware the none of the required 
> files for a widget are hidden, and I'm hard pressed to think of an example when 
> one would want a hidden file in a widget. Should the build-widget processed be 
> changed to ignore hidden files?

That's a good point.

I wonder if it all zips up all the .svn metadata when building the included widgets..? Hmm, nope it doesn't appear to.

I wonder what the difference is with the git files?

> 
> Mark