Remove hardcoded DBEXT value from script

Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Dan McGee 2008-01-05 22:00:21 -06:00
parent a71f4c4c6a
commit e0e33c329f
2 changed files with 4 additions and 3 deletions

View file

@ -33,6 +33,7 @@ edit = sed \
-e 's|@PACKAGE_VERSION[@]|$(PACKAGE_VERSION)|g' \ -e 's|@PACKAGE_VERSION[@]|$(PACKAGE_VERSION)|g' \
-e 's|@PACKAGE_BUGREPORT[@]|$(PACKAGE_BUGREPORT)|g' \ -e 's|@PACKAGE_BUGREPORT[@]|$(PACKAGE_BUGREPORT)|g' \
-e 's|@PACKAGE_NAME[@]|$(PACKAGE_NAME)|g' \ -e 's|@PACKAGE_NAME[@]|$(PACKAGE_NAME)|g' \
-e 's|@DBEXT[@]|$(DBEXT)|g' \
-e 's|@configure_input[@]|Generated from $@.in; do not edit by hand.|g' -e 's|@configure_input[@]|Generated from $@.in; do not edit by hand.|g'
## All the scripts depend on Makefile so that they are rebuilt when the ## All the scripts depend on Makefile so that they are rebuilt when the

View file

@ -155,17 +155,17 @@ if __name__ == "__main__":
# if the $repo var is used in the url, replace it by core # if the $repo var is used in the url, replace it by core
tempUrl = Template(serverUrl).safe_substitute(repo='core') tempUrl = Template(serverUrl).safe_substitute(repo='core')
# add *.db.tar.gz to server name. the repo name is parsed # add @DBEXT@ to server name. the repo name is parsed
# from the mirror url; it is the third (or fourth) dir # from the mirror url; it is the third (or fourth) dir
# from the end, where the url is http://foo/bar/REPO/os/arch # from the end, where the url is http://foo/bar/REPO/os/arch
try: try:
splitted2 = tempUrl.split('/') splitted2 = tempUrl.split('/')
if tempUrl[-1] != '/': if tempUrl[-1] != '/':
repoName = splitted2[-3] repoName = splitted2[-3]
dbFileName = '/' + repoName + '.db.tar.gz' dbFileName = '/' + repoName + '@DBEXT@'
else: else:
repoName = splitted2[-4] repoName = splitted2[-4]
dbFileName = repoName + '.db.tar.gz' dbFileName = repoName + '@DBEXT@'
except: except:
dbFileName = '' dbFileName = ''