<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/poky.git/bitbake/lib/prserv/db.py, branch 5.2_M2</title>
<subtitle>Mirror of git.yoctoproject.org/poky</subtitle>
<id>https://git.enea.com/cgit/linux/poky.git/atom?h=5.2_M2</id>
<link rel='self' href='https://git.enea.com/cgit/linux/poky.git/atom?h=5.2_M2'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/'/>
<updated>2024-05-21T13:23:43+00:00</updated>
<entry>
<title>bitbake: prserv: import simplification</title>
<updated>2024-05-21T13:23:43+00:00</updated>
<author>
<name>Michael Opdenacker</name>
<email>michael.opdenacker@bootlin.com</email>
</author>
<published>2024-05-11T11:01:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=ae0725577dfcfbe3a439c6bebd114f677e4b5081'/>
<id>urn:sha1:ae0725577dfcfbe3a439c6bebd114f677e4b5081</id>
<content type='text'>
Simplify the importone() hook:
- to make it independent from the "history" mode which is
  client specific.
- remove the "history" parameter
- we want all values to be imported for binary
  reproducibility purposes.
- using the store_value() function (which warrants
  you don't save the same value twice and doesn't write
  when you're using a read-only server) is enough.

(Bitbake rev: 000704a53470ab1ead840403b5531f22ebf1fd49)

Signed-off-by: Michael Opdenacker &lt;michael.opdenacker@bootlin.com&gt;
Cc: Joshua Watt &lt;JPEWhacker@gmail.com&gt;
Cc: Tim Orling &lt;ticotimo@gmail.com&gt;
Cc: Thomas Petazzoni &lt;thomas.petazzoni@bootlin.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: prserv: store_value() improvements</title>
<updated>2024-05-21T13:23:43+00:00</updated>
<author>
<name>Michael Opdenacker</name>
<email>michael.opdenacker@bootlin.com</email>
</author>
<published>2024-05-11T11:01:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=3be2201de538a484e94ba91356a2fbe121a53308'/>
<id>urn:sha1:3be2201de538a484e94ba91356a2fbe121a53308</id>
<content type='text'>
Add a test_checksum_value() to test whether
a (version, pkgarch, checksum, value) entry already
exists in the database.

This is used to protect the store_value() function from
an error when trying to store a duplicate entry in the database.

Also check whether the current database is open in read-only mode.

(Bitbake rev: b7f6c085a7cf8ac83695242a0299e2d5f7abc69a)

Signed-off-by: Michael Opdenacker &lt;michael.opdenacker@bootlin.com&gt;
Cc: Joshua Watt &lt;JPEWhacker@gmail.com&gt;
Cc: Tim Orling &lt;ticotimo@gmail.com&gt;
Cc: Thomas Petazzoni &lt;thomas.petazzoni@bootlin.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: prserv: avoid possible race condition in database code</title>
<updated>2024-05-21T13:23:43+00:00</updated>
<author>
<name>Michael Opdenacker</name>
<email>michael.opdenacker@bootlin.com</email>
</author>
<published>2024-05-11T11:01:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=0d6dd343dee916c9d446e7c3e43aeca3c466f22c'/>
<id>urn:sha1:0d6dd343dee916c9d446e7c3e43aeca3c466f22c</id>
<content type='text'>
Remove a possible race condition by allowing a read-only
server to create the PR table anyway. This avoids a failure
if both a read-only and read-write server try to access
an empty database at the same time.

(Bitbake rev: b171caec5ebbe579bf4b8b2005930240ae5c8ce2)

Signed-off-by: Michael Opdenacker &lt;michael.opdenacker@bootlin.com&gt;
Suggested-by: Joshua Watt &lt;jpewhacker@gmail.com&gt;
Cc: Tim Orling &lt;ticotimo@gmail.com&gt;
Cc: Thomas Petazzoni &lt;thomas.petazzoni@bootlin.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: prserv: enable database sharing</title>
<updated>2024-05-21T13:23:43+00:00</updated>
<author>
<name>Michael Opdenacker</name>
<email>michael.opdenacker@bootlin.com</email>
</author>
<published>2024-05-11T11:01:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=65757c9e200cb34b39a87f3a8c2a8f8665a81677'/>
<id>urn:sha1:65757c9e200cb34b39a87f3a8c2a8f8665a81677</id>
<content type='text'>
sqlite3 can allow multiple processes to access the database
simultaneously, but it must be opened correctly. The key change is that
the database is no longer opened in "exclusive" mode (defaulting to
shared mode). In addition, the journal is set to "WAL" mode, as this is
the most efficient for dealing with simultaneous access between
different processes. In order to keep the database performance,
synchronous mode is set to "off". The WAL journal will protect against
incomplete transactions in any given client, however the database will
not be protected against unexpected power loss from the OS (which is a
fine trade off for performance, and also the same as the previous
implementation).

The use of a database cursor enabled to remove the _execute() wrapper.
The cursor automatically makes sure that the query happens in an atomic
transaction and commits when finished.

This also removes the need for a "dirty" flag for the database and
for explicit database syncing, which simplifies the code.

(Bitbake rev: 385833243c495dc68ec26a963136c1ced3f272d0)

Signed-off-by: Michael Opdenacker &lt;michael.opdenacker@bootlin.com&gt;
Signed-off-by: Joshua Watt &lt;JPEWhacker@gmail.com&gt;
Cc: Tim Orling &lt;ticotimo@gmail.com&gt;
Cc: Thomas Petazzoni &lt;thomas.petazzoni@bootlin.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: prserv: add "upstream" server support</title>
<updated>2024-05-21T13:23:43+00:00</updated>
<author>
<name>Michael Opdenacker</name>
<email>michael.opdenacker@bootlin.com</email>
</author>
<published>2024-05-11T11:01:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=4cbce9cdf7d22b0b4fe933867f931019540a6663'/>
<id>urn:sha1:4cbce9cdf7d22b0b4fe933867f931019540a6663</id>
<content type='text'>
Introduce a PRSERVER_UPSTREAM variable that makes the
local PR server connect to an "upstream" one.

This makes it possible to implement local fixes to an
upstream package (revision "x", in a way that gives the local
update priority (revision "x.y").

Update the calculation of the new revisions to support the
case when prior revisions are not integers, but have
an "x.y..." format."

Set the comments in the handle_get_pr() function in serv.py
for details about the calculation of the local revision.

This is done by going on supporting the "history" mode that
wasn't used so far (revisions can return to a previous historical value),
in addition to the default "no history" mode (revisions can never decrease).

Rather than storing the history mode in the database table
itself (i.e. "PRMAIN_hist" and "PRMAIN_nohist"), the history mode
is now passed through the client requests. As a consequence, the
table name is now "PRMAIN", which is incompatible with what
was generated before, but avoids confusion if we kept the "PRMAIN_nohist"
name for both "history" and "no history" modes.

Update the server version to "2.0.0".

(Bitbake rev: 48857ec3e075791bd73d92747c609a0a4fda0e0c)

Signed-off-by: Michael Opdenacker &lt;michael.opdenacker@bootlin.com&gt;
Cc: Joshua Watt &lt;JPEWhacker@gmail.com&gt;
Cc: Tim Orling &lt;ticotimo@gmail.com&gt;
Cc: Thomas Petazzoni &lt;thomas.petazzoni@bootlin.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: prserv: remove unnecessary code</title>
<updated>2024-04-14T05:31:45+00:00</updated>
<author>
<name>Michael Opdenacker</name>
<email>michael.opdenacker@bootlin.com</email>
</author>
<published>2024-04-12T09:02:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=9889a0ff1af115e37ea1268f0580ef8b344c32e9'/>
<id>urn:sha1:9889a0ff1af115e37ea1268f0580ef8b344c32e9</id>
<content type='text'>
In db.py, the ifnull() statement guarantees that the SQL request will
return a value. It's therefore unnecessary to test the case when no
value is found.

(Bitbake rev: e4ae5177861c9a27e93e5a2d3a6c393baecd6416)

Signed-off-by: Michael Opdenacker &lt;michael.opdenacker@bootlin.com&gt;
Cc: Joshua Watt &lt;JPEWhacker@gmail.com&gt;
Cc: Tim Orling &lt;ticotimo@gmail.com&gt;
Cc: Thomas Petazzoni &lt;thomas.petazzoni@bootlin.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: prserv: add extra requests</title>
<updated>2024-04-14T05:31:45+00:00</updated>
<author>
<name>Michael Opdenacker</name>
<email>michael.opdenacker@bootlin.com</email>
</author>
<published>2024-04-12T09:02:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=112a37e6a9ce095003228950962903eae46fc55e'/>
<id>urn:sha1:112a37e6a9ce095003228950962903eae46fc55e</id>
<content type='text'>
Useful for connecting a PR server to an upstream one

- "test-package" checks whether the specified package
  version and arch is known in the database.

- "test-pr" checks a specified output hash is found in the database.
  Otherwise it returns 'None' instead of a new value.

- "max-package-pr" returns the highest PR number for
  (version, arch) entries in the database, and None if not found

Add new DB functions supporting the above, plus test_value()
which tells whether a given value is available for the specified
package and architecture.

(Bitbake rev: 0f1474a30f741b760ca81c19dd1d8f3bd5647251)

Signed-off-by: Michael Opdenacker &lt;michael.opdenacker@bootlin.com&gt;
Cc: Joshua Watt &lt;JPEWhacker@gmail.com&gt;
Cc: Tim Orling &lt;ticotimo@gmail.com&gt;
Cc: Thomas Petazzoni &lt;thomas.petazzoni@bootlin.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: prserv: capitalization and spacing improvements</title>
<updated>2024-04-14T05:31:45+00:00</updated>
<author>
<name>Michael Opdenacker</name>
<email>michael.opdenacker@bootlin.com</email>
</author>
<published>2024-04-12T09:02:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=62a3a7172a0cf71889603698780a5911b7f84e36'/>
<id>urn:sha1:62a3a7172a0cf71889603698780a5911b7f84e36</id>
<content type='text'>
Choosing only one style of capitalization
Add extra space after some commas too
Remove idle spaces

(Bitbake rev: daad17bccec8cb98ef2fca4262641167500bd46e)

Signed-off-by: Michael Opdenacker &lt;michael.opdenacker@bootlin.com&gt;
Cc: Joshua Watt &lt;JPEWhacker@gmail.com&gt;
Cc: Tim Orling &lt;ticotimo@gmail.com&gt;
Cc: Thomas Petazzoni &lt;thomas.petazzoni@bootlin.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: prserv: use double quotes by default</title>
<updated>2024-04-14T05:31:45+00:00</updated>
<author>
<name>Michael Opdenacker</name>
<email>michael.opdenacker@bootlin.com</email>
</author>
<published>2024-04-12T09:02:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=4b1ef692a9db79321be765c8e38de953ac52a7e1'/>
<id>urn:sha1:4b1ef692a9db79321be765c8e38de953ac52a7e1</id>
<content type='text'>
To aligh with the hashserv code

(Bitbake rev: 7a6999750791659eaffe49aabfbfba9f37f51913)

Signed-off-by: Michael Opdenacker &lt;michael.opdenacker@bootlin.com&gt;
Cc: Joshua Watt &lt;JPEWhacker@gmail.com&gt;
Cc: Tim Orling &lt;ticotimo@gmail.com&gt;
Cc: Thomas Petazzoni &lt;thomas.petazzoni@bootlin.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: bitbake: Add copyright headers where missing</title>
<updated>2022-08-12T10:49:29+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2022-08-10T19:58:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=e19ce4191d94646e35386a5f2179c02ef8dc1cb6'/>
<id>urn:sha1:e19ce4191d94646e35386a5f2179c02ef8dc1cb6</id>
<content type='text'>
Where copyright headers were not present, add them to make things
clear.

(Bitbake rev: 1aa338a216350a2751fff52f866039343e9ac013)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
</feed>
