Skip to content

Commit 004e3ae

Browse files
committed
pkg_rpm: Specify _topdir for install stanza
If we don't specify the _topdir as part of the install-from path we can't seem to find the correct files to install when using a set of rules like: pkg_filegroup( name = "my_filegroup", srcs = [ "//some/label:foo", ], prefixs = "/usr/bin", ) pkg_rpm( name = "rpm", ... srcs = [ ":my_filegroup", ], ) Adding '%{{_topdir}/BUILD/' as a prefix to the source path seems to solve this problem.
1 parent 1b5710c commit 004e3ae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/rpm_pfg.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ spec_filetype = [".spec", ".spec.in", ".spec.tpl"]
4545
# TODO(nacl, #292): cp -r does not do the right thing with TreeArtifacts
4646
_INSTALL_FILE_STANZA_FMT = """
4747
install -d "%{{buildroot}}/$(dirname '{1}')"
48-
cp '{0}' '%{{buildroot}}/{1}'
48+
cp '%{{_topdir}}/BUILD/{0}' '%{{buildroot}}/{1}'
4949
""".strip()
5050

5151
# TODO(nacl): __install

0 commit comments

Comments
 (0)