archive-installer integration patchlet question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is the patch I started working on for trying to integrate the
archive backend (along with a temporary change in default for my
testing purposes).  I have no idea if this is the right direction
towards correctly integrating the archive backend into anaconda
proper and would definitely appreciate feedback.  Thanks!


diff --git a/anaconda b/anaconda
index 5fe84e6..cc7fadb 100755
--- a/anaconda
+++ b/anaconda
@@ -197,6 +197,7 @@ def parseOptions(argv = None):
     op.add_option("--noverifyssl", action="store_true", default=False)
 
     op.add_option("--liveinst", action="store_true", default=False)
+    op.add_option("--archiveinst", action="store_true", default=False)
 
     # Display
     op.add_option("--headless", dest="isHeadless", action="store_true", default=False)
@@ -608,6 +609,9 @@ if __name__ == "__main__":
 
     if opts.liveinst:
         flags.livecdInstall = True
+    
+    if opts.archiveinst:
+        flags.archiveInstall = True
 
     if opts.module:
         for mod in opts.module:
diff --git a/loader/loader.c b/loader/loader.c
index 7223ee9..afa4d07 100644
--- a/loader/loader.c
+++ b/loader/loader.c
@@ -955,6 +955,8 @@ static void parseCmdLineFlags(struct loaderData_s * loaderData,
             }
         } else if (!strcasecmp(k, "rescue")) {
             flags |= LOADER_FLAGS_RESCUE;
+        } else if (!strcasecmp(k, "archive")) {
+            flags |= LOADER_FLAGS_ARCHIVE;
         } else if (!strcasecmp(k, "nopass")) {
             flags |= LOADER_FLAGS_NOPASS;
         } else if (!strcasecmp(k, "serial")) {
@@ -2289,6 +2291,9 @@ int main(int argc, char ** argv) {
     if (FL_RESCUE(flags)) {
         *argptr++ = "--rescue";
     } else {
+        if (FL_ARCHIVE(flags)) {
+            *argptr++ = "--archiveinst";
+        }
         if (FL_TEXT(flags))
             *argptr++ = "-T";
         else if (FL_GRAPHICAL(flags))
diff --git a/loader/loader.h b/loader/loader.h
index 6d3aac1..3cbf092 100644
--- a/loader/loader.h
+++ b/loader/loader.h
@@ -72,9 +72,11 @@
 #define LOADER_FLAGS_KICKSTART_SEND_SERIAL   (((uint64_t) 1) << 39)
 #define LOADER_FLAGS_AUTOMODDISK        (((uint64_t) 1) << 40)
 #define LOADER_FLAGS_NOEJECT            (((uint64_t) 1) << 41)
+#define LOADER_FLAGS_ARCHIVE            (((uint64_t) 1) << 42)
 
 #define FL_TEXT(a)               ((a) & LOADER_FLAGS_TEXT)
 #define FL_RESCUE(a)             ((a) & LOADER_FLAGS_RESCUE)
+#define FL_ARCHIVE(a)            ((a) & LOADER_FLAGS_ARCHIVE)
 #define FL_KICKSTART(a)          ((a) & LOADER_FLAGS_KICKSTART)
 #define FL_KICKSTART_SEND_MAC(a) ((a) & LOADER_FLAGS_KICKSTART_SEND_MAC)
 #define FL_POWEROFF(a)           ((a) & LOADER_FLAGS_POWEROFF)
diff --git a/pyanaconda/flags.py b/pyanaconda/flags.py
index 68a53b1..9ddf63f 100644
--- a/pyanaconda/flags.py
+++ b/pyanaconda/flags.py
@@ -74,6 +74,8 @@ class Flags:
         self.__dict__['flags'] = {}
         self.__dict__['flags']['test'] = 0
         self.__dict__['flags']['livecdInstall'] = 0
+        self.__dict__['flags']['archiveInstall'] = 1
+        #self.__dict__['flags']['archiveInstall'] = 0
         self.__dict__['flags']['dlabel'] = 0
         self.__dict__['flags']['ibft'] = 1
         self.__dict__['flags']['iscsi'] = 0
diff --git a/pyanaconda/installclasses/fedora.py b/pyanaconda/installclasses/fedora.py
index 3f7243f..b492ec1 100644
--- a/pyanaconda/installclasses/fedora.py
+++ b/pyanaconda/installclasses/fedora.py
@@ -88,6 +88,9 @@ class InstallClass(BaseInstallClass):
         if flags.livecdInstall:
             import pyanaconda.livecd
             return pyanaconda.livecd.LiveCDCopyBackend
+        elif flags.archiveInstall:
+            import pyanaconda.archive
+            return pyanaconda.archive.ArchiveBackend
         else:
             return yuminstall.YumBackend
 

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux