summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Fleischer <lfleischer@archlinux.org>2015-10-24 19:21:43 +0200
committerLukas Fleischer <lfleischer@archlinux.org>2015-10-24 19:23:34 +0200
commit9bbbd665e7556bd67e15562c9e6674260f99f1ba (patch)
treebf9b957331599af436934956b5c77c9075a0579b
parent66d12f0c377074a37a851871aeed426177b0de4a (diff)
downloadaur-9bbbd665e7556bd67e15562c9e6674260f99f1ba.tar.gz
aur-9bbbd665e7556bd67e15562c9e6674260f99f1ba.tar.xz
aurblup: Strip version suffixes from provisions
Since we cannot handle versioned provides, simply strip the version suffix and treat them as if they were not versioned. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
-rwxr-xr-xscripts/aurblup.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/aurblup.py b/scripts/aurblup.py
index 5397528e..325ef3dd 100755
--- a/scripts/aurblup.py
+++ b/scripts/aurblup.py
@@ -4,6 +4,7 @@ import configparser
import mysql.connector
import os
import pyalpm
+import re
config = configparser.RawConfigParser()
config.read(os.path.dirname(os.path.realpath(__file__)) + "/../conf/config")
@@ -32,7 +33,9 @@ for sync_db in sync_dbs:
blacklist.add(pkg.name)
[blacklist.add(x) for x in pkg.replaces]
providers.add((pkg.name, pkg.name))
- [providers.add((pkg.name, x)) for x in pkg.provides]
+ for provision in pkg.provides:
+ provisionname = re.sub(r'(<|=|>).*', '', provision)
+ providers.add((pkg.name, provisionname))
db = mysql.connector.connect(host=aur_db_host, user=aur_db_user,
passwd=aur_db_pass, db=aur_db_name,