How to organize repositories


G

Guest

I probably have missed something but this is what I am up to so far.
Importing a series of .inf files into CD and then into the Database. I have a
client and a server machine. After importing into CD I created a package and
a repository for the new component and did the appropriate references to the
local file folder for the file resources and also the repository reference in
the component property sheet plus the package reference in the Group
Memberships folder of the component. After doing all this I am wondering if
I can reuse the same repository reference when I import the next .inf file?

I can see it would be possible if I load all the files for various
components into the same folder( I will import and define about a dozen or so
by the time I get done here) but I would rather have a folder structure on
the development client that has one folder (with sub folders) for each device.

The question is what is the recommended way to organize repositories and
packages on the build server and how to organized the source files on the
development client.

Thanks

Best Regards
 
Ad

Advertisements

K

KM

I probably have missed something but this is what I am up to so far.
Importing a series of .inf files into CD and then into the Database. I have a
client and a server machine. After importing into CD I created a package and
a repository for the new component and did the appropriate references to the
local file folder for the file resources and also the repository reference in
the component property sheet plus the package reference in the Group
Memberships folder of the component. After doing all this I am wondering if
I can reuse the same repository reference when I import the next .inf file?

Absolutely, as long as the repository is registered in the database or belong sot the same SLD.
(in one SLD you can have multiple components as you may know)
I can see it would be possible if I load all the files for various
components into the same folder( I will import and define about a dozen or so
by the time I get done here) but I would rather have a folder structure on
the development client that has one folder (with sub folders) for each device.

You can certainly do that. However, you are going to end up with a few repositories - a repository per each folder.
Unfortunately, repository is a flat structure.
The question is what is the recommended way to organize repositories and
packages on the build server and how to organized the source files on the
development client.

There is no rules about it.
However, I guess, the recommended way may be when you have your respotiory files stay in a subfolder under the folder where you put
your SLD file in. If you set up the relative path in the component reference to the repository folder (e.g., .\Rep) it will work.
 
G

Guest

Thanks for the reply.

Just to clarify. On the development client I setup each component folder so
it has a subfolder called (e.g.) rep and that is where I store all the files
needed for the device (.sys, .cpl, etc.) then I can reference the same
repository for each component and the CDM will sort out the fully qualified
path based on the folder where the .sld is located.
 
K

KM

Yes, that is correct.

Obviously, it is better to use relative paths in the SLDs but not absolutely since you potentially want to move the component to
another machine or share it with other devs.
 
G

Guest

I am afraid I have some conceptions about how this should work that aren't
lined up with what is really happening. Here's what I did.

First component in a totally clean dev system.
Imported a .inf file, added a package, added a repository, referenced the
..\rep folder in the repository properties, Referenced the repository in the
component properties, in the Group Memberships folder under the component I
added a reference to the new package. Next I imported the component into the
DB. I checked the repositories on the server and found a new subfolder with
the component files. Pretty much what I expected.

Next Component
Imported a .inf file, did not add a package, did not add a repository,
referenced the existing repository in properties of the component, in the
Group Memberships folder under the component I added a reference to the
previously created package. Next I imported the component into the DB. I
checked the repositories on the server and found no new subfolder (I didn't
expect to find one) and no new files in the exisiting repository subfolder.
The reason I looked is that the activity messages displayed during the CDM
import was different than the first import.

After that I did add a repository in the second component definition and
even named it the same as the in the first component hoping to reuse the same
repository . When I imported this sld into the db I got new repository
subfolder (with the necessary files) and a new repository (same name) with a
different rev number. Not what I wanted. Sorry I am so dense on this issue.
I could just build a new repository for each new component but that really
clutters up the namespace.

So... How to proceed?
 
K

KM

After that I did add a repository in the second component definition and
even named it the same as the in the first component hoping to reuse the same
repository . When I imported this sld into the db I got new repository
subfolder (with the necessary files) and a new repository (same name) with a
different rev number. Not what I wanted.

What did you want or expected here?
In fact, why are you creating another repository? (it is *another* one since it is going to be assigned a different GUID behind the
scene)

If all you want is to use one repository for two components, then you create it for one component, associate that component with the
repository. Then you carete another component (the same SLD or different SLD, if latter then the repository - the first component -
needs to be already imported) and just associate it with the *same* repository that is already in the database and you can browse to
it.
Sorry I am so dense on this issue.
I could just build a new repository for each new component but that really clutters up the namespace.

Absolutely you can create a new repository for each new component. Even if you name the repositories th same it will work (again, it
uses unique GUIDs behind the scene).
 
Ad

Advertisements

G

Guest

Please note third paragraph in last post. When defining 2nd component I did
reference the already imported and defined repository, however, the files
were not transferred to the repository on the server. Question is why?
 
K

KM

