fetch2.URI: Coerce urlparse to use netloc for all schemes

Signed-off-by: Olof Johansson <olof.johansson@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
tests.fetch: Remove debug assert

Signed-off-by: Olof Johansson <olof.johansson@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
fetch2.URI: add support for query parameters

This change introduces the .query property of the URI class. It is a
read/write dict of the parameters supplied in the query string of the
URI. E.g.:

  http://example.com/?foo=bar => .query = {'foo': 'bar'}

Signed-off-by: Olof Johansson <olof.johansson@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
fetch2.URI: Support URIs with both query strings and params

There is a case in meta-intel where a SRC_URI contains both a query string and
URI parameter:

 https://edc.intel.com/Download.aspx?id=6190;downloadfilename=LIN_IEMGD_1_14_GOLD_2443.tgz

Python's urlparse thought the URI parameters were part of the query parameter
value, but in the bitbake context this is obviously not the case. As bitbake's
usage isn't really RFC compliant, we have to extract and remove the URI parameters
*before* urlparse sees the URI.

Signed-off-by: Olof Johansson <olof.johansson@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
fetch2.URI: Set username/password should not change the other

When setting the username after already having set the password, the password
was unexpectedly reset. This change fixes this issue and introduces unit tests
to make sure it doesn't happen again.

Signed-off-by: Olof Johansson <olof.johansson@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
hob: output filenames based on initial recipe name

If a recipe for an image was edited from the hob interface the name
of the files outputed in the <build_dir>/tmp/deploy/images/${MACHINE}/ and the
temporary recipes from <build_dir>/recipes/images/ contained only the
generic name "hob-image". From now on both the temporary recipes and
the output from the deploy/ directory will contain the name of the base
recipe appended by the "-edited" suffix, in the case when a base image recipe was
edited. The base recipe can be a standard recipe (e.g core-image-minimal) or
a custom created and saved by the user.

For example, if core-image-minimal is edited the deploy/ directory will contain
core-image-minimal-edited-20140318-140428-qemux86.ext3 and the recipes/images/
directory will contain the recipe core-image-minimal-edited-20140318-140428.bb.

[YOCTO #5002]

Signed-off-by: Marius Avram <marius.avram@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
toaster: Revert "added file types to the Outputs column in the build page"

This reverts commit d40ac966b22e1fa1956d8f2fe37fd55fa670e88f.

Sloppy review on my part let the original patch in, when it should've
been rejected because the filter tags should have no knowledge of the
object system.

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
toaster: warn new filter replaces existing filter

If the user pop-ups a filter dialog when another filter is already
active, warn the user that the new filter would replace the
previous filter.

[YOCTO #5960]

Signed-off-by: David Reyna <David.Reyna@windriver.com>
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
toaster: reset default filter for configvar page on new searches

The configvar page has a default filter by design. However, new search terms
should override and clear that filter, for consistency across the interface.

[YOCTO #5961]

Signed-off-by: David Reyna <David.Reyna@windriver.com>
toaster: Change objectname 'packages' to 'packages built'

This will set the placeholder attribute of the search input
field in bpackage.html to the required "Search packages
built".

[YOCTO #5977]

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
toaster: fix package size 1st sort order

[YOCTO #5914]

On the pages with tables listing packages with a size column, change the
first click sort order on the size column so that packages are sorted in
decreasing order instead of increasing order.  It is more likely that
the user sorts this page data by size because the user is interested in
those packages consuming the most disk space.

Signed-off-by: Dave Lerner <dave.lerner@windriver.com>
toaster: Fix alignment issue in searchform

The search form in basetable_top.html had a small alignment
issue between the search text field and the search button.
This change aligns the elements correctly.

Whitespace fix by Alex Damian.

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
toaster: Add help text to filters

The 'Set in file' and 'Description' filters in the configuration page,
and the 'Outcome' and 'Cache attempt' filters in the tasks page should
include a help tooltip with some explanation about what they do.
This change adds the tooltips.

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
toaster: Update local configuration counter

The counter for the local configuration filter in the
variables table was counting only variables set by
local.conf. Updating to add in variables set by
bblayers.conf

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
toaster: Change "0 found" to "No found"

Change the string in the h1 when search returns no results
from "0 things found" to "None things found". The change
applies to the BitBake variables, tasks, recipes, packages
built, time, CPU and disk I/O tables.

[YOCTO #5981]

Signed-off-by: David Reyna <David.Reyna@windriver.com>
Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
toaster: apply filter only on selected attributes

This fixes the filter from the main page: 'All builds' applied to the
table header. Once one is selected, the filter button for that respective
column will receive a title attribute which will show additional options
when you hover over it. Until now the additional option was active for
all filters buttons not only for the one selected. This also caused
malformed output in the case of the buttons which weren't among the
selected filter.

[YOCTO #5929]

Signed-off-by: Marius Avram <marius.avram@intel.com>
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
bitbake toaster: check the file_name with the content of the IMAGE_FSTYPES variable

File_name information of Target_image_file is being collected for a
.rootfs.manifest file. We would like not to collect this. The solution is
to cross check the information gathered for file_name with the content
of the IMAGE_FSTYPES variable. If any of the file_name entries does not
match the content of IMAGE_FSTYPES, we do not store it.

[YOCTO #5189]

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
toaster: add search by section to all recipe page

Add the 'section' to the searchable columns list for the recipe model.

[YOCTO #5993]

Signed-off-by: David Reyna <David.Reyna@windriver.com>
toaster: combine ready functions

Merge the code into single ready function.

[YOCTO #4283]

Signed-off-by: Amit Kumar Chaudhary <amit@floatingpondtech.com>
toaster: Remove circular dependecies from packages/recipes

The RelatedManager for Package_Dependency and Recipe_Dependency is changed
so that circular dependacies are hidden in the UI, but will still remain in
the database.

[YOCTO #5655]

Signed-off-by: Irina Patru <irina.patru@intel.com>
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>