1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-12-22 15:58:50 -05:00

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_BUGREPORT[@]|$(PACKAGE_BUGREPORT)|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'
## 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
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 end, where the url is http://foo/bar/REPO/os/arch
try:
splitted2 = tempUrl.split('/')
if tempUrl[-1] != '/':
repoName = splitted2[-3]
dbFileName = '/' + repoName + '.db.tar.gz'
dbFileName = '/' + repoName + '@DBEXT@'
else:
repoName = splitted2[-4]
dbFileName = repoName + '.db.tar.gz'
dbFileName = repoName + '@DBEXT@'
except:
dbFileName = ''