Project

General

Profile

Tâche #8749

Distribution EOLE - Scénario #8742: Focus mise à jour 2.4.1

problème avec l'option -l de apt-eole

Added by Emmanuel GARETTE over 6 years ago. Updated over 6 years ago.

Status:
Ne sera pas résolu
Priority:
Normal
Assigned To:
Start date:
Due date:
% Done:

0%

Estimated time:
1.00 h
Spent time:
Remaining (hours):
0.0

Description

root@bdd:~# apt-eole -h
[..]
logging:
  -l {debug,info,warning,error,critical}, --log-level {debug,info,warning,error,critical}
                        Log level
[..]

Mais :

 apt-eole --container current --log-level info configure ubuntu --mirror http://eole.ac-dijon.fr/ubuntu --level updates --dist precise --component main universe multiverse restricted -l debug -d
usage: apt-eole configure ubuntu [-h] [-m URI] [-d DIST]
                                 [-l {security,updates,proposed}]
                                 [-c {main,universe,multiverse,restricted} [{main,universe,multiverse,restricted} ...]]
apt-eole configure ubuntu: error: argument -l/--level: invalid choice: 'debug' (choose from u'security', u'updates', u'proposed')

History

#1 Updated by Emmanuel GARETTE over 6 years ago

J'ai la même chose pour -d :

apt-eole configure ubuntu: error: argument -d/--dist: expected one argument

#2 Updated by Joël Cuissinat over 6 years ago

  • Parent task set to #8742

#3 Updated by Daniel Dehennin over 6 years ago

  • Estimated time set to 1.00 h

#4 Updated by Daniel Dehennin over 6 years ago

  • Description updated (diff)
  • Remaining (hours) set to 1.0

#5 Updated by Daniel Dehennin over 6 years ago

  • Status changed from Nouveau to En cours

#6 Updated by Daniel Dehennin over 6 years ago

  • Status changed from En cours to Ne sera pas résolu
  • Assigned To set to Daniel Dehennin

La gestion des options de la ligne de commande est faites par argparse.

apt-eole défini plusieurs niveau d’options et le niveau de log est géré au plus haut niveau :

root@amonecole:~# apt-eole -h
usage: apt-eole [-h] [-c CONTAINER] [-l {debug,info,warning,error,critical}]
                [-v] [-d] [-j] [-s] [-z]

                {configure,update,upgrade,dist-upgrade,list-upgrade,install,remove}
                ...

Run apt in non-interactive

optional arguments:
  -h, --help            show this help message and exit
  -j, --json            Output in JSON format
  -s, --simulate, --just-print, --dry-run, --recon, --no-act
                        No action; perform a simulation
  -z, --silent          no lines are printed

container:
  -c CONTAINER, --container CONTAINER
                        Name of LXC container

logging:
  -l {debug,info,warning,error,critical}, --log-level {debug,info,warning,error,critical}
                        Log level
  -v, --verbose         Verbose mode
  -d, --debug           Debug mode

APT actions:
  {configure,update,upgrade,dist-upgrade,list-upgrade,install,remove}
                        actions help
    configure           configure sources.list
    update              update list of indexes
    upgrade             upgrade packages
    dist-upgrade        upgrade distribution
    list-upgrade        list packages to upgrade
    install             install packages
    remove              remove packages

Les sous commandes regroupées sous APT actions disposent de leur propre jeux d’options, notamment les sous commandes ubuntu et eole de configure définissent l’option -l/--level comme étant le niveau de mise à jour :

root@amonecole:~# apt-eole configure ubuntu -h
usage: apt-eole configure ubuntu [-h] [-m URI] [-d DIST]
                                 [-l {security,updates,proposed}]
                                 [-c {main,universe,multiverse,restricted} [{main,universe,multiverse,restricted} ...]]

optional arguments:
  -h, --help            show this help message and exit
  -m URI, --mirror URI  URI of the mirror
  -d DIST, --dist DIST  distribution name
  -l {security,updates,proposed}, --level {security,updates,proposed}
                        update level
  -c {main,universe,multiverse,restricted} [{main,universe,multiverse,restricted} ...], --component {main,universe,multiverse,restricted} [{main,universe,multiverse,restricted} ...]
                        component to activate

root@amonecole:~# apt-eole configure eole -h
usage: apt-eole configure eole [-h] [-m URI] [-d {stable,testing,unstable}]
                               [-c {main} [{main} ...]] [-l {stable,updates}]

optional arguments:
  -h, --help            show this help message and exit
  -m URI, --mirror URI  URI of the mirror
  -d {stable,testing,unstable}, --dist {stable,testing,unstable}
                        distribution name
  -c {main} [{main} ...], --component {main} [{main} ...]
                        component to activate
  -l {stable,updates}, --level {stable,updates}
                        update level

#7 Updated by Daniel Dehennin over 6 years ago

  • Remaining (hours) changed from 1.0 to 0.0

Also available in: Atom PDF