Change-Id: Ia739ff531f8a32906ac3f4913fd753960d77ec84
if distconf is None:
msger.error('No build config file specified, please specify in '\
'~/.gbs.conf or command line using -D')
+
+ # must use abspath here, because build command will also use this path
+ distconf = os.path.abspath(distconf)
+
target_conf = os.path.basename(distconf).replace('-', '')
os.rename(distconf, os.path.join(os.path.dirname(distconf), target_conf))
dist = target_conf.rsplit('.', 1)[0]