[Toaster] question on spec for "Package included in ..."
Barros Pena, Belen
belen.barros.pena at intel.com
Mon Jan 13 02:50:43 PST 2014
On 12/01/2014 20:45, "Lerner, Dave" <dave.lerner at windriver.com> wrote:
>Hi Belen, Alex
>
>I have a question about the intent of the specification on page 5 of 10
>of spec design-1.5.1-package-details.pdf listing the images
> that a package is included in.
>
>Packages included in target image
>If
> the package is installed in a build target image, the '1.5.1
>Package
> details' left content column shows only a list of
>the
> target images that include the package.
>Each
> target image is a link to the corresponding '1.1.1
>Included
> package details' page.
>If
> there is more than one target image in the build, they
>are
> separated by commas, and listed in ascending
>alphabetical
> order.
>
>
>
>
>The list that should appear is clearly for the package
>name-version-revision, but should it be a list restricted (as implied by
> the breadcrumbs) to a single machine/bsp, for example atom-pc vs
>qemuarm?
The list includes only the targets of the selected build. Since there is a
one to one relationship between builds and machines (you can only build
for one machine at a time), the answer is yes, the targets listed will
only apply to one machine. I'll try to explain a bit better: in the
example shown in the spec (the one you have attached in your e-mail) you
have selected, from your list of builds, a build for atom-pc that
completed on 11th Jun 2013 at 15:22. That build built 3 targets:
core-image-sato, core-image-sato-sdk and core-image-x11, all of them for a
single machine (atom-pc). The package you have selected (base_files) was
installed in all 3 targets, and so the 3 of them are listed at the top of
the page.
I hope this makes sense. If you have any questions, let me know. I'll let
Alex answer the implementation part.
Cheers
Belén
>Do I understand the view spec correctly?
>
>For that case, the current form of the database requires a complicated
>query. I think the logic would have to be (for a passed in
> build-id-arg, package-id-arg)
>·
>Get the machine,
>buildMachine, for this build-id-arg
>·
>Get a list of package.id¹s for this list of
>build.id¹s with this buildMachine
>·
>Get a list of target-installed-package.target_ids¹s that are in the
>include the
>package.id¹s above
>·
>Return a list of distinct
>target.target using the target-insalled-package.target_ids list above and
>also have
>target.is_image true (1)
>
>or using $var embedded
>sql syntax (for C), after buildMachine,
>packageName, packageVersion,
>packageRevision are retrieved...
>
>select distinct(orm_target.target) from
>orm_target, orm_target_installed_package
>where
>
>orm_target.is_image = 1
>and orm_target.id =
>orm_target_installed_package.target_id
>and
>orm_target_installed_package.package_id in
>(select orm_package.id from
>orm_build, orm_package
>where
>
>orm_build.machine = $buildMachine
>and orm_package.name = $packageName
>and
>orm_package.version = $packageVersion
>and
>orm_package.revision = $packageRevision
>and orm_build.id =
>orm_package.build_id);
>
>Thanks,
>Dave Lerner
>
>
More information about the toaster
mailing list