From ef508b9978caaf915b8f4cb9fe988a35aca82fe4 Mon Sep 17 00:00:00 2001 From: lilydjwg Date: Fri, 28 Jun 2024 19:32:06 +0800 Subject: [PATCH] record current maintainers when building --- README.md | 13 +++++++++++++ lilac | 2 ++ scripts/dbsetup.sql | 3 ++- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8ac7d256..b4cf58c5 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,19 @@ Docs * [lilac.py API](https://lilac.readthedocs.io/en/latest/api.html) * [Setup and run your own](https://lilac.readthedocs.io/en/latest/) +Update +---- + +### 2024-06-28 + +if database is in use, run the following SQL to update: + +```sql + +alter table lilac.pkglog add column maintainers jsonb; +``` + + License ------- diff --git a/lilac b/lilac index 2c609767..3b579654 100755 --- a/lilac +++ b/lilac @@ -455,6 +455,7 @@ def build_it( cputime = memory = None rs = [r.to_dict() for r in build_reasons[pkg]] with db.get_session() as s: + maintainers = repo.lilacinfos[pkg].maintainers p = db.PkgLog( pkgbase = pkg, nv_version = newver, @@ -465,6 +466,7 @@ def build_it( memory = memory, msg = msg, build_reasons = rs, + maintainers = maintainers, ) s.add(p) db.mark_pkg_as(s, pkg, 'done') diff --git a/scripts/dbsetup.sql b/scripts/dbsetup.sql index 167e98f8..ad8a7da2 100644 --- a/scripts/dbsetup.sql +++ b/scripts/dbsetup.sql @@ -14,7 +14,8 @@ create table pkglog ( cputime int, memory bigint, msg text, - build_reasons jsonb + build_reasons jsonb, + maintainers jsonb ); create index pkglog_ts_idx on pkglog (ts);