Commit Graph

11 Commits

Author SHA1 Message Date
Markus Muellner
8e62195eb5 implement structured logging 2023-02-20 13:42:50 +01:00
Ratchanan Srirattanamet
814d4dbb51 deb: fix importing dbgsym packages with versioned Source field
dpkg-gencontrol can be called with -v flag which set binary package's
version separated from source version. When this happen, the Source
field will contain version number in addition to source package name.
This tripped Aptly's dbgsym restriction, which check for exact source
package name, which in turn prevents the dbgsym & the whole .changes
file from being imported.

From the git history, it seems like this condition is a leftover from
when Aptly filter dbgsym packages using "*-dbgsym". So, I decided to
remove it. A test case has been added to prevent regression.
2022-01-31 11:14:18 +01:00
Oliver Sauder
6ab5e60833 Add task api and resource locking ability 2022-01-27 09:30:14 +01:00
Andrey Smirnov
77d7c3871a Consistently use transactions to update database
For any action which is multi-step (requires updating more than 1 DB
key), use transaction to make update atomic.

Also pack big chunks of updates (importing packages for importing and
mirror updates) into single transaction to improve aptly performance and
get some isolation.

Note that still layers up (Collections) provide some level of isolation,
so this is going to shine with the future PRs to remove collection
locks.

Spin-off of #459
2019-08-11 00:11:53 +03:00
Andrey Smirnov
67e38955ae Refactor database code to support standalone batches, transactions.
This is spin-off of changes from #459.

Transactions are not being used yet, but batches are updated to work
with the new API.

`database/` package was refactored to split abstract interfaces and
implementation via goleveldb. This should make it easier to implement
new database types.
2019-08-09 00:46:40 +03:00
Oliver Sauder
9509629bcf Add changes test to increase coverage 2018-06-19 15:40:38 +02:00
Andrey Smirnov
516dd7b044 Switch to gometalinter
Only small amount of required checks is enabled,
plan is to enable more linters as issues are fixed in the code.
2017-03-23 01:51:08 +03:00
Szymon Sobik
b8e7ad9022 update changes unit test to account for dbgsym matching 2017-03-08 10:32:11 +01:00
Andrey Smirnov
782ac1a36a ChangesFile can produce Query each package file should satisfy. #71 2015-03-18 22:19:12 +03:00
Andrey Smirnov
2f3b5f5a51 Refactor Changes structure, new method prepare to verify checksums and copy files. #71 2015-03-15 18:16:11 +03:00
Andrey Smirnov
a7103623af .changes files parsing. #71 2015-03-13 21:46:32 +03:00