Conversation
Signed-off-by: vmuralictr <vmurali.ctr@gmail.com>
bd48557 to
3da9d5b
Compare
| q = ['Debian_Bullseye_List.json', 'Debian_Bookworm_List.json'] | ||
| urls = ['http://ftp.debian.org/debian/dists/bullseye/main/binary-s390x/Packages.gz', 'http://ftp.debian.org/debian/dists/bookworm/main/binary-s390x/Packages.gz'] | ||
| q = ['Debian_Bookworm_List.json', 'Debian_Trixie_List.json'] | ||
| urls = ['http://ftp.debian.org/debian/dists/bookworm/main/binary-s390x/Packages.gz', 'http://ftp.debian.org/debian/dists/trixie/main/binary-s390x/Packages.gz'] |
There was a problem hiding this comment.
Looks good.
For reference (maybe we can turn this into an automated test at some point?) after I looked at it here's what I did to test it and validate output.
Test that the script runs successfully:
elizabeth@sdt:/opt/software-discovery-tool/bin$ ./package_build-new.py debian
Extracting debian data ...
Saved!
filename: Debian_Bookworm_List.json
Saved!
filename: Debian_Trixie_List.json
Thanks for using SDT!
Check the timestamp and file size to make sure they look correct:
elizabeth@sdt:/opt/software-discovery-tool/bin$ ls -alh ../distro_data/data_files/Debian_*
-rw-rw-r-- 1 www-data www-data 7.8M Apr 3 13:28 ../distro_data/data_files/Debian_Bookworm_List.json
-rw-rw-r-- 1 www-data www-data 8.5M Apr 3 13:28 ../distro_data/data_files/Debian_Trixie_List.json
And finally, spot check the file at the top and bottom to make sure it looks like the packages listed start with the beginning of the alphabet (or in this case, numbers come before A), and end with packages at the end if the alphabet:
elizabeth@sdt:/opt/software-discovery-tool/bin$ head ../distro_data/data_files/Debian_Bullseye_List.json
[{
"packageName": "0ad-data",
"version": "0.0.23.1-1.1",
"description": "Real-time strategy game of ancient warfare (data files)"
},
{
"packageName": "0ad-data-common",
"version": "0.0.23.1-1.1",
"description": "Real-time strategy game of ancient warfare (common data files)"
},
elizabeth@sdt:/opt/software-discovery-tool/bin$ tail ../distro_data/data_files/Debian_Bullseye_List.json
"packageName": "elpa-zzz-to-char",
"version": "0.1.3-3",
"description": "fancy version of `zap-to-char' command"
},
{
"packageName": "python3-zzzeeksphinx",
"version": "1.1.6-1",
"description": "Zzzeek's Sphinx layout and utilities"
},
| json.dump(ubuntu2204_list, file, indent=2) | ||
| print(f"Saved!\nfilename: {q}") | ||
|
|
||
| if oskey == 'RHEL_9' or oskey == 'all': |
There was a problem hiding this comment.
In order to test these, I had to patch the file to fix #240 - maybe do that as your next PR?
Also note, unlike above, these aren't necessarily in alphabetical order so my spot check of the files was just to compare several of the items on the list to https://community.ibm.com/zsystems/oss/
Issues : openmainframeproject/software-discovery-tool-data#76
Updated package_build.py