I read that paragraph at the first place. There you're saying you created *another* repository, right? This is quite different from
associating the second component with the old (first component's) repository.

Please don't expect the files mentioned in the component definition to be transferred to the repository automatically. You create a
repository and add files there, not CD. Also, it only works one way - in the component definition you can refer to the files that
were added to the repository, not vise versa.

If from the second component definition you want to refer to some files via a link to repository that belongs to first component you
will have to add those files to the repository either manually (just copy the files to the "\Windows Embedded
Data\Repositories\<GUID>" folder of your repository) or add them to the \rep folder you used earlier and re-import the repository
with CDM (re-import the first component's SLD).
 
G

Guest

I read that paragraph at the first place. There you're saying you created *another* repository, right?
Answer is no.
--

What I did was create one component + repository in CD then I imported that
component using CDM. This worked fine including seeing files in repository on
server. Next I created another component *without* creating another
repository. Instead I referenced previous repository. When I imported second
..sld using CDM the component definition imported but the files were nowhere
to be found. This is the problem I am trying to solve.

The .sld files are in different folders at the same level of the folder
structure. Each component folder has a .sld file and a Repository folder
within i.e. .\Repository. So the two components have identical folder
structures. Double checked spelling of folder names, double checked contents.

The confusion is caused by me puting too much info in a previous post. I
tried some remedial mods to the 2nd .sld one time that didn't work and
shouldn't have mentioned them.

Thanks for your patience.


VayTek Programmer
 
K

KM

What I did was create one component + repository in CD then I imported that
component using CDM. This worked fine including seeing files in repository on
server. Next I created another component *without* creating another
repository. Instead I referenced previous repository. When I imported second
.sld using CDM the component definition imported but the files were nowhere

What files? The files of the second component's Repository? Aren't they the same as the first componet's files. I assume this since
you are trying to use the first repository for the second component so I assume you just want to have *one* repository that has
files for both components.
to be found. This is the problem I am trying to solve.

Are you getting any build errors when you trying to include the second component in your image config?

And just to be completely on the same page, when you are saying "referenced previous repository" do you mean you associated the
component with the repository by using he component's settings page (field Repository on the right panel in CD when you click on the
component node)?

The confusion on my side is that I don't understand what the results you are expecting and/or getting. So far what you described
sounded fine and I didn't see any flaws. But you also seem somewhat unsatisfied so I want to know what your expectation were there.
 
G

Guest

I'll just skip all the "how to" questions and describe what I wanted. Then I
will find out if it is possible.

I am going to have to build about half a dozen component defiintions to go
along with all the components that are already defined from my target probe.
I thought I would create one folder for each of the definitions that would
hold a single .sld file and one subfolder per component for the files called
repository. I would import and define each component in the CD and setup a
single repository in the first component def and (after importing .sld into
db) use that repository for all the subsequent files from all the components.
It doesn't look like I can do that - right?

I wanted one .sld per component so I wouldn't have to re import all the
definitions any time I made a change to one. Same thing goes for the files.
Plus I only wanted one repository for all the files to avoid cluttering up
the repository namespace.

So far what I see working is one repository per component. Haven't tried
putting all the components in one .sld with one repository referenced by all
the components.

How would you organize this?

Thanks again for your patience.

VayTek Programmer
 
Ad

Advertisements

G

Guest

? in order to use just one repository does that mean I would load all the
files needed for each of the components into on subfolder on the development
machine and then whenever the repository that points to that folder is
referenced in the component def the indicated files are transferred and/or
updated.

If that is the case I really didn't get it before. I thought the relative
folder entry for the repository defintion would point to the proper folder as
long as the .sld file had a subfolder in its folder with the same name. True
or False? If it's true it should load the files on import (which it isn't).
So... not true and paragraph above is the way load all files into one
repository. Otherwise one repository per component.


If I reload a .sld that has a repository definition in it does it build yet
another repository or does the cdm keep the same GUID named folder in place?
 
K

KM

There are two questions in your post below.
How I would do that?
And how would it be possible to implement that?

To answer the second question. Yes, it is possible to build independent components (individual components in their own SLDs) so that
they all point to the same repository.
However, taking into consideration the fact that repository is a flat structure - just a folder with files in it, no subfolders -
you may end up with some files with the same names and you will have to manually resolve that by renaming the files and give them
unique names and fixing the target file names within CD (always a laborious process).

Now how I would do that? I'd stick with a repository per component approach. In other words, every component ends up in a separate
folder. That folder contains the component SLD and subfolder Rep. The Rep subfolder contains all the files that belong to the
component. Within the SLD I'd create a repository, set up the path to repository files as .\Rep and associate the component with the
repository (field Repository on the component's settings page in CD).
If it is required all the components (SLDs) may belong to a package that could've been created in one of those SLDs. The "master"
SLD that contains the package definition would have to imported first, before you start referring to the package in other SLDs. The
only benefit to having the package created is that it may later be easier to manipulate with all the components at once (delete them
from database, for instance).

Also, it does not hurt to put all the components in one SLD file. Only disadvantage, as you outlined below, is that if you make a
change in a single component you will have to re-import all the components that belong to the same SLD file. It is often not a big
deal, though, since you don NOT have to re-import repositories (there is a checkbox you have to clear on the CDM import dialog that
will prevent re-importing repositories). The advantage, though, is that within a SLD you can refer to any object that belongs to the
same SLD. I.e., you can add a package definition to the first component of the SLD and then refer to the same package in all other
components. Note that you wouldn't yet import the SLD just to have the GUID created for the package definition. CD does create a
temporary unique GUID within the same session, that will later become persistent as soon as you import the object in the DB, and
allows you to refer to the object with that GUID from other objects (components) inside the same SLD.

I realize it may be hard to read what's written above but I hope it helps a bit to clear the mud.
 
Ad

Advertisements

K

KM

Yes and no. You'd indeed have to load all the files into one subfolder if you were to create one repository for all the components
you have. The files however are getting transferred (the repository gets updated under the \Windows Embedded Data folder on your
disk) only when you use CDM to [re-]import the SLD that has the Repository definition in it (not just a reference).

True. The relative folder entry for the repository definition would point to the proper folder on the disk (in my previous post -
..\Rep) as long as the .sld file had a subfolder in its folder with the same. It will only import the repository into database
(create GUID in the database, create GUID-like folder under \Windows Embedded Data and copy the files from .\Rep there) when you
import that component (that SLD) that contains the repository definition.

In other words, you do want to create a repository in each SLD file if you want to make your components independent of each other.
 

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

Top