public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Paweł Hajdan" <phajdan.jr@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/chromium-tools:master commit in: /
Date: Mon, 18 Jun 2012 07:38:09 +0000 (UTC)	[thread overview]
Message-ID: <1340005043.31e12833015525826359340f568b2b6fad783203.phajdan.jr@gentoo> (raw)

commit:     31e12833015525826359340f568b2b6fad783203
Author:     Pawel Hajdan, Jr <phajdan.jr <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 18 07:37:23 2012 +0000
Commit:     Paweł Hajdan <phajdan.jr <AT> gentoo <DOT> org>
CommitDate: Mon Jun 18 07:37:23 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/chromium-tools.git;a=commit;h=31e12833

Add sqlite-vacuum script, bug #413295.

---
 sqlite-vacuum.py |   26 ++++++++++++++++++++++++++
 1 files changed, 26 insertions(+), 0 deletions(-)

diff --git a/sqlite-vacuum.py b/sqlite-vacuum.py
new file mode 100755
index 0000000..03b610a
--- /dev/null
+++ b/sqlite-vacuum.py
@@ -0,0 +1,26 @@
+#!/usr/bin/env python
+
+import os.path
+
+import magic
+import sqlite3
+
+home = os.path.expanduser('~')
+
+try:
+	m = magic.open(magic.MAGIC_NONE)
+	m.load()
+
+	for root, dirs, files in os.walk(os.path.join(home, '.config', 'chromium')):
+		for f in files:
+			path = os.path.join(root, f)
+			magic_type = m.file(path)
+			if magic_type and 'SQLite' in magic_type:
+				try:
+					c = sqlite3.connect(path)
+					c.execute('VACUUM')
+					c.execute('REINDEX')
+				finally:
+					c.close()
+finally:
+	m.close()



             reply	other threads:[~2012-06-18  7:38 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-18  7:38 Paweł Hajdan [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-10-10 21:52 [gentoo-commits] proj/chromium-tools:master commit in: / Matt Jolly
2024-10-10 10:03 Matt Jolly
2024-09-27  0:52 Matt Jolly
2024-09-27  0:52 Matt Jolly
2024-09-27  0:52 Matt Jolly
2024-09-26  7:25 Matt Jolly
2024-09-26  5:29 Matt Jolly
2024-09-26  5:21 Matt Jolly
2024-09-26  3:03 Matt Jolly
2024-09-26  2:39 Matt Jolly
2024-09-26  2:36 Matt Jolly
2024-08-30  3:39 Matt Jolly
2024-06-01  7:22 Matt Jolly
2024-05-31 23:02 Matt Jolly
2024-03-28  2:39 Matt Jolly
2024-03-20 21:45 Matt Jolly
2024-03-20 21:45 Matt Jolly
2024-03-20 21:45 Matt Jolly
2024-03-20 21:45 Matt Jolly
2023-02-05 15:09 Stephan Hartmann
2022-09-01 19:33 Mike Gilbert
2022-09-01 19:24 Mike Gilbert
2022-05-06  9:55 Stephan Hartmann
2022-05-03 16:54 Mike Gilbert
2022-05-03 16:54 Mike Gilbert
2022-02-11 17:16 Stephan Hartmann
2022-02-05 16:29 Stephan Hartmann
2022-01-31 20:20 Stephan Hartmann
2020-11-21 19:34 Stephan Hartmann
2020-10-26 17:48 Mike Gilbert
2016-09-15 16:15 Mike Gilbert
2016-09-15 16:11 Mike Gilbert
2015-08-13 20:53 Mike Gilbert
2012-07-31 23:27 Mike Gilbert
2012-07-31 20:39 Mike Gilbert
2011-10-25 16:36 Paweł Hajdan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1340005043.31e12833015525826359340f568b2b6fad783203.phajdan.jr@gentoo \
    --to=phajdan.jr@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox