mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
change(mkpkglists): remove header comments
These comments change every time mkpkglists is run; which would invalidate the ETag headers disbursed by the gzip host. This commit removes those changing headers. Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
parent
107367f958
commit
abbecf5194
1 changed files with 0 additions and 9 deletions
|
@ -18,7 +18,6 @@ on the following, right-hand side fields are added to each item.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import datetime
|
|
||||||
import gzip
|
import gzip
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
@ -155,11 +154,6 @@ def write_archive(archive: str, output: list):
|
||||||
def main():
|
def main():
|
||||||
conn = aurweb.db.Connection()
|
conn = aurweb.db.Connection()
|
||||||
|
|
||||||
datestr = datetime.datetime.utcnow().strftime("%a, %d %b %Y %H:%M:%S GMT")
|
|
||||||
pkglist_header = "# AUR package list, generated on " + datestr
|
|
||||||
pkgbaselist_header = "# AUR package base list, generated on " + datestr
|
|
||||||
userlist_header = "# AUR user name list, generated on " + datestr
|
|
||||||
|
|
||||||
# Query columns; copied from RPC.
|
# Query columns; copied from RPC.
|
||||||
columns = ("Packages.ID, Packages.Name, "
|
columns = ("Packages.ID, Packages.Name, "
|
||||||
"PackageBases.ID AS PackageBaseID, "
|
"PackageBases.ID AS PackageBaseID, "
|
||||||
|
@ -205,7 +199,6 @@ def main():
|
||||||
|
|
||||||
# Produce packages.gz
|
# Produce packages.gz
|
||||||
with gzip.open(packagesfile, "wb") as f:
|
with gzip.open(packagesfile, "wb") as f:
|
||||||
f.write(bytes(pkglist_header + "\n", "UTF-8"))
|
|
||||||
f.writelines([
|
f.writelines([
|
||||||
bytes(x.get("Name") + "\n", "UTF-8")
|
bytes(x.get("Name") + "\n", "UTF-8")
|
||||||
for x in output
|
for x in output
|
||||||
|
@ -213,14 +206,12 @@ def main():
|
||||||
|
|
||||||
# Produce pkgbase.gz
|
# Produce pkgbase.gz
|
||||||
with gzip.open(pkgbasefile, "w") as f:
|
with gzip.open(pkgbasefile, "w") as f:
|
||||||
f.write(bytes(pkgbaselist_header + "\n", "UTF-8"))
|
|
||||||
cur = conn.execute("SELECT Name FROM PackageBases " +
|
cur = conn.execute("SELECT Name FROM PackageBases " +
|
||||||
"WHERE PackagerUID IS NOT NULL")
|
"WHERE PackagerUID IS NOT NULL")
|
||||||
f.writelines([bytes(x[0] + "\n", "UTF-8") for x in cur.fetchall()])
|
f.writelines([bytes(x[0] + "\n", "UTF-8") for x in cur.fetchall()])
|
||||||
|
|
||||||
# Produce users.gz
|
# Produce users.gz
|
||||||
with gzip.open(userfile, "w") as f:
|
with gzip.open(userfile, "w") as f:
|
||||||
f.write(bytes(userlist_header + "\n", "UTF-8"))
|
|
||||||
cur = conn.execute("SELECT UserName FROM Users")
|
cur = conn.execute("SELECT UserName FROM Users")
|
||||||
f.writelines([bytes(x[0] + "\n", "UTF-8") for x in cur.fetchall()])
|
f.writelines([bytes(x[0] + "\n", "UTF-8") for x in cur.fetchall()])
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue