CD: adding repositories

D

DPM

Tools: FP2007 CT2
Platform: Vista RC1

I'm using CDM to add a .sld to the database, and am told:

Copying 'NetMOS 9835' repository files to
\\VISTA-64\Repositories\{CE65317E-8700-4844-B67C-792B55DBF258}
Error: Cannot delete repository files in the target folder. Please make sure
you have write access to the files.

When I look at the repository list though, "{CE65...}" does not exist. Is
this a Vista permission problem? I know I've seen this problem on XP, and I
can't remember what I did to fix it.

Thanks for your help.
 
K

KM

Dean,

Please grant the account you are using write permissions to the repository share.
Or switch to use local paths to repository folders (check it out on CDM's Repository tab).
 
D

DPM

KM,

I did so, and that seemed to fix it - I was able to add my component. But
now, when I try to add the component in TD, TD says it cannot find the files
in the component, and lists the repositories it searched - none of which is
the repository listed below ("{CE65...}"). Did I build the component
incorrectly? Why won't TD search all repositories?

I thought I understood how these tools worked, but it's like I'm using them
for the first time again. Grr!

Regards,
Dean
 
M

Matt Kellner [MS]

Your component needs to also specify which repository to look in for its
files - this is mainly because the platform script enforces a search order
among repositories (at least for Windows components), where it will first
look in, say, the FP2007 QFE rep, then the FP07 Base rep, SP2 QFE, SP2 Base,
SP1 Base, etc... in order to find the most recent binaries. Because of
this, each component specifies the appropriate repository as its starting
point, and then each repository can specify a "fallback" to search in case
the specified binary wasn't found.

Your component needs to specify the new repository you're bringing in - this
can be done in Component Designer by editing the Repository property of the
component and pointing it to the SLD that contains the new repository
definition. (Typically, this will be in the same SLD as the one containing
the component.) Then reimport your component into your database, and you
should be good to go!
 
D

DPM

KM,

Let me ask a more generic question: suppose one has successfully created a
component (in my case, for a piece of hardware) and successfully imported it
into a database. The component was created to be stored into its own named
repository, and that repository is now included in a database. Now, suppose
I want to add that component to another database running on a different
machine. Is it possible to copy the already-existing repository file (where
the filename is "{GUID}") from the first machine and add it to the database
of a second?

I realize that given the .sld and the original files I can re-import them
into the second database, but if they're not available the whole component
must be rebuilt from scratch. It would be really nice if one could just
move a GUID-named repository file to another database. Is there a way to do
that? I've successfully moved an entire database from one machine to
another, but this time I just want to move one repository file, not the
entire database.

Now, having said all that, I did follow the procedure described in your
link, and gave my component its own repository name, along with the source
path of the .inf and other files required. Importing it into the database
was declared successful, and if I select the "Repositories" tab in CDM I see
my new repository. The problem is in TD - if I add a component from the
list (the component is a MF card and includes several models) TD declares it
can't find the necessary files, and gives me a string of repository names
it's searched. But the search string does not contain my new repository,
and if it was searched first, why can't it find the files, when CDM declared
the import successful? And yes, the "Copy repository files to repository
root" was checked.

Thanks for your patience and help.

Regards,
Dean


KM said:
Dean,

As Matt already pointed you to, you should check whether you associated
that component with the right repository.
 
M

Matt Kellner [MS]

I'll answer the "copying a component to another DB" topic in a separate
reply - there is a rather convoluted way to do that using XPECMD (available
in the newly released Feature Pack 2007), though if you happen to have the
original SLD/REP files sitting around, reimporting is a whole lot easier.

As for the problem you're seeing in Target Designer: This still indicates
that the component in question does not actually specify that its files
reside in the new custom repository you created. This can be because the
component itself still doesn't have this property set, or you reimported the
component using the same revision number as before (when the repository
wasn't specified). Try upping the revision number on the component and
reimporting again, to see if this helps. (You can also flush out the old
components using Component Database Manager or XPECMD in Exclusive Mode.)
 
M

Matt Kellner [MS]

To copy an existing component and its repository files from one database to
another, you can run the following commands in XPECMD (part of the Tools
Update in Feature Pack 2007, which was just released on the Microsoft
Download Center). This script code assumes that your driver component is
named "MyDriver" and its associated Repository is named "MyRep".

Step 1: Run XPECMD.wsf and issue the following commands:

=== BEGIN SCRIPT CODE ===
dbo SourceDB
new mySLD SLD
new myComp = 'comp:MyDriver'
new myRep = 'rep:MyRep'
add mySLD myComp
add mySLD myRep
save mySLD "c:\mySLD.sld"
exit
=== END SCRIPT CODE ===

This code will pull your "MyDriver" component and its repository into a SLD
file and save them to disk, essentially recreating the data that you
originally imported.

Step 2: Copy the associated repository folder from your existing
Repositories folder to a location where the SLD file can refer to it
correctly. If necessary, open the SLD and adjust the source path of the
Repository object to make it correspond to the copy you just made.

Step 3: Import this newly created SLD and its repository into the new DB,
using either Database Manager or XPECMD. As before, make sure you tell it
to copy the repository files as well.
 
K

KM

Dean,

Matt has perfectly answered your question about properly moving SLD to another DB.
Usually I just save the component's SLD along with required repository files in one directory (files are typically under subfolder,
e.g. Rep). Then I can always [re-]import component to a new database without messing with the repository files under \Windows
Embedded Data folder.

About your issue with TD.. This statement of yours got me worried a little bit: "along with the source path of the .inf and other
files required.". Did you mean that you manually set the source path property for each file of your component? If so, you shouldn't
do that. All you needed is to create a new repository (better in the same SLD), point the repository to the right directory on the
disk where you store that component's files and associate the component with the new repository (on the component's settings page in
CD there is a field for that - Repository).
 
