Create the regress offline_root from scratch.
authorgraham.gower@gmail.com <graham.gower@gmail.com@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>
Thu, 23 Dec 2010 01:38:57 +0000 (01:38 +0000)
committergraham.gower@gmail.com <graham.gower@gmail.com@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>
Thu, 23 Dec 2010 01:38:57 +0000 (01:38 +0000)
git-svn-id: http://opkg.googlecode.com/svn/trunk@596 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

tests/regress/opk.py

index 616658acda265dec06954d8153ed79833c13154b..9763bd3976b8e358804150a2dc8080ee42915fcc 100644 (file)
@@ -90,6 +90,12 @@ def regress_init():
 
        os.chdir(cfg.opkdir)
 
-       odir = "{}/usr/lib/opkg".format(cfg.offline_root)
-       os.system("rm -fr {}".format(odir))
-       os.mkdir(odir)
+       os.system("rm -fr {}".format(cfg.offline_root))
+
+       os.makedirs("{}/usr/lib/opkg".format(cfg.offline_root))
+       os.makedirs("{}/etc/opkg".format(cfg.offline_root))
+
+       f = open("{}/etc/opkg/opkg.conf".format(cfg.offline_root), "w")
+       f.write("arch all 1\n")
+       f.write("src test file:{}\n".format(cfg.opkdir))
+       f.close()