You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the source package has a different name than the corresponding binary package, the current implementation (resolving source package name and then decide to ignore/add the source package) can make the on_scr_cd attribute useless.
Real world example:
I have the following three binary packages in my pkg-list, where the on_src_cd attribute is required because the repository holding these packages doesn't contain any source packages.
That leads to the error during the build when trying to create the source CD-ROM:
[ERROR]No sources for package 'mender-client4-4.0.4-1+debian+bookworm': No source found for mender-client4_4.0.4-1+debian+bookworm
Adding the package mender-client4 to the package list doesn't work, because it would install some unwanted additional packages.
As far as I understand it, the problem is caused by the order of the steps.
The function get_corresponding_source_packages, which resolves the source packages to each binary package, does that before add_source_pkg is called, where the comparison of the forbiddenPackages list (containing the binary package names) then doesn't match anymore.
Therefore, the question if there is a way to adapt that logic, so that for example the forbiddenPackages list contains not the binary package name but instead the already resolved source package name?
Or alternatively moving the logic of comparing the list to the get_corresponding_source_packages function, so that the components list passed to the mk_source_cdrom function, doesn't contain source packages, which are referenced by a binary package with that attribute, at the first hand?
Another approach I have in mind, which would be at least for me ok, is to have an additional property to blacklist specific source packages.
Do you know, if one of the approaches is feasible or if there are any other approaches to tackle that problem?
The text was updated successfully, but these errors were encountered:
I opened a PR (#419) which resolved the issue for me.
At a glance the binary names in the forbiddenPackages list will be resolved by the existing get_corresponding_source_packages function and a second list forbiddenSrcPackages will be created with unique source package names which are then used for the comparison inside add_source_pkg.
Works if binary name and source name match, like previously, but also if they don't match.
Can you give me feedback if this is sufficient for you or if there is a better approach?
When the source package has a different name than the corresponding binary package, the current implementation (resolving source package name and then decide to ignore/add the source package) can make the
on_scr_cd
attribute useless.Real world example:
I have the following three binary packages in my
pkg-list
, where theon_src_cd
attribute is required because the repository holding these packages doesn't contain any source packages.Normally that would work, but in this case each of the packages containing a reference to the source package
mender-client4
.Below the details for one of the binary packages as reference:
That leads to the error during the build when trying to create the source CD-ROM:
Adding the package
mender-client4
to the package list doesn't work, because it would install some unwanted additional packages.As far as I understand it, the problem is caused by the order of the steps.
The function
get_corresponding_source_packages
, which resolves the source packages to each binary package, does that beforeadd_source_pkg
is called, where the comparison of theforbiddenPackages
list (containing the binary package names) then doesn't match anymore.Therefore, the question if there is a way to adapt that logic, so that for example the
forbiddenPackages
list contains not the binary package name but instead the already resolved source package name?Or alternatively moving the logic of comparing the list to the
get_corresponding_source_packages
function, so that thecomponents
list passed to themk_source_cdrom
function, doesn't contain source packages, which are referenced by a binary package with that attribute, at the first hand?Another approach I have in mind, which would be at least for me ok, is to have an additional property to blacklist specific source packages.
Do you know, if one of the approaches is feasible or if there are any other approaches to tackle that problem?
The text was updated successfully, but these errors were encountered: