Exception if <package>.wrapdesc is readonly

5 views
Skip to first unread message

Ivan Laktyunkin

unread,
Sep 14, 2011, 5:59:46 AM9/14/11
to OpenWrap Development Mailing List
I get exception when trying to update project repository and
<package>.wrapdesc is readonly.
Why?

# OpenWrap Shell 2.0.0.3
# Copyright c naughtyProd Limited 2009-2011
# Using C:\p4\whole\dbrox\main\SmartClient3.1\Aces\wraps\_cache
\openwrap-2.0.0.81133579\bin-net35\OpenWrap.dll (2.0.0.0)

Updating project packages...
Project repository: openwrap up-to-date.
Project repository: SharpZipLib up-to-date.
Project repository: openfilesystem up-to-date.
Project repository: tdnet-framework up-to-date.
Project repository: Mono.Cecil up-to-date.
Project repository: Platform up-to-date.
Project repository: Castle.Windsor up-to-date.
Project repository: NLog up-to-date.
Project repository: Rx-40 up-to-date.
Project repository: NUnit up-to-date.
Project repository: RhinoMocks up-to-date.
Project repository: Tibco up-to-date.
Project repository: NetAdvantage up-to-date.
# OpenWrap Shell could not start.

Exception has been thrown by the target of an invocation.
System.Reflection.TargetInvocationException: Exception has been thrown
by the target of an invocation. --->
System.UnauthorizedAccessException: Access to the path 'C:\p4\whole
\dbrox\main\SmartClient3.1\Aces\Aces.Sdk.wrapdesc' is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String
maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess
access, Int32 rights, Boolean useRights, FileShare share, Int32
bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String
msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode,
FileAccess access, FileShare share, Int32 bufferSize)
at System.IO.File.OpenFile(String path, FileAccess access,
SafeFileHandle& handle)
at System.IO.File.SetLastWriteTimeUtc(String path, DateTime
lastWriteTimeUtc)
at System.IO.FileSystemInfo.set_LastWriteTimeUtc(DateTime value)
at
OpenFileSystem.IO.FileSystems.Local.LocalFile.set_LastModifiedTimeUtc(Nullable`1
value) in c:\TeamCity\buildAgent\work\c71e0c1ab1563c43\src
\OpenFileSystem\FileSystems\Local\LocalFile.cs:line 81
at OpenWrap.PackageModel.PackageDescriptorExtensions.Touch(IFile
file) in c:\src\openwrap\src\OpenWrap\PackageModel
\PackageDescriptorExtensions.cs:line 30
at
OpenWrap.Commands.Wrap.UpdateWrapCommand.<UpdateProjectPackages>d__e.MoveNext()
in c:\src\openwrap\src\OpenWrap.Commands\Wrap
\UpdateWrapCommand.cs:line 103
at System.Linq.Enumerable.<ConcatIterator>d__71`1.MoveNext()
at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
at OpenWrap.Commands.AbstractCommand.<Execute>d__0.MoveNext() in c:
\src\openwrap\src\OpenWrap\Commands\AbstractCommand.cs:line 23
at OpenWrap.Commands.Cli.CommandLineRunner.<Run>d__b.MoveNext() in
c:\src\openwrap\src\OpenWrap\Commands\Cli\CommandLineRunner.cs:line 95
at OpenWrap.Commands.Cli.ConsoleCommandExecutor.Execute(String
commandLine, IEnumerable`1 optionalInputs) in c:\src\openwrap\src
\OpenWrap\Commands\Cli\ConsoleCommandExecutor.cs:line 39
at OpenWrap.Commands.Cli.ShellRunner.Main(IDictionary`2 env) in c:
\src\openwrap\src\OpenWrap\Commands\Cli\ShellRunner.cs:line 55
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle._InvokeMethodFast(Object target,
Object[] arguments, SignatureStruct& sig, MethodAttributes
methodAttributes, RuntimeTypeHandle typeOwner)
at System.RuntimeMethodHandle.InvokeMethodFast(Object target,
Object[] arguments, Signature sig, MethodAttributes methodAttributes,
RuntimeTypeHandle typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj,
BindingFlags invokeAttr, Binder binder, Object[] parameters,
CultureInfo culture, Boolean skipVisibilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj,
BindingFlags invokeAttr, Binder binder, Object[] parameters,
CultureInfo culture)
at
OpenWrap.BootstrapRunner.<>c__DisplayClass16.<LoadEntrypointCache>b__15(IDictionary`2
env)
at OpenWrap.BootstrapRunner.ExecuteEntrypoint(KeyValuePair`2
entryPoint, IEnumerable`1 assemblies, IEnumerable`1 consumedArgs)
at OpenWrap.BootstrapRunner.Run(String[] args)

Sebastien Lambla

unread,
Sep 14, 2011, 11:56:59 AM9/14/11
to openwra...@googlegroups.com
As the name indicates, you're doing an update on readonly files. I assume your'e using something like TFS, which locks all files until they're checked out?

The fix is to make sure you have checked out any writeable files when using OpenWrap. The proposed alternative we've discussed before was to force the files as read/write before writing to them, but I'm very concerned that older versions of TFS will go bonkers on this.

Ivan Laktyunkin

unread,
Sep 15, 2011, 12:00:24 AM9/15/11
to OpenWrap Development Mailing List
Thank you.

The quesion is: why openwrap needs wrapdesc to be writable? It didn't
need it before and it doesn't change it now.

Sebastien Lambla

unread,
Sep 15, 2011, 7:18:45 AM9/15/11
to openwra...@googlegroups.com
Because the descriptor last-modified-date is used for change detection across the codebase. We touch the file whenever there's a change in packages of any kind.

-----Original Message-----
From: openwra...@googlegroups.com [mailto:openwra...@googlegroups.com] On Behalf Of Ivan Laktyunkin
Sent: 15 September 2011 05:00
To: OpenWrap Development Mailing List

Ivan Laktyunkin

unread,
Sep 15, 2011, 7:56:21 AM9/15/11
to OpenWrap Development Mailing List
Is it a new feature? 1.1 works fine with read-only descriptors

Sebastien Lambla

unread,
Sep 15, 2011, 8:52:41 AM9/15/11
to openwra...@googlegroups.com
1.1 was touching the file only when package descriptors require change, we now always do a touch whenever there's been any package change. How big an issue is it for you? How do you handle readonly on the packages themselves?

-----Original Message-----
From: openwra...@googlegroups.com [mailto:openwra...@googlegroups.com] On Behalf Of Ivan Laktyunkin
Sent: 15 September 2011 12:56
To: OpenWrap Development Mailing List
Subject: [openwrap-devl] Re: Exception if <package>.wrapdesc is readonly

Ivan Laktyunkin

unread,
Sep 16, 2011, 3:45:25 AM9/16/11
to OpenWrap Development Mailing List
It is just an inconvenience, but very unpleasant :). We don't store
project packages in perforce (our source control system) so there is
no problem with them.

