Skip to content

Commit

Permalink
builddep recognizes nosrc.rpm pkgs (RhBug:1166126)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Silhan committed Jan 14, 2015
1 parent 913d4ca commit 0cf9f74
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions doc/builddep.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
DNF builddep Plugin
===================

Install whatever is needed to build the given .src.rpm or .spec file.
Install whatever is needed to build the given .src.rpm, .nosrc.rpm or .spec file.

--------
Synopsis
Expand All @@ -15,7 +15,7 @@ Arguments
---------

``<file>``
The path to .src.rpm or .spec file, to read the needed build requirements from.
The path to .src.rpm, .nosrc.rpm or .spec file, to read the needed build requirements from.

--------
Examples
Expand Down
9 changes: 5 additions & 4 deletions plugins/builddep.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# builddep.py
# Install all the deps needed to build this package.
#
# Copyright (C) 2013 Red Hat, Inc.
# Copyright (C) 2013-2015 Red Hat, Inc.
#
# This copyrighted material is made available to anyone wishing to use,
# modify, copy, or redistribute it subject to the terms and conditions of
Expand Down Expand Up @@ -62,8 +62,9 @@ def __exit__(self, exc_type, exc, exc_tb):
class BuildDepCommand(dnf.cli.Command):

aliases = ('builddep',)
summary = _("Install build dependencies for .src.rpm or .spec file")
usage = _("[PACKAGE.src.rpm|PACKAGE.spec]")
msg = "Install build dependencies for .src.rpm, .nosrc.rpm or .spec file"
summary = _(msg)
usage = _("[PACKAGE.src.rpm|PACKAGE.nosrc.rpm|PACKAGE.spec]")

@staticmethod
def _rpm_dep2reldep_str(rpm_dep):
Expand Down Expand Up @@ -129,7 +130,7 @@ def configure(self, args):
def run(self, args):
rpm_ts = rpm.TransactionSet()
for fn in args:
if fn.endswith('.src.rpm'):
if fn.endswith('.src.rpm') or fn.endswith('.nosrc.rpm'):
self._src_deps(rpm_ts, fn)
else:
self._spec_deps(fn)

0 comments on commit 0cf9f74

Please sign in to comment.