Skip to content

Commit

Permalink
Fix dependency handling
Browse files Browse the repository at this point in the history
Run slapt-src with the -n (--no-deps) option always. Since dependencies
have been calculated and have been put in the queue earlier, that means
that they have been processed already. No need to ask slapt-src to
calculate dependencies again.

Ignore %README% dependencies. slapt-src would fail, trying to find a
SlackBuild named "%README%". SBo folks put that in the REQUIRES field of
the .info file, when they want the user to actually read the README file
before running the SlackBuild. Of course there is no SlackBuild named
"%README%" and so slapt-src (and thus sourcery) would fail in this case.
We're just ignoring it. Users are advised to read the README file in all
cases anyway (and it's easy to do that from within sourcery).
  • Loading branch information
gapan committed Jun 14, 2013
1 parent 2f77648 commit cbadcc1
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/sourcery
Expand Up @@ -267,7 +267,7 @@ class Sourcery:
data = ' '.join([data, line])
newdeps = data.replace('\n', ' ').strip(' ').split(' ')
for i in newdeps:
if i is not '':
if i is not '' and i != '%README%':
if i not in deps:
deps.append(i)
DEVNULL.close()
Expand Down Expand Up @@ -718,7 +718,7 @@ class Sourcery:

logfile = logdir+'/'+pkg+'-'+pkgver
f = open(logfile, 'w')
args = ['slapt-src', '-y', '-f', pkg+':'+pkgver]
args = ['slapt-src', '-y', '-n', '-f', pkg+':'+pkgver]
options = self.getoptions(pkg, pkgver)
options_dict = self.dict_options(options)
env = dict()
Expand Down Expand Up @@ -769,10 +769,7 @@ class Sourcery:

args = ['yes', 'n']
pyes = subprocess.Popen(args, stdout = subprocess.PIPE, stderr = DEVNULL)
if config.deps() == True:
args = ['slapt-src', '-y', '-i', pkg+':'+pkgver]
else:
args = ['slapt-src', '-y', '-n', '-i', pkg+':'+pkgver]
args = ['slapt-src', '-y', '-n', '-i', pkg+':'+pkgver]
options = self.getoptions(pkg, pkgver)
options_dict = self.dict_options(options)
env = dict()
Expand Down

0 comments on commit cbadcc1

Please sign in to comment.