D

DPM

Matt, KM:

Thanks for your replies. Today (!) I lost the motherboard for my Vista
machine, so it will be a few days before I'm back up.

KM,

In this case, I had the original SLD and the required files. I put them in
a folder on my new machine, then opened the SLD in CD, selected
"Repositories" on the left pane, added the repository name and specified the
"Source path" to point to the folder where I put the files to go in the
repository. I did NOT modify any information for the individual components.

Now that I realize that I can't easily move a repository from one machine to
another, I'll be a lot more careful to backup the SLDs and their respective
files.

Matt,

I'll try upping the revision number on my component after I get my system
back up.

Regards,
Dean

KM said:
Dean,

Matt has perfectly answered your question about properly moving SLD to another DB.
Usually I just save the component's SLD along with required repository
files in one directory (files are typically under subfolder,
e.g. Rep). Then I can always [re-]import component to a new database
without messing with the repository files under \Windows
Embedded Data folder.

About your issue with TD.. This statement of yours got me worried a little
bit: "along with the source path of the .inf and other
files required.". Did you mean that you manually set the source path
property for each file of your component? If so, you shouldn't
do that. All you needed is to create a new repository (better in the same
SLD), point the repository to the right directory on the
disk where you store that component's files and associate the component
with the new repository (on the component's settings page in
 
M

Matt Kellner [MS]

In order to get the components themselves to pull their binaries from the
correct repository folder, you must edit the "Repository" property in the
components, in addition to ensuring the Repository itself exists.
Otherwise, the platform script will only search what it thinks are the
default rep folders.

--
Matt Kellner
SDET, Microsoft Windows XP Embedded Test Team

This posting is provided "AS IS" with no warranties, and confers no rights.
DPM said:
Matt, KM:

Thanks for your replies. Today (!) I lost the motherboard for my Vista
machine, so it will be a few days before I'm back up.

KM,

In this case, I had the original SLD and the required files. I put them
in
a folder on my new machine, then opened the SLD in CD, selected
"Repositories" on the left pane, added the repository name and specified
the
"Source path" to point to the folder where I put the files to go in the
repository. I did NOT modify any information for the individual
components.

Now that I realize that I can't easily move a repository from one machine
to
another, I'll be a lot more careful to backup the SLDs and their
respective
files.

Matt,

I'll try upping the revision number on my component after I get my system
back up.

Regards,
Dean

KM said:
Dean,

Matt has perfectly answered your question about properly moving SLD to another DB.
Usually I just save the component's SLD along with required repository
files in one directory (files are typically under subfolder,
e.g. Rep). Then I can always [re-]import component to a new database
without messing with the repository files under \Windows
Embedded Data folder.

About your issue with TD.. This statement of yours got me worried a
little
bit: "along with the source path of the .inf and other
files required.". Did you mean that you manually set the source path
property for each file of your component? If so, you shouldn't
do that. All you needed is to create a new repository (better in the same
SLD), point the repository to the right directory on the
disk where you store that component's files and associate the component
with the new repository (on the component's settings page in
CD there is a field for that - Repository).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top