Package: debirf
Version: 0.33
Severity: wishlist

Hi,

after some progress with debirf (i.e., a rootfs finally successfully created),
I decided to start using debirf -s (WRITE_MODE=skip)
yet by simply having it *inserted* to my prior cmdline without realizing
that -s WRITE_MODE setting would get overwritten by my leftover
subsequent -n (WRITE_MODE=rewrite) or -o (WRITE_MODE=overwrite) options.
--> Result: debootstrap called again despite not wanting it this time...

    while true ; do
        case "$1" in
...
            -n|--new)
                WRITE_MODE=rewrite
                shift 1
                ;;
            -o|--overwrite)
                WRITE_MODE=overwrite
                shift 1
                ;;
            -s|--skip)
                WRITE_MODE=skip
                shift 1
                ;;
...

(witness --skip getting overwritten by any subsequent --new / --overwrite
in this while loop)


The root cause of my confusion case is that -n -o -s parameters are
wholly redundant: instead, they are supposed to be a *single* *mode* switch,
to cleanly reflect exactly how it's implemented within-script (WRITE_MODE=xxx),
since this seems appropriate here.

These redundant options should thus be deprecated in favour of e.g. a combined
-m (--mode) switch taking rewrite/overwrite/skip arguments, I'd think
(and probably add a deprecation warning for a while,
whenever the old switches happen to get used).


Thanks,

Andreas Mohr


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to