Skip to content

Commit

Permalink
Merge pull request opensciencegrid#59 from mwestphall/bugfix/cpio-dep…
Browse files Browse the repository at this point in the history
…endency

SOFTWARE-5721: Include cpio from the stage 1 build artifacts into the final tarball
  • Loading branch information
matyasselmeci authored Oct 17, 2023
2 parents 682c127 + 9827a00 commit d2a5f64
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
1 change: 1 addition & 0 deletions osg-stage1-el8-include.lst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
./usr/bin/cpio
1 change: 1 addition & 0 deletions osg-stage1-el9-include.lst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
./usr/bin/cpio
11 changes: 8 additions & 3 deletions stage1.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,16 @@ def install_stage1_packages(stage1_root, repofile, dver, basearch, pkglist_file)
_install_stage1_packages(yum, dver, stage1_root, stage1_packages)


def make_stage1_filelist(stage_dir):
def make_stage1_filelist(stage_dir, pkglist_file):
oldwd = os.getcwd()
includes_file = pkglist_file.replace('.lst','-include.lst')
if not os.path.exists(includes_file):
includes_file = '/dev/null'
try:
os.chdir(stage_dir)
os.system('find . -not -type d > stage1_filelist')
os.system('find . -not -type d | sort > stage1_filelist_tmp')
os.system('comm -2 -3 stage1_filelist_tmp ' + includes_file + ' > stage1_filelist')

finally:
os.chdir(oldwd)

Expand Down Expand Up @@ -150,7 +155,7 @@ def _statusmsg(msg):
install_stage1_packages(stage1_root, repofile, dver, basearch, pkglist_file)

_statusmsg("Making file list")
make_stage1_filelist(stage_dir)
make_stage1_filelist(stage_dir, pkglist_file)

_statusmsg("Making rpm list")
make_stage1_rpmlist(stage_dir, stage1_root)
Expand Down

0 comments on commit d2a5f64

Please sign in to comment.