zhengzkkai / opkg

Automatically exported from code.google.com/p/opkg
0 stars 0 forks source link

(RFC) Implement --add-dest and --add-arch to specify dest/arch stanzes via the commandline #62

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
We use the same opkg host binary to perform offline installation against 
various target systems. Generating a new configuration file for each target is 
elaborate and configs frequently go out of sync, especially when containing 
autogenerated paths.

Attached is a patch which implements --add-arch and --add-dest command line 
options. Together with --offline-root, --force-* and --cache this allows 
running opkg without any configuration.

In order to support this I had to split opkg_conf_init() into opkg_conf_init() 
and opkg_conf_load().

opkg_conf_init() will only initialize the pair lists in the global config 
struct while opkg_conf_load() will do the rest. I also had to put the temporary 
destination list into the config struct itself in order to avoid dragging it 
through unrelated code.

The opkg-cl frontend will first perform a minimal initialization of the global 
config struct, then parse the arguments and finally call opkg_conf_load() to 
trigger parsing of config files etc.

The syntax for the "--add-dest" option is "<name>:<directory>" e.g. --add-dest 
root:/

The syntax for the "--add-arch" option is "<arch>:<priority>" e.g.
--add-arch mipsel:100

Both args may be repeated multiple times.

Please comment.

Original issue reported on code.google.com by goo...@wwsnet.net on 12 Sep 2010 at 10:40

Attachments:

GoogleCodeExporter commented 9 years ago
I like this idea a lot!

Original comment by graham.g...@gmail.com on 12 Sep 2010 at 11:51

GoogleCodeExporter commented 9 years ago

Original comment by goo...@wwsnet.net on 13 Sep 2010 at 12:26

GoogleCodeExporter commented 9 years ago
Added in r561, r562, r563

Original comment by goo...@wwsnet.net on 13 Sep 2010 at 1:17