Skip to content
  • Yann E. MORIN's avatar
    91e776b5
    core/pkg-download: change all helpers to use common options · 91e776b5
    Yann E. MORIN authored
    
    
    Currently all download helpers accepts the local output file, the remote
    locations, the changesets and so on... as positional arguments.
    
    This was well and nice when that's was all we needed.
    
    But then we added an option to quiesce their verbosity, and that was
    shoehorned with a trivial getopts, still keeping all the existing
    positional arguments as... positional arguments.
    
    Adding yet more options while keeping positional arguments will not be
    very easy, even if we do not envision any new option in the foreseeable
    future (but 640K ought to be enough for everyone, remember? ;-) ).
    
    Change all helpers to accept a set of generic options (-q for quiet and
    -o for the output file) as well as helper-specific options (like -r for
    the repository, -c for a changeset...).
    
    Maxime:
    Changed -R to -r for recurse (only for the git backend)
    Changed -r to -u for URI (for all backend)
    Change -R to -c for cset (for CVS and SVN backend)
    Add the export of the BR_BACKEND_DL_GETOPTS so all the backend wrapper
    can use the same option easily
    Now all the backends use the same common options.
    
    Signed-off-by: default avatar"Yann E. MORIN" <yann.morin.1998@free.fr>
    Signed-off-by: default avatarMaxime Hadjinlian <maxime.hadjinlian@gmail.com>
    Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
    Reviewed-by: default avatar"Yann E. MORIN" <yann.morin.1998@free.fr>
    Reviewed-by: default avatarThomas Petazzoni <thomas.petazzoni@bootlin.com>
    Signed-off-by: default avatarPeter Korsgaard <peter@korsgaard.com>
    91e776b5
    core/pkg-download: change all helpers to use common options
    Yann E. MORIN authored
    
    
    Currently all download helpers accepts the local output file, the remote
    locations, the changesets and so on... as positional arguments.
    
    This was well and nice when that's was all we needed.
    
    But then we added an option to quiesce their verbosity, and that was
    shoehorned with a trivial getopts, still keeping all the existing
    positional arguments as... positional arguments.
    
    Adding yet more options while keeping positional arguments will not be
    very easy, even if we do not envision any new option in the foreseeable
    future (but 640K ought to be enough for everyone, remember? ;-) ).
    
    Change all helpers to accept a set of generic options (-q for quiet and
    -o for the output file) as well as helper-specific options (like -r for
    the repository, -c for a changeset...).
    
    Maxime:
    Changed -R to -r for recurse (only for the git backend)
    Changed -r to -u for URI (for all backend)
    Change -R to -c for cset (for CVS and SVN backend)
    Add the export of the BR_BACKEND_DL_GETOPTS so all the backend wrapper
    can use the same option easily
    Now all the backends use the same common options.
    
    Signed-off-by: default avatar"Yann E. MORIN" <yann.morin.1998@free.fr>
    Signed-off-by: default avatarMaxime Hadjinlian <maxime.hadjinlian@gmail.com>
    Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
    Reviewed-by: default avatar"Yann E. MORIN" <yann.morin.1998@free.fr>
    Reviewed-by: default avatarThomas Petazzoni <thomas.petazzoni@bootlin.com>
    Signed-off-by: default avatarPeter Korsgaard <peter@korsgaard.com>
Loading