mirror of
https://github.com/openSUSE/osc.git
synced 2024-12-29 03:06:15 +01:00
Merge branch 'get_built_files-deb' of https://github.com/dmach/osc
Correctly print the built packages in case of a debbuild.
This commit is contained in:
commit
686175d072
22
osc/build.py
22
osc/build.py
@ -353,12 +353,22 @@ def get_preinstall_image(apiurl, arch, cache_dir, img_info, offline=False):
|
|||||||
|
|
||||||
def get_built_files(pacdir, buildtype):
|
def get_built_files(pacdir, buildtype):
|
||||||
if buildtype == 'spec':
|
if buildtype == 'spec':
|
||||||
b_built = subprocess.Popen(['find', os.path.join(pacdir, 'RPMS'),
|
debs_dir = os.path.join(pacdir, 'DEBS')
|
||||||
'-name', '*.rpm'],
|
sdebs_dir = os.path.join(pacdir, 'SDEBS')
|
||||||
stdout=subprocess.PIPE).stdout.read().strip()
|
if os.path.isdir(debs_dir) or os.path.isdir(sdebs_dir):
|
||||||
s_built = subprocess.Popen(['find', os.path.join(pacdir, 'SRPMS'),
|
# (S)DEBS directories detected, list their *.(s)deb files
|
||||||
'-name', '*.rpm'],
|
b_built = subprocess.Popen(['find', debs_dir, '-name', '*.deb'],
|
||||||
stdout=subprocess.PIPE).stdout.read().strip()
|
stdout=subprocess.PIPE).stdout.read().strip()
|
||||||
|
s_built = subprocess.Popen(['find', sdebs_dir, '-name', '*.sdeb'],
|
||||||
|
stdout=subprocess.PIPE).stdout.read().strip()
|
||||||
|
else:
|
||||||
|
# default: (S)RPMS directories and their *.rpm files
|
||||||
|
b_built = subprocess.Popen(['find', os.path.join(pacdir, 'RPMS'),
|
||||||
|
'-name', '*.rpm'],
|
||||||
|
stdout=subprocess.PIPE).stdout.read().strip()
|
||||||
|
s_built = subprocess.Popen(['find', os.path.join(pacdir, 'SRPMS'),
|
||||||
|
'-name', '*.rpm'],
|
||||||
|
stdout=subprocess.PIPE).stdout.read().strip()
|
||||||
elif buildtype == 'kiwi':
|
elif buildtype == 'kiwi':
|
||||||
b_built = subprocess.Popen(['find', os.path.join(pacdir, 'KIWI'),
|
b_built = subprocess.Popen(['find', os.path.join(pacdir, 'KIWI'),
|
||||||
'-type', 'f'],
|
'-type', 'f'],
|
||||||
|
Loading…
Reference in New Issue
Block a user