Re: [PATCH] Set repository in kickstart harddrive command (#592239)

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

 



Hi,

On 05/19/2010 09:43 AM, Radek Vykydal wrote:
Hans de Goede wrote:


+ /* don't override boot repo= setting */
+ if (loaderData->instRepo == NULL) {
+ checked_asprintf(&url, "hd:%s:%s", partition,
+ dir ? dir : ".");
+ loaderData->instRepo = url;
+ }
+

I'll gladly admit I know nothing of this part of anaconda, but still
"." does not feel
right shouldn't that be "/" ?

You are right, revised version:


Ack for the new version.

Regards,

Hans


 From ee612089f400a27f527d5d25f56ba70ae067ab85 Mon Sep 17 00:00:00 2001
From: Radek Vykydal <rvykydal@xxxxxxxxxx>
Date: Tue, 18 May 2010 15:34:26 +0200
Subject: [PATCH] Set repository in kickstart harddrive command (#592239)

The patch makes these ks lines work:

harddrive --partition=sdb1 --dir=/images/install.img
harddrive --partition=sdb1 --dir=/

For both, stage 2 and packages will be fetched from the harddrive.

The patch adds setting of instRepo value (to setting of stage2) when
parsing ks so that respective --repo anaconda argument is passed to
stage2. Without the --repo, stage 2 assumes media install and fails
in repo setup (as in the BZ).

repo= boot argument overrides ks harddrive command which sets only
stage 2 in this case.
---
loader/hdinstall.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/loader/hdinstall.c b/loader/hdinstall.c
index 54a5fd9..e56f9c4 100644
--- a/loader/hdinstall.c
+++ b/loader/hdinstall.c
@@ -339,6 +339,7 @@ char * mountHardDrive(struct installMethod * method,
void setKickstartHD(struct loaderData_s * loaderData, int argc,
char ** argv) {
char *p;
+ char *url = NULL;
gchar *biospart = NULL, *partition = NULL, *dir = NULL;
GOptionContext *optCon = g_option_context_new(NULL);
GError *optErr = NULL;
@@ -391,6 +392,13 @@ void setKickstartHD(struct loaderData_s *
loaderData, int argc,
if (dir)
((struct hdInstallData *)loaderData->stage2Data)->directory = dir;
.
+ /* don't override boot repo= setting */
+ if (loaderData->instRepo == NULL) {
+ checked_asprintf(&url, "hd:%s:%s", partition,
+ dir ? dir : "/");
+ loaderData->instRepo = url;
+ }
+
logMessage(INFO, "results of hd ks, partition is %s, dir is %s", partition,
dir);
}
--.
1.6.0.6

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

_______________________________________________
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