Sebastien Lambla

unread,
Sep 16, 2011, 9:17:14 AM9/16/11
to openwra...@googlegroups.com
The alternative would be to monitor for changes on a marker file that gets generated in /wraps, but that's gonna have some of the same issues as the wrap descriptor if things are under source control.

Do you know how perforce reacts if the readonly flag is removed from the file without going through it first?

-----Original Message-----
From: openwra...@googlegroups.com [mailto:openwra...@googlegroups.com] On Behalf Of Ivan Laktyunkin
Sent: 16 September 2011 08:45
To: OpenWrap Development Mailing List
Subject: [openwrap-devl] Re: Exception if <package>.wrapdesc is readonly

Ivan Laktyunkin

unread,
Sep 21, 2011, 9:30:28 AM9/21/11
to OpenWrap Development Mailing List
I suppose it doesn't matter for perforce whether readonly flag exists
or not. It puts it by default.

To my mind I prefer market file in /wraps directory. We don't store
wraps under source control as they maybe resolved in any moment from
central repository

Sebastien Lambla

unread,
Sep 21, 2011, 10:53:29 AM9/21/11
to openwra...@googlegroups.com
Hm. But if you change the wrapdesc because you add / remove a dependency, you still need to checkout that file, are you saying it's something you'd rather do but not when things are only changing actual package versions?

I'm ok with having external cookie files if people prefer that, but it's goint to be fairly low priority for us.
________________________________________
From: openwra...@googlegroups.com [openwra...@googlegroups.com] on behalf of Ivan Laktyunkin [lakt...@mail.ru]
Sent: 21 September 2011 14:30


To: OpenWrap Development Mailing List
Subject: [openwrap-devl] Re: Exception if <package>.wrapdesc is readonly

I suppose it doesn't matter for perforce whether readonly flag exists

Reply all
Reply to author
Forward
0 new messages